Header file of IRQ interface. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | no_os_irq_init_param |
Structure holding the initial parameters for Interrupt Request. More... | |
struct | no_os_irq_ctrl_desc |
struct | no_os_callback_desc |
Structure describing a callback to be registered. More... | |
struct | no_os_irq_platform_ops |
Structure holding IRQ function pointers that point to the platform specific function. More... | |
Enumerations | |
enum | no_os_irq_uart_event_e { NO_OS_IRQ_WRITE_DONE , NO_OS_IRQ_READ_DONE , NO_OS_IRQ_ERROR } |
Possible events for uart interrupt. More... | |
enum | no_os_irq_event { NO_OS_EVT_GPIO , NO_OS_EVT_UART_TX_COMPLETE , NO_OS_EVT_UART_RX_COMPLETE , NO_OS_EVT_UART_ERROR , NO_OS_EVT_RTC , NO_OS_EVT_XINT , NO_OS_EVT_TIM_ELAPSED , NO_OS_EVT_TIM_PWM_PULSE_FINISHED , NO_OS_EVT_LPTIM_PWM_PULSE_FINISHED , NO_OS_EVT_DMA_RX_COMPLETE , NO_OS_EVT_DMA_RX_HALF_COMPLETE , NO_OS_EVT_DMA_TX_COMPLETE , NO_OS_EVT_USB } |
enum | no_os_irq_trig_level { NO_OS_IRQ_LEVEL_LOW , NO_OS_IRQ_LEVEL_HIGH , NO_OS_IRQ_EDGE_FALLING , NO_OS_IRQ_EDGE_RISING , NO_OS_IRQ_EDGE_BOTH } |
enum | no_os_irq_peripheral { NO_OS_GPIO_IRQ , NO_OS_UART_IRQ , NO_OS_RTC_IRQ , NO_OS_TIM_IRQ , NO_OS_LPTIM_IRQ , NO_OS_TDM_DMA_IRQ , NO_OS_TIM_DMA_IRQ , NO_OS_SPI_DMA_IRQ , NO_OS_DMA_IRQ , NO_OS_USB_IRQ } |
Functions | |
int | no_os_irq_ctrl_init (struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param) |
Initialize the IRQ interrupts. | |
int | no_os_irq_ctrl_remove (struct no_os_irq_ctrl_desc *desc) |
Free the resources allocated by no_os_irq_ctrl_init(). | |
int | 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. | |
int | no_os_irq_unregister_callback (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc) |
Unregisters a generic IRQ handling function. | |
int | no_os_irq_global_enable (struct no_os_irq_ctrl_desc *desc) |
Enable global interrupts. | |
int | no_os_irq_global_disable (struct no_os_irq_ctrl_desc *desc) |
Disable global interrupts. | |
int | 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. | |
int | no_os_irq_enable (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
Enable specific interrupt. | |
int | no_os_irq_disable (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
Disable specific interrupt. | |
int | no_os_irq_set_priority (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, uint32_t priority_level) |
Set the priority for an interrupt. | |
int | no_os_irq_get_priority (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, uint32_t *priority_level) |
Get the priority for an interrupt. | |
int | no_os_irq_clear_pending (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
Clear the pending interrupt. | |
Header file of IRQ interface.
Copyright 2019(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
enum no_os_irq_event |
enum no_os_irq_peripheral |
enum no_os_irq_trig_level |
Possible events for uart interrupt.
Enumerator | |
---|---|
NO_OS_IRQ_WRITE_DONE | Write operation finalized |
NO_OS_IRQ_READ_DONE | Read operation finalized |
NO_OS_IRQ_ERROR | An error occurred |
int no_os_irq_clear_pending | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id ) |
Clear the pending interrupt.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
int no_os_irq_ctrl_init | ( | struct no_os_irq_ctrl_desc ** | desc, |
const struct no_os_irq_init_param * | param ) |
Initialize the IRQ interrupts.
desc | - The IRQ descriptor. |
param | - The structure that contains the IRQ parameters. |
int no_os_irq_ctrl_remove | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Free the resources allocated by no_os_irq_ctrl_init().
desc | - The SPI descriptor. |
int no_os_irq_disable | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id ) |
Disable specific interrupt.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
int no_os_irq_enable | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id ) |
Enable specific interrupt.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
int no_os_irq_get_priority | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
uint32_t * | priority_level ) |
Get the priority for an interrupt.
Get the priority level for a specific interrupt
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
priority_level | - The priority level of the interrupt. |
int no_os_irq_global_disable | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Disable global interrupts.
int no_os_irq_global_enable | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Enable global interrupts.
int no_os_irq_register_callback | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
struct no_os_callback_desc * | callback ) |
Register a callback to handle the irq events.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
callback | - Callback descriptor - platform specific type. |
int no_os_irq_set_priority | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
uint32_t | priority_level ) |
Set the priority for an interrupt.
Set the priority level for a specific interrupt
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
priority_level | - The priority level of the interrupt. |
int 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.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
trig | - New trigger level for the interrupt. |
int no_os_irq_unregister_callback | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
struct no_os_callback_desc * | callback ) |
Unregisters a generic IRQ handling function.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
callback | - Callback descriptor - platform specific type. |