no-OS
xilinx_gpio_irq.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef XILINX_GPIO_IRQ_H_
35 #define XILINX_GPIO_IRQ_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 
41 #include "stdbool.h"
42 #include "no_os_list.h"
43 #include "xgpiops.h"
44 #include "no_os_irq.h"
45 
46 /******************************************************************************/
47 /*************************** Types Declarations *******************************/
48 /******************************************************************************/
54  int32_t pin_nb;
56  bool triggered;
57  bool enabled;
58 };
59 
67  int32_t gpio_device_id;
68 };
69 
76  XGpioPs my_Gpio;
78  struct no_os_iterator *it;
79 };
80 
84 extern const struct no_os_irq_platform_ops xil_gpio_irq_ops;
85 
86 #endif
no_os_list_desc
Structure storing the list and function wrapper for usual list types.
Definition: no_os_list.h:228
xil_gpio_irq_desc
Xilinx platform specific GPIO IRQ descriptor.
Definition: xilinx_gpio_irq.h:74
no_os_alloc.h
xil_gpio_irq_ops
const struct no_os_irq_platform_ops xil_gpio_irq_ops
Xilinx platform specific GPIO IRQ platform ops structure.
Definition: xilinx_gpio_irq.c:347
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
no_os_irq.h
Header file of IRQ interface.
no_os_irq_register_callback
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:92
NO_OS_LIST_DEFAULT
@ NO_OS_LIST_DEFAULT
Definition: no_os_list.h:195
no_os_list_get_find
int32_t no_os_list_get_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
no_os_list_get_first
int32_t no_os_list_get_first(struct no_os_list_desc *list_desc, void **data)
xil_gpio_irq_ctrl_remove
int32_t xil_gpio_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Remove the GPIO IRQ controller.
Definition: xilinx_gpio_irq.c:324
no_os_irq_platform_ops::init
int32_t(* init)(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Definition: no_os_irq.h:162
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
xil_gpio_irq_enable
int32_t xil_gpio_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific GPIO IRQ pin.
Definition: xilinx_gpio_irq.c:295
no_os_irq_init_param::extra
void * extra
Definition: no_os_irq.h:116
xil_callback_desc::pin_nb
int32_t pin_nb
Definition: xilinx_gpio_irq.h:54
no_os_error.h
Error codes definition.
no_os_iterator_move
int32_t no_os_iterator_move(struct no_os_iterator *iter, int32_t steps)
xil_gpio_irq_init_param
Structure holding the initialization parameters for Xilinx platform specific GPIO IRQ parameters.
Definition: xilinx_gpio_irq.h:65
no_os_callback_desc::ctx
void * ctx
Definition: no_os_irq.h:146
no_os_irq_trig_level
no_os_irq_trig_level
Definition: no_os_irq.h:76
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:109
xil_gpio_irq_disable
int32_t xil_gpio_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific GPIO IRQ pin.
Definition: xilinx_gpio_irq.c:103
xil_callback_desc
Structure holding callback parameters for each pin.
Definition: xilinx_gpio_irq.h:53
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:144
xil_gpio_irq_desc::my_Gpio
XGpioPs my_Gpio
Definition: xilinx_gpio_irq.h:76
xilinx_gpio_irq.h
Implementation of Xilinx GPIO IRQ Generic Driver.
no_os_list_remove
int32_t no_os_list_remove(struct no_os_list_desc *list_desc)
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: aducm3029_irq.h:62
xil_gpio_irq_desc::parent_desc
struct no_os_irq_ctrl_desc * parent_desc
Definition: xilinx_gpio_irq.h:75
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
xil_gpio_irq_register_callback
int32_t xil_gpio_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register pin specific GPIO interrupt.
Definition: xilinx_gpio_irq.c:238
no_os_list.h
List library header.
no_os_iterator_remove
int32_t no_os_iterator_remove(struct no_os_iterator *iter)
no_os_irq_ctrl_desc::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:125
xil_gpio_irq_init_param::gpio_device_id
int32_t gpio_device_id
Definition: xilinx_gpio_irq.h:67
no_os_iterator_move_to_idx
int32_t no_os_iterator_move_to_idx(struct no_os_iterator *iter, int32_t idx)
xil_callback_desc::enabled
bool enabled
Definition: xilinx_gpio_irq.h:57
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
NO_OS_IRQ_EDGE_RISING
@ NO_OS_IRQ_EDGE_RISING
Definition: no_os_irq.h:80
no_os_iterator_read
int32_t no_os_iterator_read(struct no_os_iterator *iter, void **data)
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:181
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:160
xil_gpio_irq_trigger_level_set
int32_t xil_gpio_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set GPIO interrupt trigger level.
Definition: xilinx_gpio_irq.c:213
xil_gpio_irq_unregister_callback
int32_t xil_gpio_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *cb)
Unregister pin specific GPIO interrupt.
Definition: xilinx_gpio_irq.c:269
xil_gpio_irq_ops
const struct no_os_irq_platform_ops xil_gpio_irq_ops
Xilinx specific GPIO IRQ platform ops structure.
Definition: xilinx_gpio_irq.c:347
xil_callback_desc::triggered
bool triggered
Definition: xilinx_gpio_irq.h:56
xil_callback_desc::callback
struct no_os_callback_desc callback
Definition: xilinx_gpio_irq.h:55
no_os_list_add_last
int32_t no_os_list_add_last(struct no_os_list_desc *list_desc, void *data)
no_os_list_init
int32_t no_os_list_init(struct no_os_list_desc **list_desc, enum no_os_adapter_type type, f_cmp comparator)
no_os_iterator_init
int32_t no_os_iterator_init(struct no_os_iterator **iter, struct no_os_list_desc *list_desc, bool start)
no_os_util.h
Header file of utility functions.
no_os_irq_trigger_level_set
int32_t no_os_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: no_os_irq.c:162
xil_gpio_irq_desc::it
struct no_os_iterator * it
Definition: xilinx_gpio_irq.h:78
xil_gpio_irq_init_param::parent_desc
struct no_os_irq_ctrl_desc * parent_desc
Definition: xilinx_gpio_irq.h:66
no_os_irq_ctrl_desc
Definition: no_os_irq.h:123
xil_gpio_irq_desc::callback_list
struct no_os_list_desc * callback_list
Definition: xilinx_gpio_irq.h:77
no_os_irq_ctrl_desc::extra
void * extra
Definition: no_os_irq.h:134
xil_gpio_irq_ctrl_init
int32_t xil_gpio_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the GPIO IRQ controller.
Definition: xilinx_gpio_irq.c:133