no-OS
altera_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef ALTERA_GPIO_H_
40 #define ALTERA_GPIO_H_
41 
42 #include "no_os_gpio.h"
43 
44 /******************************************************************************/
45 /*************************** Types Declarations *******************************/
46 /******************************************************************************/
47 
51 extern const struct no_os_gpio_platform_ops altera_gpio_ops;
52 
57 enum gpio_type {
60 };
61 
71  uint32_t device_id;
73  uint32_t base_address;
74 };
75 
84  uint32_t device_id;
86  uint32_t base_address;
87 };
88 
89 #endif /* ALTERA_GPIO_H_ */
altera_gpio_init_param::base_address
uint32_t base_address
Definition: altera_gpio.h:73
no_os_gpio_desc::extra
void * extra
Definition: no_os_gpio.h:112
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
altera_gpio_get_direction
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:163
altera_gpio_desc
Altera platform specific GPIO descriptor.
Definition: altera_gpio.h:80
altera_gpio.h
no_os_delay.h
Header file of Delay functions.
no_os_axi_io_read
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:59
no_os_gpio_init_param::number
int32_t number
Definition: no_os_gpio.h:89
no_os_axi_io.h
Header file of AXI IO.
no_os_calloc
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:60
NIOS_II_GPIO
@ NIOS_II_GPIO
Definition: altera_gpio.h:59
altera_gpio_init_param::device_id
uint32_t device_id
Definition: altera_gpio.h:71
no_os_error.h
Error codes definition.
altera_gpio_ops
const struct no_os_gpio_platform_ops altera_gpio_ops
Altera platform specific GPIO platform ops structure.
Definition: altera_gpio.c:259
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: altera_delay.c:65
altera_gpio_get
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:62
altera_gpio_init_param::type
enum gpio_type type
Definition: altera_gpio.h:69
no_os_udelay
void no_os_udelay(uint32_t usecs)
Generate microseconds delay.
Definition: altera_delay.c:55
altera_gpio_direction_input
int32_t altera_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: altera_gpio.c:132
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
gpio_type
gpio_type
Altera platform architecture types.
Definition: altera_gpio.h:57
no_os_gpio_get
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:55
altera_gpio_init_param
Structure holding the initialization parameters for Altera platform specific GPIO parameters.
Definition: altera_gpio.h:67
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:75
altera_gpio_remove
int32_t altera_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: altera_gpio.c:117
NULL
#define NULL
Definition: wrapper.h:64
altera_gpio_desc::device_id
uint32_t device_id
Definition: altera_gpio.h:84
altera_gpio_get_value
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:226
no_os_gpio_set_value
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:203
altera_gpio_set_value
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:185
altera_gpio_ops
const struct no_os_gpio_platform_ops altera_gpio_ops
Altera platform specific gpio platform ops structure.
Definition: altera_gpio.c:259
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:133
no_os_gpio_init_param::extra
void * extra
Definition: no_os_gpio.h:95
altera_gpio_direction_output
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:149
no_os_gpio.h
Header file of GPIO Interface.
no_os_axi_io_write
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:73
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:135
altera_gpio_desc::type
enum gpio_type type
Definition: altera_gpio.h:82
altera_gpio_desc::base_address
uint32_t base_address
Definition: altera_gpio.h:86
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:106
altera_gpio_get_optional
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:101