no-OS
maxim_irq.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef MAXIM_IRQ_H_
40 #define MAXIM_IRQ_H_
41 
42 #include "max32650.h"
43 #include "no_os_irq.h"
44 #include "uart.h"
45 
49 struct irq_action {
50  uint32_t irq_id;
51  void *handle;
52  void (*callback)(void *context);
53  void *ctx;
54 };
55 
59 struct event_list {
61  struct no_os_list_desc *actions;
62 };
63 
67 extern const struct no_os_irq_platform_ops max_irq_ops;
68 
72 void max_uart_callback(mxc_uart_req_t *, int);
73 
77 int32_t irq_action_cmp(void *data1, void *data2);
78 
79 #endif
is_callback
bool is_callback
Definition: maxim_uart.c:61
maxim_rtc.h
Header file of RTC driver.
no_os_list_desc
Structure storing the list and function wrapper for usual list types.
Definition: no_os_list.h:234
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim platform specific irq platform ops structure
Definition: maxim_irq.c:572
NO_OS_EVT_UART_RX_COMPLETE
@ NO_OS_EVT_UART_RX_COMPLETE
Definition: no_os_irq.h:70
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:136
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:539
irq_action::ctx
void * ctx
Definition: aducm3029_irq.h:131
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:249
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_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:299
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:166
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:444
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
NO_OS_RTC_IRQ
@ NO_OS_RTC_IRQ
Definition: no_os_irq.h:88
no_os_irq_init_param::extra
void * extra
Definition: no_os_irq.h:112
no_os_callback_desc::peripheral
enum no_os_irq_peripheral peripheral
Definition: no_os_irq.h:154
maxim_rtc.h
Header file of RTC driver.
maxim_irq.h
Header file for maxim irq specifics.
NO_OS_EVT_UART_TX_COMPLETE
@ NO_OS_EVT_UART_TX_COMPLETE
Definition: no_os_irq.h:69
NO_OS_LIST_PRIORITY_LIST
@ NO_OS_LIST_PRIORITY_LIST
Definition: no_os_list.h:231
max_irq_global_enable
int32_t max_irq_global_enable(struct no_os_irq_ctrl_desc *desc)
Enable all interrupts.
Definition: maxim_irq.c:498
RTC_IRQHandler
void RTC_IRQHandler()
Definition: maxim_irq.c:190
NO_OS_EVT_TIM_ELAPSED
@ NO_OS_EVT_TIM_ELAPSED
Definition: no_os_irq.h:74
no_os_callback_desc::ctx
void * ctx
Definition: no_os_irq.h:148
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim specific IRQ platform ops structure
Definition: maxim_irq.c:572
max_uart_callback
void max_uart_callback(mxc_uart_req_t *, int)
Platform specific uart callback function.
Definition: maxim_irq.c:214
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:60
no_os_irq_trig_level
no_os_irq_trig_level
Definition: no_os_irq.h:77
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:105
irq_action::callback
void(* callback)(void *context)
Definition: aducm3029_irq.h:129
no_os_irq_ctrl_desc::platform_ops
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:123
NO_OS_TIM_IRQ
@ NO_OS_TIM_IRQ
Definition: no_os_irq.h:89
event_list::actions
struct no_os_list_desc * actions
Definition: aducm3029_irq.c:90
maxim_irq.h
Header file for maxim irq specifics.
no_os_irq_init_param::platform_ops
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:107
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:72
no_os_callback_desc::handle
void * handle
Definition: no_os_irq.h:156
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:138
irq_action_cmp
int32_t irq_action_cmp(void *data1, void *data2)
irq_action compare function
Definition: aducm3029_irq.c:79
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:214
irq_action::handle
void * handle
Definition: aducm3029_irq.h:127
maxim_rtc.h
Header file of RTC driver.
no_os_list_remove
int32_t no_os_list_remove(struct no_os_list_desc *list_desc)
no_os_rtc.h
Header of the RTC interface.
irq_action::irq_id
uint32_t irq_id
Definition: aducm3029_irq.h:125
no_os_list_read_first
int32_t no_os_list_read_first(struct no_os_list_desc *list_desc, void **data)
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:486
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: aducm3029_irq.h:68
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:523
max_irq_global_disable
int32_t max_irq_global_disable(struct no_os_irq_ctrl_desc *desc)
Disable all interrupts.
Definition: maxim_irq.c:510
no_os_callback_desc::event
enum no_os_irq_event event
Definition: no_os_irq.h:152
event_list
Struct that stores all the actions for a specific event.
Definition: aducm3029_irq.c:88
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:275
irq_action
Struct used to store a (peripheral, callback) pair.
Definition: aducm3029_irq.h:123
no_os_list.h
List library header.
maxim_rtc.h
Header file of RTC driver.
event_list::event
enum no_os_irq_event event
Definition: aducm3029_irq.c:89
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:121
maxim_irq.h
Header file for maxim irq specifics.
NO_OS_EVT_GPIO
@ NO_OS_EVT_GPIO
Definition: no_os_irq.h:68
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:103
NO_OS_UART_IRQ
@ NO_OS_UART_IRQ
Definition: no_os_irq.h:87
no_os_irq_event
no_os_irq_event
Definition: no_os_irq.h:67
maxim_rtc.h
Header file of RTC driver.
NO_OS_EVT_UART_ERROR
@ NO_OS_EVT_UART_ERROR
Definition: no_os_irq.h:71
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:164
maxim_irq.h
Header file for maxim irq specifics.
uart
struct no_os_uart_desc * uart
Definition: main.c:80
UART0_IRQHandler
void UART0_IRQHandler()
Definition: maxim_irq.c:143
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.
no_os_irq_ctrl_desc
Definition: no_os_irq.h:119
maxim_irq.h
Header file for maxim irq specifics.
no_os_irq_ctrl_desc::extra
void * extra
Definition: no_os_irq.h:128
errno.h
Error macro definition for ARM Compiler.
irq_action_cmp
int32_t irq_action_cmp(void *data1, void *data2)
Action comparator function.
Definition: maxim_irq.c:82