no-OS
irq_extra.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef IRQ_EXTRA_H
41 # define IRQ_EXTRA_H
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include <drivers/xint/adi_xint.h>
48 #include <stdbool.h>
49 #include <stdint.h>
50 #include "irq.h"
51 
52 /******************************************************************************/
53 /********************** Macros and Constants Definitions **********************/
54 /******************************************************************************/
55 
57 #define NB_INTERRUPTS 8u
58 
60 #define RTC_COUNT_INT ADI_RTC_COUNT_INT
61 #define RTC_COUNT_ROLLOVER_INT ADI_RTC_COUNT_ROLLOVER_INT
62 
63 /******************************************************************************/
64 /*************************** Types Declarations *******************************/
65 /******************************************************************************/
66 
71 enum irq_id {
88 };
89 
94 enum irq_mode {
96  IRQ_RISING_EDGE = ADI_XINT_IRQ_RISING_EDGE,
98  IRQ_FALLING_EDGE = ADI_XINT_IRQ_FALLING_EDGE,
100  IRQ_EITHER_EDGE = ADI_XINT_IRQ_EITHER_EDGE,
102  IRQ_HIGH_LEVEL = ADI_XINT_IRQ_HIGH_LEVEL,
104  IRQ_LOW_LEVEL = ADI_XINT_IRQ_LOW_LEVEL
105 };
106 
116 };
117 
127 };
128 
138 };
139 
144 union irq_config {
153 };
154 
165  uint8_t irq_memory[ADI_XINT_MEMORY_SIZE];
167  uint32_t enabled;
168 };
169 
173 extern const struct irq_platform_ops aducm_irq_ops;
174 
175 #endif // IRQ_EXTRA_H_
IRQ_FALLING_EDGE
@ IRQ_FALLING_EDGE
Definition: irq_extra.h:98
aducm_irq_ctrl_desc::enabled
uint32_t enabled
Definition: irq_extra.h:167
ADUCM_EXTERNAL_INT2_ID
@ ADUCM_EXTERNAL_INT2_ID
Definition: irq_extra.h:77
rtc_desc
Structure holding RTC descriptor.
Definition: rtc.h:57
IRQ_RISING_EDGE
@ IRQ_RISING_EDGE
Definition: irq_extra.h:96
irq_config::rtc_conf
struct rtc_irq_config * rtc_conf
Definition: irq_extra.h:150
IRQ_LOW_LEVEL
@ IRQ_LOW_LEVEL
Definition: irq_extra.h:104
aducm_irq_ctrl_desc::callback_configured
bool callback_configured[NB_INTERRUPTS]
Definition: irq_extra.h:163
irq_config::uart_conf
struct uart_desc * uart_conf
Definition: irq_extra.h:146
aducm_irq_ctrl_desc::irq_memory
uint8_t irq_memory[ADI_XINT_MEMORY_SIZE]
Definition: irq_extra.h:165
ADUCM_GPIO_B_INT_ID
@ ADUCM_GPIO_B_INT_ID
Definition: irq_extra.h:87
irq_config
Configuration for the callback.
Definition: irq_extra.h:144
GPIO_GROUP_NEGATIVE_EDGE
@ GPIO_GROUP_NEGATIVE_EDGE
Definition: irq_extra.h:124
IRQ_EITHER_EDGE
@ IRQ_EITHER_EDGE
Definition: irq_extra.h:100
irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: irq.h:129
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: irq_extra.h:71
ADUCM_RTC_INT_ID
@ ADUCM_RTC_INT_ID
Definition: irq_extra.h:83
rtc_irq_config::rtc_handler
struct rtc_desc * rtc_handler
Definition: irq_extra.h:113
ADUCM_GPIO_A_INT_ID
@ ADUCM_GPIO_A_INT_ID
Definition: irq_extra.h:85
gpio_desc
Structure holding the GPIO descriptor.
Definition: gpio.h:84
rtc_irq_config::active_interrupts
uint32_t active_interrupts
Definition: irq_extra.h:115
ADUCM_UART_INT_ID
@ ADUCM_UART_INT_ID
Definition: irq_extra.h:81
rtc_irq_config
RTC interrupt configuration routine.
Definition: irq_extra.h:111
irq.h
Header file of IRQ interface.
uart_desc
Stucture holding the UART descriptor.
Definition: uart.h:120
gpio_irq_config
GPIO group interrupt configuration routine.
Definition: irq_extra.h:133
ADUCM_EXTERNAL_INT1_ID
@ ADUCM_EXTERNAL_INT1_ID
Definition: irq_extra.h:75
irq_mode
irq_mode
Trigger condition for the external interrupt.
Definition: irq_extra.h:94
IRQ_HIGH_LEVEL
@ IRQ_HIGH_LEVEL
Definition: irq_extra.h:102
irq_config::xint_conf
enum irq_mode xint_conf
Definition: irq_extra.h:148
ADUCM_EXTERNAL_INT0_ID
@ ADUCM_EXTERNAL_INT0_ID
Definition: irq_extra.h:73
NB_INTERRUPTS
#define NB_INTERRUPTS
Definition: irq_extra.h:57
gpio_irq_config::mode
enum gpio_irq_mode mode
Definition: irq_extra.h:137
irq_config::gpio_conf
struct gpio_irq_config * gpio_conf
Definition: irq_extra.h:152
aducm_irq_ctrl_desc
Stores specific platform parameters.
Definition: irq_extra.h:159
gpio_irq_config::gpio_handler
struct gpio_desc * gpio_handler
Definition: irq_extra.h:135
GPIO_GROUP_POSITIVE_EDGE
@ GPIO_GROUP_POSITIVE_EDGE
Definition: irq_extra.h:126
ADUCM_EXTERNAL_INT3_ID
@ ADUCM_EXTERNAL_INT3_ID
Definition: irq_extra.h:79
aducm_irq_ctrl_desc::conf
union irq_config conf[NB_INTERRUPTS]
Definition: irq_extra.h:161
aducm_irq_ops
const struct irq_platform_ops aducm_irq_ops
ADuCM3029 specific IRQ platform ops structure.
Definition: aducm3029_irq.c:468
gpio_irq_mode
gpio_irq_mode
Interrupt conditions for GPIO group interrupts.
Definition: irq_extra.h:122