no-OS
altera_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef ALTERA_GPIO_H_
34 #define ALTERA_GPIO_H_
35 
36 #include "no_os_gpio.h"
37 
38 /******************************************************************************/
39 /*************************** Types Declarations *******************************/
40 /******************************************************************************/
41 
45 extern const struct no_os_gpio_platform_ops altera_gpio_ops;
46 
51 enum gpio_type {
54 };
55 
65  uint32_t device_id;
67  uint32_t base_address;
68 };
69 
78  uint32_t device_id;
80  uint32_t base_address;
81 };
82 
83 #endif /* ALTERA_GPIO_H_ */
altera_gpio_init_param::base_address
uint32_t base_address
Definition: altera_gpio.h:67
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
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:157
altera_gpio_desc
Altera platform specific GPIO descriptor.
Definition: altera_gpio.h:74
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:53
no_os_gpio_init_param::number
int32_t number
Definition: no_os_gpio.h:83
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:54
NIOS_II_GPIO
@ NIOS_II_GPIO
Definition: altera_gpio.h:53
altera_gpio_init_param::device_id
uint32_t device_id
Definition: altera_gpio.h:65
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:253
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: altera_delay.c:59
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:56
altera_gpio_init_param::type
enum gpio_type type
Definition: altera_gpio.h:63
no_os_udelay
void no_os_udelay(uint32_t usecs)
Generate microseconds delay.
Definition: altera_delay.c:49
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:126
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
gpio_type
gpio_type
Altera platform architecture types.
Definition: altera_gpio.h:51
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:49
altera_gpio_init_param
Structure holding the initialization parameters for Altera platform specific GPIO parameters.
Definition: altera_gpio.h:61
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
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:111
NULL
#define NULL
Definition: wrapper.h:64
altera_gpio_desc::device_id
uint32_t device_id
Definition: altera_gpio.h:78
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:220
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:197
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:179
altera_gpio_ops
const struct no_os_gpio_platform_ops altera_gpio_ops
Altera platform specific gpio platform ops structure.
Definition: altera_gpio.c:253
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_init_param::extra
void * extra
Definition: no_os_gpio.h:89
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:143
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:67
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
altera_gpio_desc::type
enum gpio_type type
Definition: altera_gpio.h:76
altera_gpio_desc::base_address
uint32_t base_address
Definition: altera_gpio.h:80
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:100
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:95