no-OS
maxim_irq.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef MAXIM_IRQ_H_
34 #define MAXIM_IRQ_H_
35 
36 #include "max32650.h"
37 #include "no_os_irq.h"
38 #include "no_os_list.h"
39 #include "uart.h"
40 
44 struct irq_action {
45  uint32_t irq_id;
46  void *handle;
47  void (*callback)(void *context);
48  void *ctx;
49 };
50 
54 struct event_list {
56  struct no_os_list_desc *actions;
57 };
58 
62 extern const struct no_os_irq_platform_ops max_irq_ops;
63 
67 void max_uart_callback(mxc_uart_req_t *, int);
68 
72 int32_t irq_action_cmp(void *data1, void *data2);
73 
74 #endif
is_callback
bool is_callback
Definition: maxim_uart.c:55
no_os_list_desc
Structure storing the list and function wrapper for usual list types.
Definition: no_os_list.h:228
DMA12_IRQHandler
void DMA12_IRQHandler()
Definition: maxim_irq.c:279
no_os_alloc.h
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim platform specific irq platform ops structure
Definition: maxim_irq.c:657
no_os_list_get_last
int32_t no_os_list_get_last(struct no_os_list_desc *list_desc, void **data)
NO_OS_EVT_UART_RX_COMPLETE
@ NO_OS_EVT_UART_RX_COMPLETE
Definition: no_os_irq.h:64
DMA1_IRQHandler
void DMA1_IRQHandler()
Definition: maxim_irq.c:224
no_os_list_read_find
int32_t no_os_list_read_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
Board_Init
int Board_Init(void)
Definition: maxim_init.c:45
maxim_irq.h
Header file for maxim irq specifics.
max_irq_disable
int32_t max_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable a specific interrupt.
Definition: maxim_irq.c:624
irq_action::ctx
void * ctx
Definition: aducm3029_irq.h:125
no_os_irq.h
Header file of IRQ interface.
max_irq_ctrl_init
int32_t max_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the interrupt controller.
Definition: maxim_irq.c:376
no_os_list_get_find
int32_t no_os_list_get_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
MAX_UART_ERROR_FLAGS
#define MAX_UART_ERROR_FLAGS
Definition: maxim_irq.c:53
MAX_UART_ERROR_FLAGS
#define MAX_UART_ERROR_FLAGS
Definition: maxim_irq.c:52
MAX_UART_ERROR_FLAGS
#define MAX_UART_ERROR_FLAGS
Definition: maxim_irq.c:48
max_irq_register_callback
int32_t max_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback function to be triggered when an interrupt occurs.
Definition: maxim_irq.c:433
no_os_list_get_first
int32_t no_os_list_get_first(struct no_os_list_desc *list_desc, void **data)
NO_OS_EVT_USB
@ NO_OS_EVT_USB
Definition: no_os_irq.h:73
DMA2_IRQHandler
void DMA2_IRQHandler()
Definition: maxim_irq.c:229
DMA15_IRQHandler
void DMA15_IRQHandler()
Definition: maxim_irq.c:294
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
USB_IRQHandler
void USB_IRQHandler(void)
Definition: maxim_irq.c:317
max_irq_unregister_callback
int32_t max_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *cb)
Unregister a callback function.
Definition: maxim_irq.c:529
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
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
DMA8_IRQHandler
void DMA8_IRQHandler()
Definition: maxim_irq.c:259
NO_OS_RTC_IRQ
@ NO_OS_RTC_IRQ
Definition: no_os_irq.h:87
no_os_irq_init_param::extra
void * extra
Definition: no_os_irq.h:116
no_os_callback_desc::peripheral
enum no_os_irq_peripheral peripheral
Definition: no_os_irq.h:150
maxim_irq.h
Header file for maxim irq specifics.
DMA0_IRQHandler
void DMA0_IRQHandler()
Definition: maxim_irq.c:219
NO_OS_EVT_UART_TX_COMPLETE
@ NO_OS_EVT_UART_TX_COMPLETE
Definition: no_os_irq.h:63
NO_OS_LIST_PRIORITY_LIST
@ NO_OS_LIST_PRIORITY_LIST
Definition: no_os_list.h:225
DMA9_IRQHandler
void DMA9_IRQHandler()
Definition: maxim_irq.c:264
max_irq_global_enable
int32_t max_irq_global_enable(struct no_os_irq_ctrl_desc *desc)
Enable all interrupts.
Definition: maxim_irq.c:583
maxim_irq.h
Header file for maxim irq specifics.
RTC_IRQHandler
void RTC_IRQHandler()
Definition: maxim_irq.c:299
NO_OS_EVT_TIM_ELAPSED
@ NO_OS_EVT_TIM_ELAPSED
Definition: no_os_irq.h:68
NO_OS_USB_IRQ
@ NO_OS_USB_IRQ
Definition: no_os_irq.h:93
MAX_UART_ERROR_FLAGS
#define MAX_UART_ERROR_FLAGS
Definition: maxim_irq.c:52
MAX_UART_ERROR_FLAGS
#define MAX_UART_ERROR_FLAGS
Definition: maxim_irq.c:52
no_os_callback_desc::ctx
void * ctx
Definition: no_os_irq.h:146
DMA13_IRQHandler
void DMA13_IRQHandler()
Definition: maxim_irq.c:284
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim specific IRQ platform ops structure
Definition: maxim_irq.c:657
max_uart_callback
void max_uart_callback(mxc_uart_req_t *, int)
Platform specific uart callback function.
Definition: maxim_irq.c:338
NO_OS_SPI_DMA_IRQ
@ NO_OS_SPI_DMA_IRQ
Definition: no_os_irq.h:91
uart_irq_state
mxc_uart_req_t uart_irq_state[MXC_UART_INSTANCES]
Descriptors to hold the state of nonblocking read and writes on each port.
Definition: maxim_uart.c:54
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
irq_action::callback
void(* callback)(void *context)
Definition: aducm3029_irq.h:123
NO_OS_TIM_IRQ
@ NO_OS_TIM_IRQ
Definition: no_os_irq.h:88
event_list::actions
struct no_os_list_desc * actions
Definition: aducm3029_irq.c:85
maxim_irq.h
Header file for maxim irq specifics.
no_os_list_add_first
int32_t no_os_list_add_first(struct no_os_list_desc *list_desc, void *data)
NO_OS_EVT_RTC
@ NO_OS_EVT_RTC
Definition: no_os_irq.h:66
MAX_UART_ERROR_FLAGS
#define MAX_UART_ERROR_FLAGS
Definition: maxim_irq.c:52
no_os_callback_desc::handle
void * handle
Definition: no_os_irq.h:152
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:144
irq_action_cmp
int32_t irq_action_cmp(void *data1, void *data2)
irq_action compare function
Definition: aducm3029_irq.c:74
max_uart_callback
void max_uart_callback(mxc_uart_req_t *req, int result)
UART callback function that sets the event and further calls the user registered callback.
Definition: maxim_irq.c:338
irq_action::handle
void * handle
Definition: aducm3029_irq.h:121
DMA11_IRQHandler
void DMA11_IRQHandler()
Definition: maxim_irq.c:274
no_os_list_remove
int32_t no_os_list_remove(struct no_os_list_desc *list_desc)
NO_OS_EVT_DMA_TX_COMPLETE
@ NO_OS_EVT_DMA_TX_COMPLETE
Definition: no_os_irq.h:72
irq_action::irq_id
uint32_t irq_id
Definition: aducm3029_irq.h:119
no_os_list_read_first
int32_t no_os_list_read_first(struct no_os_list_desc *list_desc, void **data)
DMA7_IRQHandler
void DMA7_IRQHandler()
Definition: maxim_irq.c:254
max_irq_trigger_level_set
int32_t max_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig_l)
Unused.
Definition: maxim_irq.c:571
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: aducm3029_irq.h:62
max_irq_enable
int32_t max_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable a specific interrupt.
Definition: maxim_irq.c:608
max_irq_global_disable
int32_t max_irq_global_disable(struct no_os_irq_ctrl_desc *desc)
Disable all interrupts.
Definition: maxim_irq.c:595
no_os_callback_desc::event
enum no_os_irq_event event
Definition: no_os_irq.h:148
no_os_init
__weak int no_os_init(void)
Definition: maxim_init.c:38
NO_OS_EVT_DMA_RX_COMPLETE
@ NO_OS_EVT_DMA_RX_COMPLETE
Definition: no_os_irq.h:70
event_list
Struct that stores all the actions for a specific event.
Definition: aducm3029_irq.c:83
max_irq_ctrl_remove
int32_t max_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Free the resources allocated by no_os_irq_ctrl_init()
Definition: maxim_irq.c:407
DMA14_IRQHandler
void DMA14_IRQHandler()
Definition: maxim_irq.c:289
DMA5_IRQHandler
void DMA5_IRQHandler()
Definition: maxim_irq.c:244
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
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
no_os_init.h
irq_action
Struct used to store a (peripheral, callback) pair.
Definition: aducm3029_irq.h:117
no_os_list.h
List library header.
event_list::event
enum no_os_irq_event event
Definition: aducm3029_irq.c:84
DMA3_IRQHandler
void DMA3_IRQHandler()
Definition: maxim_irq.c:234
NULL
#define NULL
Definition: wrapper.h:64
no_os_irq_ctrl_desc::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:125
maxim_irq.h
Header file for maxim irq specifics.
NO_OS_EVT_GPIO
@ NO_OS_EVT_GPIO
Definition: no_os_irq.h:62
DMA10_IRQHandler
void DMA10_IRQHandler()
Definition: maxim_irq.c:269
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
NO_OS_UART_IRQ
@ NO_OS_UART_IRQ
Definition: no_os_irq.h:86
no_os_irq_event
no_os_irq_event
Definition: no_os_irq.h:61
DMA6_IRQHandler
void DMA6_IRQHandler()
Definition: maxim_irq.c:249
NO_OS_EVT_UART_ERROR
@ NO_OS_EVT_UART_ERROR
Definition: no_os_irq.h:65
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:160
maxim_irq.h
Header file for maxim irq specifics.
uart
struct no_os_uart_desc * uart
Definition: main.c:74
UART0_IRQHandler
void UART0_IRQHandler()
Definition: maxim_irq.c:144
no_os_uart.h
Header file of UART interface.
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_util.h
Header file of utility functions.
MAX_DMA
#define MAX_DMA
Definition: maxim_dma.h:54
no_os_irq_ctrl_desc
Definition: no_os_irq.h:123
maxim_irq.h
Header file for maxim irq specifics.
no_os_irq_ctrl_desc::extra
void * extra
Definition: no_os_irq.h:134
maxim_dma.h
Maxim platform specific header DMA API.
errno.h
Error macro definition for ARM Compiler.
NO_OS_DMA_IRQ
@ NO_OS_DMA_IRQ
Definition: no_os_irq.h:92
DMA4_IRQHandler
void DMA4_IRQHandler()
Definition: maxim_irq.c:239
irq_action_cmp
int32_t irq_action_cmp(void *data1, void *data2)
Action comparator function.
Definition: maxim_irq.c:83