类型定义 | |
typedef UINT32 | HWI_HANDLE_T |
typedef UINT16 | HWI_PRIOR_T |
typedef UINT16 | HWI_MODE_T |
typedef UINTPTR | HWI_ARG_T |
typedef VOID(* | HWI_PROC_FUNC) (VOID) |
函数 | |
STATIC INLINE UINT32 | LOS_IntLock (VOID) |
Disable all interrupts. | 关闭当前处理器所有中断响应 更多... | |
STATIC INLINE UINT32 | LOS_IntUnLock (VOID) |
Enable all interrupts. | 打开当前处理器所有中断响应 更多... | |
STATIC INLINE VOID | LOS_IntRestore (UINT32 intSave) |
Restore interrupts. | 恢复到使用LOS_IntLock关闭所有中断之前的状态 更多... | |
UINT32 | LOS_GetSystemHwiMaximum (VOID) |
Gets the maximum number of interrupts supported by the system. 更多... | |
UINT32 | LOS_HwiCreate (HWI_HANDLE_T hwiNum, HWI_PRIOR_T hwiPrio, HWI_MODE_T hwiMode, HWI_PROC_FUNC hwiHandler, HwiIrqParam *irqParam) |
Create a hardware interrupt. 更多... | |
UINT32 | LOS_HwiDelete (HWI_HANDLE_T hwiNum, HwiIrqParam *irqParam) |
delete a hardware interrupt. 更多... | |
变量 | |
size_t | g_intCount [] |
中断次数,每个CPU都会记录响应中断的次数 更多... | |
typedef UINT32 HWI_HANDLE_T |
typedef UINT16 HWI_MODE_T |
typedef UINT16 HWI_PRIOR_T |
typedef VOID(* HWI_PROC_FUNC) (VOID) |
UINT32 LOS_GetSystemHwiMaximum | ( | VOID | ) |
Gets the maximum number of interrupts supported by the system.
None. |
None. |
Gets the maximum number of interrupts supported by the system.
UINT32 LOS_HwiCreate | ( | HWI_HANDLE_T | hwiNum, |
HWI_PRIOR_T | hwiPrio, | ||
HWI_MODE_T | hwiMode, | ||
HWI_PROC_FUNC | hwiHandler, | ||
HwiIrqParam * | irqParam | ||
) |
Create a hardware interrupt.
hwiNum | [IN] Type HWI_HANDLE_T: hardware interrupt number. for an ARM926 platform is [0,31]. |
hwiPrio | [IN] Type HWI_PRIOR_T: hardware interrupt priority. The value range is [0, GIC_MAX_INTERRUPT_PREEMPTION_LEVEL - 1] << PRIORITY_SHIFT. |
hwiMode | [IN] Type HWI_MODE_T: hardware interrupt mode. Ignore this parameter temporarily. |
hwiHandler | [IN] Type HWI_PROC_FUNC: interrupt handler used when a hardware interrupt is triggered. |
irqParam | [IN] Type HwiIrqParam: input parameter of the interrupt handler used when a hardware interrupt is triggered. |
#OS_ERRNO_HWI_PROC_FUNC_NULL | Null hardware interrupt handling function. |
#OS_ERRNO_HWI_NUM_INVALID | Invalid interrupt number. |
#OS_ERRNO_HWI_NO_MEMORY | Insufficient memory for hardware interrupt creation. |
#OS_ERRNO_HWI_ALREADY_CREATED | The interrupt handler being created has already been created. |
#LOS_OK | The interrupt is successfully created. |
Create a hardware interrupt.
hwiNum | 硬中断句柄编号 默认范围[0-127] |
hwiPrio | 硬中断优先级 |
hwiMode | 硬中断模式 共享和非共享 |
hwiHandler | 硬中断处理函数 |
irqParam | 硬中断处理函数参数 |
UINT32 LOS_HwiDelete | ( | HWI_HANDLE_T | hwiNum, |
HwiIrqParam * | irqParam | ||
) |
delete a hardware interrupt.
hwiNum | [IN] Type HWI_HANDLE_T: hardware interrupt number. |
irqParam | [IN] Type HwiIrqParam *: id of hardware interrupt which will base on when delete the hardware interrupt. |
#OS_ERRNO_HWI_NUM_INVALID | Invalid interrupt number. |
#OS_ERRNO_HWI_SHARED_ERROR | Invalid interrupt mode. |
#LOS_OK | The interrupt is successfully deleted. |
#LOS_NOK | The interrupt is failed deleted based on the pDev_ID. |
delete a hardware interrupt.
STATIC INLINE UINT32 LOS_IntLock | ( | VOID | ) |
STATIC INLINE VOID LOS_IntRestore | ( | UINT32 | intSave | ) |
Restore interrupts. | 恢复到使用LOS_IntLock关闭所有中断之前的状态
intSave | [IN] Type UINT32 : CPSR value obtained before all interrupts are disabled. |
None. |
STATIC INLINE UINT32 LOS_IntUnLock | ( | VOID | ) |