no-OS
pico_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef _PICO_GPIO_H_
34 #define _PICO_GPIO_H_
35 
36 /******************************************************************************/
37 /************************* Include Files **************************************/
38 /******************************************************************************/
39 
40 #include "no_os_gpio.h"
41 
42 /******************************************************************************/
43 /*************************** Types Declarations *******************************/
44 /******************************************************************************/
45 
53 };
54 
58 extern const struct no_os_gpio_platform_ops pico_gpio_ops;
59 
60 #endif
NO_OS_PULL_DOWN
@ NO_OS_PULL_DOWN
Definition: no_os_gpio.h:70
no_os_gpio_desc::extra
void * extra
Definition: no_os_gpio.h:106
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
NO_OS_GPIO_OUT
#define NO_OS_GPIO_OUT
Definition: no_os_gpio.h:47
no_os_gpio_init_param::pull
enum no_os_gpio_pull_up pull
Definition: no_os_gpio.h:85
pico_gpio_remove
int32_t pico_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: pico_gpio.c:152
no_os_delay.h
Header file of Delay functions.
pico_gpio_get_optional
int32_t pico_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: pico_gpio.c:136
pico_gpio_direction_input
int32_t pico_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: pico_gpio.c:167
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
no_os_gpio_init_param::number
int32_t number
Definition: no_os_gpio.h:83
pico_gpio_direction_output
int32_t pico_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: pico_gpio.c:190
NO_OS_GPIO_IN
#define NO_OS_GPIO_IN
Definition: no_os_gpio.h:48
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: pico_delay.c:60
NO_OS_PULL_NONE
@ NO_OS_PULL_NONE
Definition: no_os_gpio.h:66
pico_gpio_set_value
int32_t pico_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: pico_gpio.c:238
no_os_udelay
void no_os_udelay(uint32_t usecs)
Generate microseconds delay.
Definition: pico_delay.c:50
no_os_error.h
Error codes definition.
pico_gpio_ops
const struct no_os_gpio_platform_ops pico_gpio_ops
pico platform specific GPIO platform ops structure
Definition: pico_gpio.c:271
pico_gpio_get
int32_t pico_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO descriptor.
Definition: pico_gpio.c:95
pico_gpio_ops
const struct no_os_gpio_platform_ops pico_gpio_ops
pico platform specific gpio platform ops structure
Definition: pico_gpio.c:271
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
no_os_gpio_desc::pull
enum no_os_gpio_pull_up pull
Definition: no_os_gpio.h:102
NULL
#define NULL
Definition: wrapper.h:64
pico_gpio_get_value
int32_t pico_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: pico_gpio.c:257
NO_OS_PULL_UP
@ NO_OS_PULL_UP
Definition: no_os_gpio.h:68
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:127
no_os_gpio.h
Header file of GPIO Interface.
pico_gpio.h
Header file for pico gpio specifics.
pico_gpio_desc
pico platform specific gpio descriptor
Definition: pico_gpio.h:50
_gpio_init
int32_t _gpio_init(struct no_os_gpio_desc *desc, const struct no_os_gpio_init_param *param)
Prepare the GPIO decriptor.
Definition: xilinx_gpio.c:63
pico_gpio_desc::input_enabled
bool input_enabled
Definition: pico_gpio.h:52
no_os_util.h
Header file of utility functions.
no_os_gpio_platform_ops::gpio_ops_get
int32_t(* gpio_ops_get)(struct no_os_gpio_desc **, const struct no_os_gpio_init_param *)
Definition: no_os_gpio.h:129
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:100
pico_gpio_get_direction
int32_t pico_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: pico_gpio.c:216