no-OS
|
Implementation of external irq driver. More...
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
#include "no_os_list.h"
#include "no_os_irq.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "stm32_irq.h"
Classes | |
struct | irq_action |
Struct used to store a (peripheral, callback) pair. More... | |
struct | event_list |
Struct that stores all the actions for a specific event. More... | |
Functions | |
void | _TxCpltCallback (UART_HandleTypeDef *huart) |
void | _RxCpltCallback (UART_HandleTypeDef *huart) |
void | _ErrorCallback (UART_HandleTypeDef *huart) |
int32_t | stm32_irq_ctrl_init (struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param) |
Initialized the controller for the STM32 external interrupts. More... | |
int32_t | stm32_irq_ctrl_remove (struct no_os_irq_ctrl_desc *desc) |
Free the resources allocated by irq_ctrl_init() More... | |
int32_t | stm32_trigger_level_set (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level level) |
Unused. More... | |
int32_t | stm32_irq_register_callback (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *cb) |
Register a callback. More... | |
int32_t | stm32_irq_unregister_callback (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *cb) |
Unregister a callback. More... | |
int32_t | stm32_irq_global_enable (struct no_os_irq_ctrl_desc *desc) |
Enable all interrupts. More... | |
int32_t | stm32_irq_global_disable (struct no_os_irq_ctrl_desc *desc) |
Disable all interrupts. More... | |
int32_t | stm32_irq_enable (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
Enable a specific interrupt. More... | |
int32_t | stm32_irq_disable (struct no_os_irq_ctrl_desc *desc, uint32_t irq_id) |
Disable a specific interrupt. More... | |
Variables | |
const struct no_os_irq_platform_ops | stm32_irq_ops |
stm32 specific IRQ platform ops structure More... | |
Implementation of external irq driver.
Copyright 2022(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.
void _ErrorCallback | ( | UART_HandleTypeDef * | huart | ) |
void _RxCpltCallback | ( | UART_HandleTypeDef * | huart | ) |
void _TxCpltCallback | ( | UART_HandleTypeDef * | huart | ) |
int32_t stm32_irq_ctrl_init | ( | struct no_os_irq_ctrl_desc ** | desc, |
const struct no_os_irq_init_param * | param | ||
) |
Initialized the controller for the STM32 external interrupts.
desc | - Pointer where the configured instance is stored |
param | - Configuration information for the instance |
int32_t stm32_irq_ctrl_remove | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Free the resources allocated by irq_ctrl_init()
desc | - Interrupt controller descriptor. |
int32_t stm32_irq_disable | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id | ||
) |
Disable a specific interrupt.
desc | - Interrupt controller descriptor. |
irq_id | - Interrupt identifier |
int32_t stm32_irq_enable | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id | ||
) |
Enable a specific interrupt.
desc | - Interrupt controller descriptor. |
irq_id | - Interrupt identifier |
int32_t stm32_irq_global_disable | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Disable all interrupts.
desc | - Interrupt controller descriptor. |
int32_t stm32_irq_global_enable | ( | struct no_os_irq_ctrl_desc * | desc | ) |
Enable all interrupts.
desc | - Interrupt controller descriptor. |
int32_t stm32_irq_register_callback | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
struct no_os_callback_desc * | cb | ||
) |
Register a callback.
desc | - The IRQ controller descriptor. |
irq_id | - Interrupt identifier. |
cb | - Descriptor of the callback. |
int32_t stm32_irq_unregister_callback | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
struct no_os_callback_desc * | cb | ||
) |
Unregister a callback.
desc | - Interrupt controller descriptor. |
irq_id | - Id of the interrupt |
cb | - Descriptor of the callback. |
int32_t stm32_trigger_level_set | ( | struct no_os_irq_ctrl_desc * | desc, |
uint32_t | irq_id, | ||
enum no_os_irq_trig_level | level | ||
) |
Unused.
desc | -irq descriptor. |
irq_id | - The interrupt vector entry id of the peripheral. |
level | - the trigger condition. |
const struct no_os_irq_platform_ops stm32_irq_ops |
stm32 specific IRQ platform ops structure
stm32 platform specific irq platform ops structure