Go to the documentation of this file.
33 #ifndef ALTERA_GPIO_H_
34 #define ALTERA_GPIO_H_
uint32_t base_address
Definition: altera_gpio.h:67
void * extra
Definition: no_os_gpio.h:106
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
int32_t altera_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: altera_gpio.c:157
Altera platform specific GPIO descriptor.
Definition: altera_gpio.h:74
Header file of Delay functions.
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:53
int32_t number
Definition: no_os_gpio.h:83
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
@ NIOS_II_GPIO
Definition: altera_gpio.h:53
uint32_t device_id
Definition: altera_gpio.h:65
const struct no_os_gpio_platform_ops altera_gpio_ops
Altera platform specific GPIO platform ops structure.
Definition: altera_gpio.c:253
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: altera_delay.c:59
int32_t altera_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: altera_gpio.c:56
enum gpio_type type
Definition: altera_gpio.h:63
void no_os_udelay(uint32_t usecs)
Generate microseconds delay.
Definition: altera_delay.c:49
int32_t altera_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: altera_gpio.c:126
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
gpio_type
Altera platform architecture types.
Definition: altera_gpio.h:51
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
Structure holding the initialization parameters for Altera platform specific GPIO parameters.
Definition: altera_gpio.h:61
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
int32_t altera_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: altera_gpio.c:111
#define NULL
Definition: wrapper.h:64
uint32_t device_id
Definition: altera_gpio.h:78
int32_t altera_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: altera_gpio.c:220
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
int32_t altera_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: altera_gpio.c:179
const struct no_os_gpio_platform_ops altera_gpio_ops
Altera platform specific gpio platform ops structure.
Definition: altera_gpio.c:253
void * extra
Definition: no_os_gpio.h:89
int32_t altera_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: altera_gpio.c:143
Header file of GPIO Interface.
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:67
enum gpio_type type
Definition: altera_gpio.h:76
uint32_t base_address
Definition: altera_gpio.h:80
int32_t number
Definition: no_os_gpio.h:100
int32_t altera_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: altera_gpio.c:95