Go to the documentation of this file.
33 #ifndef ADUCM3029_GPIO_H_
34 #define ADUCM3029_GPIO_H_
38 #define PIN(nb) (1u << ((nb) & 0x0F))
40 #define PORT(nb) (((nb) & 0xF0) >> 4)
47 #endif // ADUCM3029_GPIO_H_
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define NO_OS_GPIO_OUT
Definition: no_os_gpio.h:47
const struct no_os_gpio_platform_ops aducm_gpio_ops
ADuCM3029 specific GPIO platform ops structure.
Definition: aducm3029_gpio.c:289
@ NO_OS_GPIO_HIGH_Z
Definition: no_os_gpio.h:119
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
int32_t number
Definition: no_os_gpio.h:83
int32_t aducm3029_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO and set the GPIO to the specified value.
Definition: aducm3029_gpio.c:159
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
int32_t aducm3029_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: aducm3029_gpio.c:120
#define NO_OS_GPIO_IN
Definition: no_os_gpio.h:48
int32_t aducm3029_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: aducm3029_gpio.c:191
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
int32_t aducm3029_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: aducm3029_gpio.c:140
#define PORT(nb)
Definition: aducm3029_gpio.h:40
int32_t aducm3029_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO descriptor from the number specified in param.
Definition: aducm3029_gpio.c:64
int32_t aducm3029_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: aducm3029_gpio.c:218
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
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
const struct no_os_gpio_platform_ops aducm_gpio_ops
ADuCM3029 platform specific GPIO platform ops structure.
Definition: aducm3029_gpio.c:289
#define NULL
Definition: wrapper.h:64
int32_t aducm3029_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: aducm3029_gpio.c:104
Header file of GPIO Interface.
int32_t aducm3029_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: aducm3029_gpio.c:258
@ PIN
Definition: t_ad9528.h:162
int32_t number
Definition: no_os_gpio.h:100