Implementation of the IRQ Interface.
More...
#include <inttypes.h>
#include <stdlib.h>
#include "no_os_irq.h"
#include "no_os_error.h"
|
| 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) |
| | 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) |
| | 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.
|
| |
| int | no_os_irq_set_pending (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
| | Set pending interrupt.
|
| |
Implementation of the IRQ Interface.
- Author
- Andrei Porumb (andre.nosp@m.i.po.nosp@m.rumb@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2021(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ no_os_irq_clear_pending()
Clear the pending interrupt.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
- Returns
- 0 in case of success, negative errno error codes.
◆ no_os_irq_ctrl_init()
Initialize the IRQ interrupts.
- Parameters
-
| desc | - The IRQ descriptor. |
| param | - The structure that contains the IRQ parameters. |
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_ctrl_remove()
Free the resources allocated by no_os_irq_ctrl_init().
- Parameters
-
| desc | - The SPI descriptor. |
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_disable()
Disable specific interrupt.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_enable()
Enable specific interrupt.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_get_priority()
| 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.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
| priority_level | - The priority level of the interrupt. |
- Returns
- 0 in case of success, negative errno error codes.
◆ no_os_irq_global_disable()
Disable global interrupts.
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_global_enable()
Enable global interrupts.
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_register_callback()
Register a callback to handle the irq events.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
| callback | - Callback descriptor - platform specific type. |
- Returns
- SUCCESS in case of success, FAILURE otherwise.
◆ no_os_irq_set_pending()
Set pending interrupt.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
- Returns
- 0 in case of success, negative errno error codes.
◆ no_os_irq_set_priority()
| 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.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
| priority_level | - The priority level of the interrupt. |
- Returns
- 0 in case of success, negative errno error codes.
◆ no_os_irq_trigger_level_set()
Set interrupt trigger level.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
| trig | - New trigger level for the interrupt. |
- Returns
- 0 in case of success, -1 otherwise.
◆ no_os_irq_unregister_callback()
Unregisters a generic IRQ handling function.
- Parameters
-
| desc | - The IRQ controller descriptor. |
| irq_id | - Interrupt identifier. |
| callback | - Callback descriptor - platform specific type. |
- Returns
- SUCCESS in case of success, FAILURE otherwise.