![]() |
no-OS
|
Implementation of External IRQ driver for ADuCM302x. More...
#include "no_os_irq.h"#include "aducm3029_irq.h"#include "no_os_error.h"#include <stdlib.h>#include "no_os_uart.h"#include "aducm3029_uart.h"#include "no_os_rtc.h"#include "aducm3029_rtc.h"#include "no_os_gpio.h"#include <drivers/gpio/adi_gpio.h>#include <drivers/tmr/adi_tmr.h>#include "no_os_timer.h"#include "aducm3029_timer.h"#include "no_os_util.h"#include "no_os_list.h"#include "no_os_alloc.h"Classes | |
| struct | event_list |
| Struct that stores all the actions for a specific event. More... | |
Macros | |
| #define | BASE_XINT_NB (XINT_EVT0_IRQn) |
| #define | NB_EXT_INTERRUPTS 4u |
| #define | NB_INTERRUPT_CONTROLLERS 1u |
Functions | |
| int32_t | irq_action_cmp (void *data1, void *data2) |
| Action comparator function. | |
| int | aducm3029_irq_ctrl_init (struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param) |
| Initialized the controller for the ADuCM3029 external interrupts. | |
| int | aducm3029_irq_ctrl_remove (struct no_os_irq_ctrl_desc *desc) |
| Free the resources allocated by no_os_irq_ctrl_init() | |
| int | aducm3029_irq_register_callback (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc) |
| Registers a IRQ callback function to irq controller. | |
| int | aducm3029_irq_unregister_callback (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *cb) |
| Unregister IRQ handling function for the specified irq_id. | |
| int | aducm3029_irq_global_enable (struct no_os_irq_ctrl_desc *desc) |
| Enable all previously enabled interrupts by no_os_irq_enable(). | |
| int | aducm3029_irq_global_disable (struct no_os_irq_ctrl_desc *desc) |
| Disable all external interrupts. | |
| int | aducm3029_irq_enable (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
| Enable the interrupt. | |
| int | aducm3029_irq_disable (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
| Disable the interrupt. | |
Variables | |
| const struct no_os_irq_platform_ops | aducm_irq_ops |
| Aducm3029 platform specific IRQ platform ops structure. | |
Implementation of External IRQ driver for ADuCM302x.
Copyright 2019(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| #define BASE_XINT_NB (XINT_EVT0_IRQn) |
The number of the first external interrupt, used by NVIC
| #define NB_EXT_INTERRUPTS 4u |
Number of available external interrupts
| #define NB_INTERRUPT_CONTROLLERS 1u |
Number of interrupts controllers available
| int aducm3029_irq_ctrl_init | ( | struct no_os_irq_ctrl_desc ** | desc, |
| const struct no_os_irq_init_param * | param ) |
Initialized the controller for the ADuCM3029 external interrupts.
| desc | - Pointer where the configured instance is stored |
| param | - Configuration information for the instance |
| int aducm3029_irq_ctrl_remove | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Free the resources allocated by no_os_irq_ctrl_init()
| desc | - Interrupt controller descriptor. |
| int aducm3029_irq_disable | ( | struct no_os_irq_ctrl_desc * | desc, |
| uint32_t | irq_id ) |
Disable the interrupt.
| desc | - Interrupt controller descriptor. |
| irq_id | - Id of the interrupt |
| int aducm3029_irq_enable | ( | struct no_os_irq_ctrl_desc * | desc, |
| uint32_t | irq_id ) |
Enable the interrupt.
In order for the irq_id interrupt to be triggered the GPIO associated pin must be set as input.
The associated values are:
| desc | - Interrupt controller descriptor. |
| irq_id | - Id of the interrupt |
| int aducm3029_irq_global_disable | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Disable all external interrupts.
| desc | - Interrupt controller descriptor. |
| int aducm3029_irq_global_enable | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Enable all previously enabled interrupts by no_os_irq_enable().
| desc | - Interrupt controller descriptor. |
| int aducm3029_irq_register_callback | ( | struct no_os_irq_ctrl_desc * | desc, |
| uint32_t | irq_id, | ||
| struct no_os_callback_desc * | callback_desc ) |
Registers a IRQ callback function to irq controller.
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
| callback_desc | - Descriptor of the callback. If it is NULL, the callback will be unregistered |
| int aducm3029_irq_unregister_callback | ( | struct no_os_irq_ctrl_desc * | desc, |
| uint32_t | irq_id, | ||
| struct no_os_callback_desc * | cb ) |
| int32_t irq_action_cmp | ( | void * | data1, |
| void * | data2 ) |
Action comparator function.
irq_action compare function
| data1 | - List element |
| data2 | - Key |
| const struct no_os_irq_platform_ops aducm_irq_ops |
Aducm3029 platform specific IRQ platform ops structure.
ADuCM3029 specific IRQ platform ops structure.