PDK API Guide for J721E
|
HWIP interface
Files | |
file | HwiP.h |
Hardware Interrupt module for the RTOS Porting Interface. | |
Data Structures | |
struct | HwiP_Params |
Basic HwiP Parameters. More... | |
Functions | |
void | HwiP_clearInterrupt (int32_t interruptNum) |
Function to clear a single interrupt. More... | |
HwiP_Handle | HwiP_create (int32_t interruptNum, HwiP_Fxn hwiFxn, const HwiP_Params *hwipParams) |
Function to create an interrupt on CortexM devices. More... | |
HwiP_Status | HwiP_delete (HwiP_Handle hwiPhandle) |
Function to delete an interrupt on CortexM devices. More... | |
uintptr_t | HwiP_disable (void) |
Function to disable interrupts to enter a critical region. More... | |
void | HwiP_disableInterrupt (int32_t interruptNum) |
Function to disable a single interrupt. More... | |
void | HwiP_enableInterrupt (int32_t interruptNum) |
Function to enable a single interrupt. More... | |
void | HwiP_Params_init (HwiP_Params *hwipParams) |
Initialize params structure to default values. More... | |
void | HwiP_restore (uintptr_t key) |
Function to restore interrupts to exit a critical region. More... | |
HwiP_Handle | HwiP_getHandle (int32_t interruptNum) |
Function to get HwiP Handle from an interrupt number. More... | |
int32_t | HwiP_getEventId (int32_t interruptNum) |
Function to get the eventId associated with an interrupt number. More... | |
int32_t | HwiP_post (uint32_t interruptNum) |
Function to post the Hwi interrupt by software. More... | |
Typedefs | |
typedef void * | HwiP_Handle |
Opaque client reference to an instance of a HwiP. More... | |
typedef void(* | HwiP_Fxn) (uintptr_t arg) |
Prototype for the entry function for a hardware interrupt. More... | |
Enumerations | |
enum | HwiP_Status { HwiP_OK = 0, HwiP_FAILURE = (-(int32_t)1) } |
Status codes for HwiP APIs. More... | |
enum | OSAL_armGicTrigType_t { OSAL_ARM_GIC_TRIG_TYPE_LEVEL = 1, OSAL_ARM_GIC_TRIG_TYPE_EDGE = 2, OSAL_ARM_GIC_TRIG_TYPE_HIGH_LEVEL = 3, OSAL_ARM_GIC_TRIG_TYPE_LOW_LEVEL = 4, OSAL_ARM_GIC_TRIG_TYPE_RISING_EDGE = 5, OSAL_ARM_GIC_TRIG_TYPE_FALLING_EDGE = 6 } |
Enumerates the types different trigger types. Please refer to Section 4.3.13 Interrupt Configuration Registers, GICD_ICFGRn of ARMŽ Generic Interrupt Controller Architecture version 2.0 Architecture Specification document for details. More... | |
Macros | |
#define | HWIP_USE_DEFAULT_PRIORITY (~((uint32_t)0)) |
#define HWIP_USE_DEFAULT_PRIORITY (~((uint32_t)0)) |
typedef void* HwiP_Handle |
Opaque client reference to an instance of a HwiP.
A HwiP_Handle returned from the HwiP_create represents that instance.
typedef void(* HwiP_Fxn) (uintptr_t arg) |
Prototype for the entry function for a hardware interrupt.
enum HwiP_Status |
Enumerates the types different trigger types. Please refer to Section 4.3.13 Interrupt Configuration Registers, GICD_ICFGRn of ARMŽ Generic Interrupt Controller Architecture version 2.0 Architecture Specification document for details.
void HwiP_clearInterrupt | ( | int32_t | interruptNum | ) |
Function to clear a single interrupt.
interruptNum | interrupt number to clear |
HwiP_Handle HwiP_create | ( | int32_t | interruptNum, |
HwiP_Fxn | hwiFxn, | ||
const HwiP_Params * | hwipParams | ||
) |
Function to create an interrupt on CortexM devices.
interruptNum | Interrupt Vector Id |
hwiFxn | entry function of the hardware interrupt |
hwipParams | Pointer to the instance configuration parameters. NULL denotes to use the default parameters. The HwiP default parameters are noted in HwiP_Params_init. |
HwiP_Status HwiP_delete | ( | HwiP_Handle | hwiPhandle | ) |
Function to delete an interrupt on CortexM devices.
hwiPhandle | returned from the HwiP_create call |
uintptr_t HwiP_disable | ( | void | ) |
Function to disable interrupts to enter a critical region.
This function can be called multiple times, but must unwound in the reverse order. For example
void HwiP_disableInterrupt | ( | int32_t | interruptNum | ) |
Function to disable a single interrupt.
interruptNum | interrupt number to disable |
void HwiP_enableInterrupt | ( | int32_t | interruptNum | ) |
Function to enable a single interrupt.
interruptNum | interrupt number to enable |
void HwiP_Params_init | ( | HwiP_Params * | hwipParams | ) |
Initialize params structure to default values.
The default parameters are:
hwipParams | Pointer to the instance configuration parameters. |
void HwiP_restore | ( | uintptr_t | key | ) |
Function to restore interrupts to exit a critical region.
key | return from HwiP_disable |
HwiP_Handle HwiP_getHandle | ( | int32_t | interruptNum | ) |
Function to get HwiP Handle from an interrupt number.
interruptNum | the interrupt number |
int32_t HwiP_getEventId | ( | int32_t | interruptNum | ) |
Function to get the eventId associated with an interrupt number.
interruptNum | the interrupt number |
int32_t HwiP_post | ( | uint32_t | interruptNum | ) |
Function to post the Hwi interrupt by software.
interruptNum | the interrupt number |