fix:Fixed kernel error with header protector and header comment description.
Close #I3O4SF Change-Id: I544cde728fb8131d199a21be440ae02da2fe21fb
This commit is contained in:
parent
8bf166b418
commit
3907238b0f
|
@ -179,7 +179,183 @@ extern UINT32 OsCpupInit(VOID);
|
|||
*/
|
||||
extern VOID OsTskCycleEndStart(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* Count the CPU usage structures of all tasks.
|
||||
*/
|
||||
typedef struct tagCpupInfo {
|
||||
UINT16 usStatus; /**< save the cur task status */
|
||||
UINT32 uwUsage; /**< Usage. The value range is [0,1000]. */
|
||||
} CPUP_INFO_S;
|
||||
|
||||
/**
|
||||
* @ingroup los_monitor
|
||||
* Type of the CPU usage query.
|
||||
*/
|
||||
typedef enum {
|
||||
SYS_CPU_USAGE = 0, /* system cpu occupancy rate */
|
||||
TASK_CPU_USAGE, /* task cpu occupancy rate */
|
||||
} CPUP_TYPE_E;
|
||||
|
||||
/**
|
||||
* @ingroup los_monitor
|
||||
* Mode of the CPU usage query.
|
||||
*/
|
||||
typedef enum {
|
||||
CPUP_IN_10S = 0, /* cpu occupancy rate in 10s */
|
||||
CPUP_IN_1S, /* cpu occupancy rate in 1s */
|
||||
CPUP_LESS_THAN_1S, /* cpu occupancy rate less than 1s, if the input mode is none of them, it will be this. */
|
||||
} CPUP_MODE_E;
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the current CPU usage.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the current CPU usage.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, error codes will be returned.</li>
|
||||
* <li> The precision of the CPU usage can be adjusted by changing the value of the CPUP_PRECISION macro.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #cpup [0,100], current CPU usage, of which the precision is adjustable.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_SysCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_SysCpuUsage(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the historical CPU usage.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the historical CPU usage.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param mode [IN] UINT16. Task mode. The parameter value 0 indicates that the CPU usage within 10s will be
|
||||
* obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained. Other values
|
||||
* indicate that the CPU usage in the period that is less than 1s will be obtained.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #cpup [0,100], historical CPU usage, of which the precision is adjustable.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_HistoryTaskCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_HistorySysCpuUsage(UINT16 mode);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the CPU usage of a specified task.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the CPU usage of a task specified by a passed-in task ID.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* <li>The passed-in task ID must be valid and the task specified by the task ID must be created. Otherwise,
|
||||
* the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param taskID [IN] UINT32. Task ID.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #OS_ERRNO_CPUP_TSK_ID_INVALID 0x02001e05: The target task ID is invalid.
|
||||
* @retval #OS_ERRNO_CPUP_THREAD_NO_CREATED 0x02001e04: The target thread is not created.
|
||||
* @retval #cpup [0,100], CPU usage of the specified task.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_HistoryTaskCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_TaskCpuUsage(UINT32 taskID);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the historical CPU usage of a specified task.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the historical CPU usage of a task specified by a passed-in task ID.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise,
|
||||
* the CPU usage fails to be obtained.</li>
|
||||
* <li>The passed-in task ID must be valid and the task specified by the task ID must be created. Otherwise,
|
||||
* the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param taskID [IN] UINT32. Task ID.
|
||||
* @param mode [IN] UINT16. Task mode. The parameter value 0 indicates that the CPU usage within 10s
|
||||
* will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained.
|
||||
* Other values indicate that the CPU usage in the period that is less than 1s will be obtained.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #OS_ERRNO_CPUP_TSK_ID_INVALID 0x02001e05: The target task ID is invalid.
|
||||
* @retval #OS_ERRNO_CPUP_THREAD_NO_CREATED 0x02001e04: The target thread is not created.
|
||||
* @retval #cpup [0,100], CPU usage of the specified task.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_HistorySysCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_HistoryTaskCpuUsage(UINT32 taskID, UINT16 mode);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the CPU usage of all tasks.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the CPU usage of all tasks according to maximum number of threads.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* <li>The input parameter pointer must not be NULL, Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param cpupInfo [OUT]Type. CPUP_INFO_S* Pointer to the task CPUP information structure to be obtained.
|
||||
* @param mode [IN] UINT16. Task mode. The parameter value 0 indicates that the CPU usage within 10s
|
||||
* will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained.
|
||||
* Other values indicate that the CPU usage in the period that is less than 1s will be obtained.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #OS_ERRNO_CPUP_TASK_PTR_NULL 0x02001e01: The input parameter pointer is NULL.
|
||||
* @retval #LOS_OK 0x00000000: The CPU usage of all tasks is successfully obtained.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_SysCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_AllTaskCpuUsage(CPUP_INFO_S *cpupInfo, UINT16 mode);
|
||||
|
||||
/**
|
||||
* @ingroup los_monitor
|
||||
* @brief Obtain CPU usage history of certain task.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain CPU usage history of certain task.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, -1 will be returned.</li>
|
||||
* <li> Only in SYS_CPU_USAGE type, uwTaskID is invalid.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param type [IN] cpup type, SYS_CPU_USAGE and TASK_CPU_USAGE
|
||||
* @param mode [IN] mode,CPUP_IN_10S = usage in 10s,CPUP_IN_1S = usage in last 1s,
|
||||
* CPUP_LESS_THAN_1S = less than 1s, if the inpuit mode is none of them, it will be as CPUP_LESS_THAN_1S.
|
||||
* @param taskID [IN] task ID, Only in SYS_CPU_USAGE type, taskID is invalid
|
||||
*
|
||||
* @retval #OS_ERROR -1:CPU usage info obtain failed.
|
||||
* @retval #LOS_OK 0:CPU usage info is successfully obtained.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_monitor.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_CpupUsageMonitor
|
||||
*/
|
||||
extern UINT32 LOS_CpupUsageMonitor(CPUP_TYPE_E type, CPUP_MODE_E mode, UINT32 taskID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ARCH_ATOMIC_H
|
||||
#define _LOS_ARCH_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
*
|
||||
* @retval #INT32 The previous value of the atomic variable
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
||||
|
@ -74,7 +74,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -89,7 +89,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
*
|
||||
* @retval #INT32 The return value of variable auto-decrement.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
||||
|
@ -110,7 +110,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable with compare.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -125,7 +125,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
* @retval TRUE The previous value of the atomic variable is not equal to oldVal.
|
||||
* @retval FALSE The previous value of the atomic variable is equal to oldVal.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
|
||||
|
@ -154,5 +154,4 @@ STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 ol
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
|
||||
#endif /* _LOS_ARCH_ATOMIC_H */
|
||||
|
|
|
@ -128,4 +128,3 @@ extern VOID HalStartToRun(VOID);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LOS_EXC_H
|
||||
#define _LOS_EXC_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_config.h"
|
||||
#include "los_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Maximum number of used hardware interrupts.
|
||||
*/
|
||||
#ifndef OS_HWI_MAX_NUM
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_HIGHEST
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_LOWEST
|
||||
|
@ -68,43 +68,43 @@ extern "C" {
|
|||
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef VOID (**HWI_VECTOR_FUNC)(void);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of interrupts.
|
||||
*/
|
||||
extern UINT32 g_intCount;
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core system interrupt vector.
|
||||
*/
|
||||
#define OS_SYS_VECTOR_CNT 16
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core interrupt vector.
|
||||
*/
|
||||
#define OS_VECTOR_CNT (OS_SYS_VECTOR_CNT + OS_HWI_MAX_NUM)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* AIRCR register priority group parameter .
|
||||
*/
|
||||
#define OS_NVIC_AIRCR_PRIGROUP 7
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Boot interrupt vector table.
|
||||
*/
|
||||
extern UINT32 _BootVectors[];
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -114,7 +114,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -124,7 +124,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -134,7 +134,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -144,7 +144,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -154,7 +154,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -164,7 +164,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -174,7 +174,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -184,7 +184,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* SysTick control and status register.
|
||||
*/
|
||||
#define OS_SYSTICK_CONTROL_REG 0xE000E010
|
||||
|
@ -196,135 +196,135 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_SYSTICK_CURRENT_REG 0xE000E018
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt Priority-Level Registers.
|
||||
*/
|
||||
#define OS_NVIC_PRI_BASE 0xE000E400
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt enable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_SETENA_BASE 0xE000E100
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* interrupt pending register.
|
||||
*/
|
||||
#define OS_NVIC_SETPEND_BASE 0xE000E200
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt active register.
|
||||
*/
|
||||
#define OS_NVIC_INT_ACT_BASE 0xE000E300
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt disable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt control and status register.
|
||||
*/
|
||||
#define OS_NVIC_INT_CTRL 0xE000ED04
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Vector table offset register.
|
||||
*/
|
||||
#define OS_NVIC_VTOR 0xE000ED08
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Application interrupt and reset control register
|
||||
*/
|
||||
#define OS_NVIC_AIRCR 0xE000ED0C
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* System exception priority register.
|
||||
*/
|
||||
#define OS_NVIC_EXCPRI_BASE 0xE000ED18
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 1 :reset.
|
||||
*/
|
||||
#define OS_EXC_RESET 1
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 2 :Non-Maskable Interrupt.
|
||||
*/
|
||||
#define OS_EXC_NMI 2
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 3 :(hard)fault.
|
||||
*/
|
||||
#define OS_EXC_HARD_FAULT 3
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 4 :MemManage fault.
|
||||
*/
|
||||
#define OS_EXC_MPU_FAULT 4
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 5 :Bus fault.
|
||||
*/
|
||||
#define OS_EXC_BUS_FAULT 5
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 6 :Usage fault.
|
||||
*/
|
||||
#define OS_EXC_USAGE_FAULT 6
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 11 :SVCall.
|
||||
*/
|
||||
#define OS_EXC_SVC_CALL 11
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 12 :Debug monitor.
|
||||
*/
|
||||
#define OS_EXC_DBG_MONITOR 12
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 14 :PendSV.
|
||||
*/
|
||||
#define OS_EXC_PEND_SV 14
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 15 :SysTick.
|
||||
*/
|
||||
#define OS_EXC_SYS_TICK 15
|
||||
|
||||
#if (OS_HWI_WITH_ARG == 1)
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector, VOID *arg);
|
||||
#else
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
||||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Hardware interrupt entry function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -337,13 +337,13 @@ extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalInterrupt(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Get an interrupt number.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -356,13 +356,13 @@ extern VOID HalInterrupt(VOID);
|
|||
*
|
||||
* @retval: Interrupt Indexes number.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalIntNumGet(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Default vector handling function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -375,14 +375,14 @@ extern UINT32 HalIntNumGet(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li
|
||||
></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalHwiDefaultHandler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Reset the vector table.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -395,13 +395,13 @@ extern VOID HalHwiDefaultHandler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID Reset_Handler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Pended System Call.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -415,7 +415,7 @@ extern VOID Reset_Handler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalPendSV(VOID);
|
||||
|
@ -516,13 +516,13 @@ typedef struct TagExcContext {
|
|||
UINT32 FPSCR;
|
||||
UINT32 NO_NAME;
|
||||
#endif
|
||||
}EXC_CONTEXT_S;
|
||||
} EXC_CONTEXT_S;
|
||||
|
||||
typedef VOID (*EXC_PROC_FUNC)(UINT32, EXC_CONTEXT_S *);
|
||||
VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT_S *excBufAddr);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Exception initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -535,7 +535,7 @@ VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT
|
|||
*
|
||||
* @retval: None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
VOID OsExcInit(VOID);
|
||||
|
@ -714,5 +714,4 @@ extern ExcInfo g_excInfo;
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_EXC_H */
|
||||
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -51,4 +51,3 @@ UINT32 HalTickStart(OS_TICK_HANDLER handler);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_TIMER_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ARCH_ATOMIC_H
|
||||
#define _LOS_ARCH_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
*
|
||||
* @retval #INT32 The previous value of the atomic variable
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
||||
|
@ -74,7 +74,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -89,7 +89,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
*
|
||||
* @retval #INT32 The return value of variable auto-decrement.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
||||
|
@ -110,7 +110,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable with compare.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -125,7 +125,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
* @retval TRUE The previous value of the atomic variable is not equal to oldVal.
|
||||
* @retval FALSE The previous value of the atomic variable is equal to oldVal.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
|
||||
|
@ -154,5 +154,4 @@ STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 ol
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
|
||||
#endif /* _LOS_ARCH_ATOMIC_H */
|
||||
|
|
|
@ -128,4 +128,3 @@ extern VOID HalStartToRun(VOID);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LOS_EXC_H
|
||||
#define _LOS_EXC_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_config.h"
|
||||
#include "los_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Maximum number of used hardware interrupts.
|
||||
*/
|
||||
#ifndef OS_HWI_MAX_NUM
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_HIGHEST
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_LOWEST
|
||||
|
@ -68,43 +68,43 @@ extern "C" {
|
|||
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef VOID (**HWI_VECTOR_FUNC)(void);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of interrupts.
|
||||
*/
|
||||
extern UINT32 g_intCount;
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core system interrupt vector.
|
||||
*/
|
||||
#define OS_SYS_VECTOR_CNT 16
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core interrupt vector.
|
||||
*/
|
||||
#define OS_VECTOR_CNT (OS_SYS_VECTOR_CNT + OS_HWI_MAX_NUM)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* AIRCR register priority group parameter .
|
||||
*/
|
||||
#define OS_NVIC_AIRCR_PRIGROUP 7
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Boot interrupt vector table.
|
||||
*/
|
||||
extern UINT32 _BootVectors[];
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -114,7 +114,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -124,7 +124,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -134,7 +134,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -144,7 +144,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -154,7 +154,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -164,7 +164,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -174,7 +174,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -184,7 +184,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* SysTick control and status register.
|
||||
*/
|
||||
#define OS_SYSTICK_CONTROL_REG 0xE000E010
|
||||
|
@ -196,135 +196,135 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_SYSTICK_CURRENT_REG 0xE000E018
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt Priority-Level Registers.
|
||||
*/
|
||||
#define OS_NVIC_PRI_BASE 0xE000E400
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt enable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_SETENA_BASE 0xE000E100
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* interrupt pending register.
|
||||
*/
|
||||
#define OS_NVIC_SETPEND_BASE 0xE000E200
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt active register.
|
||||
*/
|
||||
#define OS_NVIC_INT_ACT_BASE 0xE000E300
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt disable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt control and status register.
|
||||
*/
|
||||
#define OS_NVIC_INT_CTRL 0xE000ED04
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Vector table offset register.
|
||||
*/
|
||||
#define OS_NVIC_VTOR 0xE000ED08
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Application interrupt and reset control register
|
||||
*/
|
||||
#define OS_NVIC_AIRCR 0xE000ED0C
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* System exception priority register.
|
||||
*/
|
||||
#define OS_NVIC_EXCPRI_BASE 0xE000ED18
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 1 :reset.
|
||||
*/
|
||||
#define OS_EXC_RESET 1
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 2 :Non-Maskable Interrupt.
|
||||
*/
|
||||
#define OS_EXC_NMI 2
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 3 :(hard)fault.
|
||||
*/
|
||||
#define OS_EXC_HARD_FAULT 3
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 4 :MemManage fault.
|
||||
*/
|
||||
#define OS_EXC_MPU_FAULT 4
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 5 :Bus fault.
|
||||
*/
|
||||
#define OS_EXC_BUS_FAULT 5
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 6 :Usage fault.
|
||||
*/
|
||||
#define OS_EXC_USAGE_FAULT 6
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 11 :SVCall.
|
||||
*/
|
||||
#define OS_EXC_SVC_CALL 11
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 12 :Debug monitor.
|
||||
*/
|
||||
#define OS_EXC_DBG_MONITOR 12
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 14 :PendSV.
|
||||
*/
|
||||
#define OS_EXC_PEND_SV 14
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 15 :SysTick.
|
||||
*/
|
||||
#define OS_EXC_SYS_TICK 15
|
||||
|
||||
#if (OS_HWI_WITH_ARG == 1)
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector, VOID *arg);
|
||||
#else
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
||||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Hardware interrupt entry function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -337,13 +337,13 @@ extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalInterrupt(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Get an interrupt number.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -356,13 +356,13 @@ extern VOID HalInterrupt(VOID);
|
|||
*
|
||||
* @retval: Interrupt Indexes number.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalIntNumGet(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Default vector handling function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -375,14 +375,14 @@ extern UINT32 HalIntNumGet(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li
|
||||
></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalHwiDefaultHandler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Reset the vector table.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -395,13 +395,13 @@ extern VOID HalHwiDefaultHandler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID Reset_Handler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Pended System Call.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -415,7 +415,7 @@ extern VOID Reset_Handler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalPendSV(VOID);
|
||||
|
@ -516,13 +516,13 @@ typedef struct TagExcContext {
|
|||
UINT32 FPSCR;
|
||||
UINT32 NO_NAME;
|
||||
#endif
|
||||
}EXC_CONTEXT_S;
|
||||
} EXC_CONTEXT_S;
|
||||
|
||||
typedef VOID (*EXC_PROC_FUNC)(UINT32, EXC_CONTEXT_S *);
|
||||
VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT_S *excBufAddr);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Exception initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -535,7 +535,7 @@ VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT
|
|||
*
|
||||
* @retval: None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
VOID OsExcInit(VOID);
|
||||
|
@ -714,4 +714,4 @@ extern ExcInfo g_excInfo;
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_EXC_H */
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -51,4 +51,3 @@ UINT32 HalTickStart(OS_TICK_HANDLER handler);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_TIMER_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ARCH_ATOMIC_H
|
||||
#define _LOS_ARCH_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
*
|
||||
* @retval #INT32 The previous value of the atomic variable
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
||||
|
@ -74,7 +74,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -89,7 +89,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
*
|
||||
* @retval #INT32 The return value of variable auto-decrement.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
||||
|
@ -110,7 +110,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable with compare.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -125,7 +125,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
* @retval TRUE The previous value of the atomic variable is not equal to oldVal.
|
||||
* @retval FALSE The previous value of the atomic variable is equal to oldVal.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
|
||||
|
@ -154,5 +154,4 @@ STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 ol
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
|
||||
#endif /* _LOS_ARCH_ATOMIC_H */
|
||||
|
|
|
@ -128,4 +128,3 @@ extern VOID HalStartToRun(VOID);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LOS_EXC_H
|
||||
#define _LOS_EXC_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_config.h"
|
||||
#include "los_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Maximum number of used hardware interrupts.
|
||||
*/
|
||||
#ifndef OS_HWI_MAX_NUM
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_HIGHEST
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_LOWEST
|
||||
|
@ -68,43 +68,43 @@ extern "C" {
|
|||
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef VOID (**HWI_VECTOR_FUNC)(void);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of interrupts.
|
||||
*/
|
||||
extern UINT32 g_intCount;
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core system interrupt vector.
|
||||
*/
|
||||
#define OS_SYS_VECTOR_CNT 16
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core interrupt vector.
|
||||
*/
|
||||
#define OS_VECTOR_CNT (OS_SYS_VECTOR_CNT + OS_HWI_MAX_NUM)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* AIRCR register priority group parameter .
|
||||
*/
|
||||
#define OS_NVIC_AIRCR_PRIGROUP 7
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Boot interrupt vector table.
|
||||
*/
|
||||
extern UINT32 _BootVectors[];
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -114,7 +114,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -124,7 +124,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -134,7 +134,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -144,7 +144,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -154,7 +154,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -164,7 +164,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -174,7 +174,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -184,7 +184,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* SysTick control and status register.
|
||||
*/
|
||||
#define OS_SYSTICK_CONTROL_REG 0xE000E010
|
||||
|
@ -196,135 +196,135 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_SYSTICK_CURRENT_REG 0xE000E018
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt Priority-Level Registers.
|
||||
*/
|
||||
#define OS_NVIC_PRI_BASE 0xE000E400
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt enable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_SETENA_BASE 0xE000E100
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* interrupt pending register.
|
||||
*/
|
||||
#define OS_NVIC_SETPEND_BASE 0xE000E200
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt active register.
|
||||
*/
|
||||
#define OS_NVIC_INT_ACT_BASE 0xE000E300
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt disable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt control and status register.
|
||||
*/
|
||||
#define OS_NVIC_INT_CTRL 0xE000ED04
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Vector table offset register.
|
||||
*/
|
||||
#define OS_NVIC_VTOR 0xE000ED08
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Application interrupt and reset control register
|
||||
*/
|
||||
#define OS_NVIC_AIRCR 0xE000ED0C
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* System exception priority register.
|
||||
*/
|
||||
#define OS_NVIC_EXCPRI_BASE 0xE000ED18
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 1 :reset.
|
||||
*/
|
||||
#define OS_EXC_RESET 1
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 2 :Non-Maskable Interrupt.
|
||||
*/
|
||||
#define OS_EXC_NMI 2
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 3 :(hard)fault.
|
||||
*/
|
||||
#define OS_EXC_HARD_FAULT 3
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 4 :MemManage fault.
|
||||
*/
|
||||
#define OS_EXC_MPU_FAULT 4
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 5 :Bus fault.
|
||||
*/
|
||||
#define OS_EXC_BUS_FAULT 5
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 6 :Usage fault.
|
||||
*/
|
||||
#define OS_EXC_USAGE_FAULT 6
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 11 :SVCall.
|
||||
*/
|
||||
#define OS_EXC_SVC_CALL 11
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 12 :Debug monitor.
|
||||
*/
|
||||
#define OS_EXC_DBG_MONITOR 12
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 14 :PendSV.
|
||||
*/
|
||||
#define OS_EXC_PEND_SV 14
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 15 :SysTick.
|
||||
*/
|
||||
#define OS_EXC_SYS_TICK 15
|
||||
|
||||
#if (OS_HWI_WITH_ARG == 1)
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector, VOID *arg);
|
||||
#else
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
||||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Hardware interrupt entry function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -337,13 +337,13 @@ extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalInterrupt(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Get an interrupt number.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -356,13 +356,13 @@ extern VOID HalInterrupt(VOID);
|
|||
*
|
||||
* @retval: Interrupt Indexes number.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalIntNumGet(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Default vector handling function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -375,14 +375,14 @@ extern UINT32 HalIntNumGet(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li
|
||||
></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalHwiDefaultHandler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Reset the vector table.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -395,13 +395,13 @@ extern VOID HalHwiDefaultHandler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID Reset_Handler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Pended System Call.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -415,7 +415,7 @@ extern VOID Reset_Handler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalPendSV(VOID);
|
||||
|
@ -516,13 +516,13 @@ typedef struct TagExcContext {
|
|||
UINT32 FPSCR;
|
||||
UINT32 NO_NAME;
|
||||
#endif
|
||||
}EXC_CONTEXT_S;
|
||||
} EXC_CONTEXT_S;
|
||||
|
||||
typedef VOID (*EXC_PROC_FUNC)(UINT32, EXC_CONTEXT_S *);
|
||||
VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT_S *excBufAddr);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Exception initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -535,7 +535,7 @@ VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT
|
|||
*
|
||||
* @retval: None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
VOID OsExcInit(VOID);
|
||||
|
@ -714,4 +714,4 @@ extern ExcInfo g_excInfo;
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_EXC_H */
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -51,4 +51,3 @@ UINT32 HalTickStart(OS_TICK_HANDLER handler);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_TIMER_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ARCH_ATOMIC_H
|
||||
#define _LOS_ARCH_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
*
|
||||
* @retval #INT32 The previous value of the atomic variable
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
||||
|
@ -74,7 +74,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -89,7 +89,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
*
|
||||
* @retval #INT32 The return value of variable auto-decrement.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
||||
|
@ -110,7 +110,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable with compare.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -125,7 +125,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
* @retval TRUE The previous value of the atomic variable is not equal to oldVal.
|
||||
* @retval FALSE The previous value of the atomic variable is equal to oldVal.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
|
||||
|
@ -154,5 +154,5 @@ STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 ol
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
#endif /* _LOS_ARCH_ATOMIC_H */
|
||||
|
||||
|
|
|
@ -128,4 +128,3 @@ extern VOID HalStartToRun(VOID);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LOS_EXC_H
|
||||
#define _LOS_EXC_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_config.h"
|
||||
#include "los_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Maximum number of used hardware interrupts.
|
||||
*/
|
||||
#ifndef OS_HWI_MAX_NUM
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_HIGHEST
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_LOWEST
|
||||
|
@ -68,43 +68,43 @@ extern "C" {
|
|||
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef VOID (**HWI_VECTOR_FUNC)(void);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of interrupts.
|
||||
*/
|
||||
extern UINT32 g_intCount;
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core system interrupt vector.
|
||||
*/
|
||||
#define OS_SYS_VECTOR_CNT 16
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core interrupt vector.
|
||||
*/
|
||||
#define OS_VECTOR_CNT (OS_SYS_VECTOR_CNT + OS_HWI_MAX_NUM)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* AIRCR register priority group parameter .
|
||||
*/
|
||||
#define OS_NVIC_AIRCR_PRIGROUP 7
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Boot interrupt vector table.
|
||||
*/
|
||||
extern UINT32 _BootVectors[];
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -114,7 +114,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -124,7 +124,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -134,7 +134,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -144,7 +144,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -154,7 +154,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -164,7 +164,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -174,7 +174,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -184,7 +184,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* SysTick control and status register.
|
||||
*/
|
||||
#define OS_SYSTICK_CONTROL_REG 0xE000E010
|
||||
|
@ -196,135 +196,135 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_SYSTICK_CURRENT_REG 0xE000E018
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt Priority-Level Registers.
|
||||
*/
|
||||
#define OS_NVIC_PRI_BASE 0xE000E400
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt enable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_SETENA_BASE 0xE000E100
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* interrupt pending register.
|
||||
*/
|
||||
#define OS_NVIC_SETPEND_BASE 0xE000E200
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt active register.
|
||||
*/
|
||||
#define OS_NVIC_INT_ACT_BASE 0xE000E300
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt disable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt control and status register.
|
||||
*/
|
||||
#define OS_NVIC_INT_CTRL 0xE000ED04
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Vector table offset register.
|
||||
*/
|
||||
#define OS_NVIC_VTOR 0xE000ED08
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Application interrupt and reset control register
|
||||
*/
|
||||
#define OS_NVIC_AIRCR 0xE000ED0C
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* System exception priority register.
|
||||
*/
|
||||
#define OS_NVIC_EXCPRI_BASE 0xE000ED18
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 1 :reset.
|
||||
*/
|
||||
#define OS_EXC_RESET 1
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 2 :Non-Maskable Interrupt.
|
||||
*/
|
||||
#define OS_EXC_NMI 2
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 3 :(hard)fault.
|
||||
*/
|
||||
#define OS_EXC_HARD_FAULT 3
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 4 :MemManage fault.
|
||||
*/
|
||||
#define OS_EXC_MPU_FAULT 4
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 5 :Bus fault.
|
||||
*/
|
||||
#define OS_EXC_BUS_FAULT 5
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 6 :Usage fault.
|
||||
*/
|
||||
#define OS_EXC_USAGE_FAULT 6
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 11 :SVCall.
|
||||
*/
|
||||
#define OS_EXC_SVC_CALL 11
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 12 :Debug monitor.
|
||||
*/
|
||||
#define OS_EXC_DBG_MONITOR 12
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 14 :PendSV.
|
||||
*/
|
||||
#define OS_EXC_PEND_SV 14
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 15 :SysTick.
|
||||
*/
|
||||
#define OS_EXC_SYS_TICK 15
|
||||
|
||||
#if (OS_HWI_WITH_ARG == 1)
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector, VOID *arg);
|
||||
#else
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
||||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Hardware interrupt entry function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -337,13 +337,13 @@ extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalInterrupt(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Get an interrupt number.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -356,13 +356,13 @@ extern VOID HalInterrupt(VOID);
|
|||
*
|
||||
* @retval: Interrupt Indexes number.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalIntNumGet(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Default vector handling function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -375,14 +375,14 @@ extern UINT32 HalIntNumGet(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li
|
||||
></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalHwiDefaultHandler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Reset the vector table.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -395,13 +395,13 @@ extern VOID HalHwiDefaultHandler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID Reset_Handler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Pended System Call.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -415,7 +415,7 @@ extern VOID Reset_Handler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalPendSV(VOID);
|
||||
|
@ -516,13 +516,13 @@ typedef struct TagExcContext {
|
|||
UINT32 FPSCR;
|
||||
UINT32 NO_NAME;
|
||||
#endif
|
||||
}EXC_CONTEXT_S;
|
||||
} EXC_CONTEXT_S;
|
||||
|
||||
typedef VOID (*EXC_PROC_FUNC)(UINT32, EXC_CONTEXT_S *);
|
||||
VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT_S *excBufAddr);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Exception initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -535,7 +535,7 @@ VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT
|
|||
*
|
||||
* @retval: None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
VOID OsExcInit(VOID);
|
||||
|
@ -714,4 +714,4 @@ extern ExcInfo g_excInfo;
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_EXC_H */
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -51,4 +51,3 @@ UINT32 HalTickStart(OS_TICK_HANDLER handler);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_TIMER_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ARCH_ATOMIC_H
|
||||
#define _LOS_ARCH_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
*
|
||||
* @retval #INT32 The previous value of the atomic variable
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
||||
|
@ -74,7 +74,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -89,7 +89,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
*
|
||||
* @retval #INT32 The return value of variable auto-decrement.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
||||
|
@ -110,7 +110,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable with compare.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -125,7 +125,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
* @retval TRUE The previous value of the atomic variable is not equal to oldVal.
|
||||
* @retval FALSE The previous value of the atomic variable is equal to oldVal.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
|
||||
|
@ -154,5 +154,5 @@ STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 ol
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
#endif /* _LOS_ARCH_ATOMIC_H */
|
||||
|
||||
|
|
|
@ -128,4 +128,3 @@ extern VOID HalStartToRun(VOID);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LOS_EXC_H
|
||||
#define _LOS_EXC_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_config.h"
|
||||
#include "los_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Maximum number of used hardware interrupts.
|
||||
*/
|
||||
#ifndef OS_HWI_MAX_NUM
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_HIGHEST
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_LOWEST
|
||||
|
@ -68,43 +68,43 @@ extern "C" {
|
|||
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef VOID (**HWI_VECTOR_FUNC)(void);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of interrupts.
|
||||
*/
|
||||
extern UINT32 g_intCount;
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core system interrupt vector.
|
||||
*/
|
||||
#define OS_SYS_VECTOR_CNT 16
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core interrupt vector.
|
||||
*/
|
||||
#define OS_VECTOR_CNT (OS_SYS_VECTOR_CNT + OS_HWI_MAX_NUM)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* AIRCR register priority group parameter .
|
||||
*/
|
||||
#define OS_NVIC_AIRCR_PRIGROUP 7
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Boot interrupt vector table.
|
||||
*/
|
||||
extern UINT32 _BootVectors[];
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -114,7 +114,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -124,7 +124,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -134,7 +134,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -144,7 +144,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -154,7 +154,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -164,7 +164,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -174,7 +174,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -184,7 +184,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* SysTick control and status register.
|
||||
*/
|
||||
#define OS_SYSTICK_CONTROL_REG 0xE000E010
|
||||
|
@ -196,135 +196,135 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_SYSTICK_CURRENT_REG 0xE000E018
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt Priority-Level Registers.
|
||||
*/
|
||||
#define OS_NVIC_PRI_BASE 0xE000E400
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt enable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_SETENA_BASE 0xE000E100
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* interrupt pending register.
|
||||
*/
|
||||
#define OS_NVIC_SETPEND_BASE 0xE000E200
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt active register.
|
||||
*/
|
||||
#define OS_NVIC_INT_ACT_BASE 0xE000E300
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt disable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt control and status register.
|
||||
*/
|
||||
#define OS_NVIC_INT_CTRL 0xE000ED04
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Vector table offset register.
|
||||
*/
|
||||
#define OS_NVIC_VTOR 0xE000ED08
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Application interrupt and reset control register
|
||||
*/
|
||||
#define OS_NVIC_AIRCR 0xE000ED0C
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* System exception priority register.
|
||||
*/
|
||||
#define OS_NVIC_EXCPRI_BASE 0xE000ED18
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 1 :reset.
|
||||
*/
|
||||
#define OS_EXC_RESET 1
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 2 :Non-Maskable Interrupt.
|
||||
*/
|
||||
#define OS_EXC_NMI 2
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 3 :(hard)fault.
|
||||
*/
|
||||
#define OS_EXC_HARD_FAULT 3
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 4 :MemManage fault.
|
||||
*/
|
||||
#define OS_EXC_MPU_FAULT 4
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 5 :Bus fault.
|
||||
*/
|
||||
#define OS_EXC_BUS_FAULT 5
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 6 :Usage fault.
|
||||
*/
|
||||
#define OS_EXC_USAGE_FAULT 6
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 11 :SVCall.
|
||||
*/
|
||||
#define OS_EXC_SVC_CALL 11
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 12 :Debug monitor.
|
||||
*/
|
||||
#define OS_EXC_DBG_MONITOR 12
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 14 :PendSV.
|
||||
*/
|
||||
#define OS_EXC_PEND_SV 14
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 15 :SysTick.
|
||||
*/
|
||||
#define OS_EXC_SYS_TICK 15
|
||||
|
||||
#if (OS_HWI_WITH_ARG == 1)
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector, VOID *arg);
|
||||
#else
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
||||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Hardware interrupt entry function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -337,13 +337,13 @@ extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalInterrupt(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Get an interrupt number.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -356,13 +356,13 @@ extern VOID HalInterrupt(VOID);
|
|||
*
|
||||
* @retval: Interrupt Indexes number.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalIntNumGet(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Default vector handling function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -375,14 +375,14 @@ extern UINT32 HalIntNumGet(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li
|
||||
></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalHwiDefaultHandler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Reset the vector table.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -395,13 +395,13 @@ extern VOID HalHwiDefaultHandler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID Reset_Handler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Pended System Call.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -415,7 +415,7 @@ extern VOID Reset_Handler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalPendSV(VOID);
|
||||
|
@ -516,13 +516,13 @@ typedef struct TagExcContext {
|
|||
UINT32 FPSCR;
|
||||
UINT32 NO_NAME;
|
||||
#endif
|
||||
}EXC_CONTEXT_S;
|
||||
} EXC_CONTEXT_S;
|
||||
|
||||
typedef VOID (*EXC_PROC_FUNC)(UINT32, EXC_CONTEXT_S *);
|
||||
VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT_S *excBufAddr);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Exception initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -535,7 +535,7 @@ VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT
|
|||
*
|
||||
* @retval: None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
VOID OsExcInit(VOID);
|
||||
|
@ -714,5 +714,4 @@ extern ExcInfo g_excInfo;
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_EXC_H */
|
||||
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -51,4 +51,3 @@ UINT32 HalTickStart(OS_TICK_HANDLER handler);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_TIMER_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ARCH_ATOMIC_H
|
||||
#define _LOS_ARCH_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
*
|
||||
* @retval #INT32 The previous value of the atomic variable
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
||||
|
@ -74,7 +74,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -89,7 +89,7 @@ STATIC INLINE INT32 HalAtomicXchg32bits(volatile INT32 *v, INT32 val)
|
|||
*
|
||||
* @retval #INT32 The return value of variable auto-decrement.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
||||
|
@ -110,7 +110,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_atomic
|
||||
* @ingroup los_arch_atomic
|
||||
* @brief Atomic exchange for 32-bit variable with compare.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -125,7 +125,7 @@ STATIC INLINE INT32 HalAtomicDecRet(volatile INT32 *v)
|
|||
* @retval TRUE The previous value of the atomic variable is not equal to oldVal.
|
||||
* @retval FALSE The previous value of the atomic variable is equal to oldVal.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_atomic.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
|
||||
|
@ -154,5 +154,5 @@ STATIC INLINE BOOL HalAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 ol
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
#endif /* _LOS_ARCH_ATOMIC_H */
|
||||
|
||||
|
|
|
@ -128,4 +128,3 @@ extern VOID HalStartToRun(VOID);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LOS_EXC_H
|
||||
#define _LOS_EXC_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_config.h"
|
||||
#include "los_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Maximum number of used hardware interrupts.
|
||||
*/
|
||||
#ifndef OS_HWI_MAX_NUM
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_HIGHEST
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#ifndef OS_HWI_PRIO_LOWEST
|
||||
|
@ -68,43 +68,43 @@ extern "C" {
|
|||
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef VOID (**HWI_VECTOR_FUNC)(void);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of interrupts.
|
||||
*/
|
||||
extern UINT32 g_intCount;
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core system interrupt vector.
|
||||
*/
|
||||
#define OS_SYS_VECTOR_CNT 16
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of M-Core interrupt vector.
|
||||
*/
|
||||
#define OS_VECTOR_CNT (OS_SYS_VECTOR_CNT + OS_HWI_MAX_NUM)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* AIRCR register priority group parameter .
|
||||
*/
|
||||
#define OS_NVIC_AIRCR_PRIGROUP 7
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Boot interrupt vector table.
|
||||
*/
|
||||
extern UINT32 _BootVectors[];
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -114,7 +114,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -124,7 +124,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -134,7 +134,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -144,7 +144,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -154,7 +154,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -164,7 +164,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -174,7 +174,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -184,7 +184,7 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* SysTick control and status register.
|
||||
*/
|
||||
#define OS_SYSTICK_CONTROL_REG 0xE000E010
|
||||
|
@ -196,135 +196,135 @@ extern UINT32 _BootVectors[];
|
|||
#define OS_SYSTICK_CURRENT_REG 0xE000E018
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt Priority-Level Registers.
|
||||
*/
|
||||
#define OS_NVIC_PRI_BASE 0xE000E400
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt enable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_SETENA_BASE 0xE000E100
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* interrupt pending register.
|
||||
*/
|
||||
#define OS_NVIC_SETPEND_BASE 0xE000E200
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt active register.
|
||||
*/
|
||||
#define OS_NVIC_INT_ACT_BASE 0xE000E300
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt disable register for 0-31.
|
||||
*/
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt control and status register.
|
||||
*/
|
||||
#define OS_NVIC_INT_CTRL 0xE000ED04
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Vector table offset register.
|
||||
*/
|
||||
#define OS_NVIC_VTOR 0xE000ED08
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Application interrupt and reset control register
|
||||
*/
|
||||
#define OS_NVIC_AIRCR 0xE000ED0C
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* System exception priority register.
|
||||
*/
|
||||
#define OS_NVIC_EXCPRI_BASE 0xE000ED18
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 1 :reset.
|
||||
*/
|
||||
#define OS_EXC_RESET 1
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 2 :Non-Maskable Interrupt.
|
||||
*/
|
||||
#define OS_EXC_NMI 2
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 3 :(hard)fault.
|
||||
*/
|
||||
#define OS_EXC_HARD_FAULT 3
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 4 :MemManage fault.
|
||||
*/
|
||||
#define OS_EXC_MPU_FAULT 4
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 5 :Bus fault.
|
||||
*/
|
||||
#define OS_EXC_BUS_FAULT 5
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 6 :Usage fault.
|
||||
*/
|
||||
#define OS_EXC_USAGE_FAULT 6
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 11 :SVCall.
|
||||
*/
|
||||
#define OS_EXC_SVC_CALL 11
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 12 :Debug monitor.
|
||||
*/
|
||||
#define OS_EXC_DBG_MONITOR 12
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 14 :PendSV.
|
||||
*/
|
||||
#define OS_EXC_PEND_SV 14
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Interrupt No. 15 :SysTick.
|
||||
*/
|
||||
#define OS_EXC_SYS_TICK 15
|
||||
|
||||
#if (OS_HWI_WITH_ARG == 1)
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector, VOID *arg);
|
||||
#else
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Set interrupt vector table.
|
||||
*/
|
||||
extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
||||
#endif
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Hardware interrupt entry function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -337,13 +337,13 @@ extern VOID OsSetVector(UINT32 num, HWI_PROC_FUNC vector);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalInterrupt(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Get an interrupt number.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -356,13 +356,13 @@ extern VOID HalInterrupt(VOID);
|
|||
*
|
||||
* @retval: Interrupt Indexes number.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalIntNumGet(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Default vector handling function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -375,14 +375,14 @@ extern UINT32 HalIntNumGet(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li
|
||||
></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalHwiDefaultHandler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Reset the vector table.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -395,13 +395,13 @@ extern VOID HalHwiDefaultHandler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID Reset_Handler(VOID);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Pended System Call.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -415,7 +415,7 @@ extern VOID Reset_Handler(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID HalPendSV(VOID);
|
||||
|
@ -516,13 +516,13 @@ typedef struct TagExcContext {
|
|||
UINT32 FPSCR;
|
||||
UINT32 NO_NAME;
|
||||
#endif
|
||||
}EXC_CONTEXT_S;
|
||||
} EXC_CONTEXT_S;
|
||||
|
||||
typedef VOID (*EXC_PROC_FUNC)(UINT32, EXC_CONTEXT_S *);
|
||||
VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT_S *excBufAddr);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* @brief: Exception initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -535,7 +535,7 @@ VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, UINT32 pid, EXC_CONTEXT
|
|||
*
|
||||
* @retval: None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
VOID OsExcInit(VOID);
|
||||
|
@ -714,4 +714,4 @@ extern ExcInfo g_excInfo;
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_EXC_H */
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -51,4 +51,3 @@ UINT32 HalTickStart(OS_TICK_HANDLER handler);
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_ARCH_TIMER_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_ATOMIC_H
|
||||
#define LOS_ATOMIC_H
|
||||
#ifndef _LOS_ATOMIC_H
|
||||
#define _LOS_ATOMIC_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -47,5 +47,5 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LOS_ATOMIC_H */
|
||||
#endif /* _LOS_ATOMIC_H */
|
||||
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @defgroup los_hw hardware
|
||||
* @defgroup los_context hardware
|
||||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
#ifndef _LOS_HW_H
|
||||
#define _LOS_HW_H
|
||||
#ifndef _LOS_CONTEXT_H
|
||||
#define _LOS_CONTEXT_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -45,8 +45,8 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_hw
|
||||
/**
|
||||
* @ingroup los_context
|
||||
* @brief: Task stack initialization.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -61,12 +61,13 @@ extern "C" {
|
|||
*
|
||||
* @retval: context Type#TaskContext *.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hw.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_context.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID *HalTskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack);
|
||||
|
||||
/**
|
||||
* @ingroup los_hw
|
||||
* @ingroup los_context
|
||||
* @brief: Function to sys exit.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -79,12 +80,12 @@ extern VOID *HalTskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack);
|
|||
*
|
||||
* @retval: None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hw.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_context.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
LITE_OS_SEC_TEXT_MINOR NORETURN VOID HalSysExit(VOID);
|
||||
|
||||
/* *
|
||||
/**
|
||||
* @ingroup los_context
|
||||
* @brief: Task scheduling Function.
|
||||
*
|
||||
|
@ -115,13 +116,10 @@ VOID HalIntRestore(UINTPTR intSave);
|
|||
UINTPTR HalIntUnLock(VOID);
|
||||
#define LOS_IntUnLock HalIntUnLock
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_HW_H */
|
||||
|
||||
#endif /* _LOS_CONTEXT_H */
|
||||
|
|
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/* *
|
||||
* @ingroup los_config
|
||||
* @ingroup los_interrupt
|
||||
* Configuration item for interrupt with argument
|
||||
*/
|
||||
#ifndef OS_HWI_WITH_ARG
|
||||
|
@ -66,8 +66,8 @@ UINT32 HalIsIntActive(VOID);
|
|||
#define OS_INT_ACTIVE (HalIsIntActive())
|
||||
#define OS_INT_INACTIVE (!(OS_INT_ACTIVE))
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
/**
|
||||
* @ingroup los_interrupt
|
||||
* @brief Delete hardware interrupt.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -86,13 +86,13 @@ UINT32 HalIsIntActive(VOID);
|
|||
* @retval #OS_ERRNO_HWI_NUM_INVALID 0x02000900: Invalid interrupt number.
|
||||
* @retval #LOS_OK 0 : The interrupt is successfully delete.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalHwiDelete(HWI_HANDLE_T hwiNum);
|
||||
|
||||
/* *
|
||||
* @ingroup los_hwi
|
||||
/**
|
||||
* @ingroup los_interrupt
|
||||
* @brief Create a hardware interrupt.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -118,7 +118,7 @@ extern UINT32 HalHwiDelete(HWI_HANDLE_T hwiNum);
|
|||
* @retval #OS_ERRNO_HWI_ALREADY_CREATED 0x02000904: The interrupt handler being created has already been created.
|
||||
* @retval #LOS_OK 0 : The interrupt is successfully created.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_interrupt.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum,
|
||||
|
@ -134,4 +134,3 @@ extern UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum,
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_INTERRUPT_H */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LOS_TIMER_H
|
||||
#define LOS_TIMER_H
|
||||
#ifndef _LOS_TIMER_H
|
||||
#define _LOS_TIMER_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
|
||||
|
@ -90,7 +90,7 @@ VOID HalEnterSleep(LOS_SysSleepEnum sleep);
|
|||
UINT64 HalGetTickCycle(UINT32 *period);
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_timer
|
||||
* @brief reconfig systick, and clear SysTick_IRQn.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -106,7 +106,7 @@ UINT64 HalGetTickCycle(UINT32 *period);
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_timer.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None
|
||||
*/
|
||||
extern VOID HalSysTickReload(UINT64 nextResponseTime);
|
||||
|
@ -117,4 +117,4 @@ extern VOID HalSysTickReload(UINT64 nextResponseTime);
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
#endif /* _LOS_TIMER_H */
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_hw
|
||||
* @ingroup los_arch_context
|
||||
* The initialization value of stack space.
|
||||
*/
|
||||
#define EMPTY_STACK 0xCACA
|
||||
|
@ -77,7 +77,7 @@ extern "C" {
|
|||
#define T0_INIT_VALUE 0x30303030L
|
||||
|
||||
/**
|
||||
* @ingroup los_hw
|
||||
* @ingroup los_arch_context
|
||||
* Define the type of a task context control block.
|
||||
*/
|
||||
typedef struct {
|
||||
|
@ -134,7 +134,7 @@ extern VOID HalStartToRun(VOID);
|
|||
extern VOID HalTaskContextSwitch(UINTPTR intSave);
|
||||
|
||||
/**
|
||||
* @ingroup los_hw
|
||||
* @ingroup los_arch_context
|
||||
* @brief Wait for interrupt.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -148,13 +148,13 @@ extern VOID HalTaskContextSwitch(UINTPTR intSave);
|
|||
* @retval: None.
|
||||
*
|
||||
* @par Dependency:
|
||||
* los_hw.h: the header file that contains the API declaration.
|
||||
* los_arch_context.h: the header file that contains the API declaration.
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID wfi(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_hw
|
||||
* @ingroup los_arch_context
|
||||
* @brief: mem fence function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -167,13 +167,13 @@ extern VOID wfi(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hw.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_context.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID mb(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_hw
|
||||
* @ingroup los_arch_context
|
||||
* @brief: mem fence function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -186,7 +186,7 @@ extern VOID mb(VOID);
|
|||
*
|
||||
* @retval:None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_hw.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_arch_context.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID dsb(VOID);
|
||||
|
@ -197,4 +197,4 @@ extern VOID dsb(VOID);
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_HW_H */
|
||||
#endif /* _LOS_ARCH_CONTEXT_H */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef _LOS_HWI_H
|
||||
#define _LOS_HWI_H
|
||||
#ifndef _LOS_ARCH_INTERRUPT_H
|
||||
#define _LOS_ARCH_INTERRUPT_H
|
||||
|
||||
#include "los_compiler.h"
|
||||
#include "los_config.h"
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
*/
|
||||
typedef struct tagHwiHandleForm {
|
||||
|
@ -68,43 +68,43 @@ typedef struct {
|
|||
} LosExcInfo;
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Highest priority of a hardware interrupt.
|
||||
*/
|
||||
#define OS_HWI_PRIO_HIGHEST 7
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Lowest priority of a hardware interrupt.
|
||||
*/
|
||||
#define OS_HWI_PRIO_LOWEST 1
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of HimiDeer system interrupt vector.
|
||||
*/
|
||||
#define OS_RISCV_SYS_VECTOR_CNT (RISCV_SYS_MAX_IRQ + 1)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of HimiDeer local interrupt vector 0 - 5, enabled by CSR mie 26 -31 bit.
|
||||
*/
|
||||
#define OS_RISCV_MIE_IRQ_VECTOR_CNT 6
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of HimiDeer local interrupt vector 6 - 31, enabled by custom CSR locie0 0 - 25 bit.
|
||||
*/
|
||||
#define OS_RISCV_CUSTOM_IRQ_VECTOR_CNT RISCV_PLIC_VECTOR_CNT
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of HimiDeer local IRQ interrupt vector.
|
||||
*/
|
||||
#define OS_RISCV_LOCAL_IRQ_VECTOR_CNT (OS_RISCV_MIE_IRQ_VECTOR_CNT + OS_RISCV_SYS_VECTOR_CNT)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Count of himideer interrupt vector.
|
||||
*/
|
||||
#define OS_RISCV_VECTOR_CNT (OS_RISCV_SYS_VECTOR_CNT + OS_RISCV_CUSTOM_IRQ_VECTOR_CNT)
|
||||
|
@ -146,7 +146,7 @@ extern VOID HalHwiDefaultHandler(VOID *arg);
|
|||
extern UINT32 g_intCount;
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt number.
|
||||
*
|
||||
* Value: 0x02000900
|
||||
|
@ -157,7 +157,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Null hardware interrupt handling function.
|
||||
*
|
||||
* Value: 0x02000901
|
||||
|
@ -167,7 +167,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
|
||||
*
|
||||
* Value: 0x02000902
|
||||
|
@ -177,7 +177,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
|
||||
*
|
||||
* Value: 0x02000903
|
||||
|
@ -187,7 +187,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created.
|
||||
*
|
||||
* Value: 0x02000904
|
||||
|
@ -197,7 +197,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Invalid interrupt priority.
|
||||
*
|
||||
* Value: 0x02000905
|
||||
|
@ -207,7 +207,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: Incorrect interrupt creation mode.
|
||||
*
|
||||
* Value: 0x02000906
|
||||
|
@ -218,7 +218,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
|
||||
*
|
||||
* Value: 0x02000907
|
||||
|
@ -228,7 +228,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code: The API is called during an interrupt, which is forbidden.
|
||||
*
|
||||
* Value: 0x02000908
|
||||
|
@ -238,7 +238,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_INTERR LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x08)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code:the hwi support SHARED error.
|
||||
*
|
||||
* Value: 0x02000909
|
||||
|
@ -249,7 +249,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_SHARED_ERROR LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x09)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code:Invalid interrupt Arg when interrupt mode is IRQF_SHARED.
|
||||
*
|
||||
* Value: 0x0200090a
|
||||
|
@ -259,7 +259,7 @@ extern UINT32 g_intCount;
|
|||
#define OS_ERRNO_HWI_ARG_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x0a)
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* @ingroup los_arch_interrupt
|
||||
* Hardware interrupt error code:The interrupt corresponded to the hwi number or devid has not been created.
|
||||
*
|
||||
* Value: 0x0200090b
|
||||
|
@ -276,4 +276,4 @@ extern UINT32 HalUnalignedAccessFix(UINTPTR mcause, UINTPTR mepc, UINTPTR mtval,
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _LOS_HWI_H */
|
||||
#endif /* _LOS_ARCH_INTERRUPT_H */
|
||||
|
|
|
@ -330,7 +330,7 @@ extern LosMuxCB *g_allMux;
|
|||
*
|
||||
* @retval UINT32 Initialization result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_mux_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_mux.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_MuxDelete
|
||||
*/
|
||||
extern UINT32 OsMuxInit(VOID);
|
||||
|
|
|
@ -827,7 +827,7 @@ extern LosQueueCB *g_allQueue;
|
|||
* @retval #NULL The memory allocation is failed.
|
||||
* @retval #mem The address of alloc memory.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_queue_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_queue.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see OsQueueMailFree
|
||||
*/
|
||||
extern VOID *OsQueueMailAlloc(UINT32 queueID, VOID *mailPool, UINT32 timeOut);
|
||||
|
@ -853,7 +853,7 @@ extern VOID *OsQueueMailAlloc(UINT32 queueID, VOID *mailPool, UINT32 timeOut);
|
|||
* @retval #OS_ERRNO_QUEUE_MAIL_PTR_INVALID 0x0200061a: The pointer to the memory to be freed is null.
|
||||
* @retval #OS_ERRNO_QUEUE_MAIL_FREE_ERROR 0x0200061b: The memory for the queue fails to be freed.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_queue_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_queue.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see OsQueueMailAlloc
|
||||
*/
|
||||
extern UINT32 OsQueueMailFree(UINT32 queueID, VOID *mailPool, VOID *mailMem);
|
||||
|
@ -873,7 +873,7 @@ extern UINT32 OsQueueMailFree(UINT32 queueID, VOID *mailPool, VOID *mailMem);
|
|||
*
|
||||
* @retval UINT32 Initialization result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_queue_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_queue.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsQueueInit(VOID);
|
||||
|
@ -897,7 +897,7 @@ extern UINT32 OsQueueInit(VOID);
|
|||
*
|
||||
* @retval UINT32 Handle result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_queue_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_queue.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsQueueOperate(UINT32 queueID, UINT32 operateType, VOID *bufferAddr, UINT32 *bufferSize,
|
||||
|
|
|
@ -344,7 +344,7 @@ extern LosSemCB *g_allSem;
|
|||
*
|
||||
* @retval UINT32 Initialization result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sem_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_sem.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsSemInit(VOID);
|
||||
|
@ -366,7 +366,7 @@ extern UINT32 OsSemInit(VOID);
|
|||
*
|
||||
* @retval UINT32 Create result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sem_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_sem.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
UINT32 OsSemCreate(UINT16 count, UINT16 maxCount, UINT32 *semHandle);
|
||||
|
|
|
@ -470,7 +470,7 @@ extern SWTMR_CTRL_S *g_swtmrCBArray;
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_swtmr_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_swtmr.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsSwtmrInit(VOID);
|
||||
|
@ -492,7 +492,7 @@ extern UINT32 OsSwtmrInit(VOID);
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_swtmr_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_swtmr.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsSwtmrGetNextTimeout(VOID);
|
||||
|
@ -514,7 +514,7 @@ extern UINT32 OsSwtmrGetNextTimeout(VOID);
|
|||
*
|
||||
* @retval UINT32 Sleep time.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_swtmr_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_swtmr.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID OsSwtmrAdjust(UINT32 sleepTime);
|
||||
|
|
|
@ -439,24 +439,20 @@ typedef struct tagTskInfo {
|
|||
BOOL bOvf; /**< Flag that indicates whether a task stack overflow occurs */
|
||||
} TSK_INFO_S;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup los_base
|
||||
* @ingroup los_task
|
||||
* Define the timeout interval as LOS_NO_WAIT.
|
||||
*/
|
||||
#define LOS_NO_WAIT 0
|
||||
|
||||
/**
|
||||
* @ingroup los_base
|
||||
* @ingroup los_task
|
||||
* Define the timeout interval as LOS_WAIT_FOREVER.
|
||||
*/
|
||||
#define LOS_WAIT_FOREVER 0xFFFFFFFF
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup los_base
|
||||
* @ingroup los_task
|
||||
* @brief Sleep the current task.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -478,13 +474,13 @@ typedef struct tagTskInfo {
|
|||
*
|
||||
* @retval None
|
||||
* @par Dependency:
|
||||
* <ul><li>los_base.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None
|
||||
*/
|
||||
extern VOID LOS_Msleep(UINT32 mSecs);
|
||||
|
||||
/**
|
||||
* @ingroup los_base
|
||||
* @ingroup los_task
|
||||
* @brief System kernel initialization function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -507,9 +503,8 @@ extern UINT32 LOS_Start(VOID);
|
|||
extern NORETURN VOID LOS_Reboot(VOID);
|
||||
extern NORETURN VOID LOS_Panic(const CHAR *fmt, ...);
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup los_base
|
||||
* @ingroup los_task
|
||||
* @brief System kernel initialization function.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -1107,256 +1102,6 @@ extern CHAR* LOS_TaskNameGet(UINT32 taskID);
|
|||
*/
|
||||
extern VOID LOS_UDelay(UINT64 microseconds);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* CPU usage error code: The request for memory fails.
|
||||
*
|
||||
* Value: 0x02001e00
|
||||
*
|
||||
* Solution: Decrease the maximum number of tasks.
|
||||
*/
|
||||
#define LOS_ERRNO_CPUP_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_CPUP, 0x00)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* CPU usage error code: The pointer to an input parameter is NULL.
|
||||
*
|
||||
* Value: 0x02001e01
|
||||
*
|
||||
* Solution: Check whether the pointer to the input parameter is usable.
|
||||
*/
|
||||
#define LOS_ERRNO_CPUP_TASK_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_CPUP, 0x01)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* CPU usage error code: The CPU usage is not initialized.
|
||||
*
|
||||
* Value: 0x02001e02
|
||||
*
|
||||
* Solution: Check whether the CPU usage is initialized.
|
||||
*/
|
||||
#define LOS_ERRNO_CPUP_NO_INIT LOS_ERRNO_OS_ERROR(LOS_MOD_CPUP, 0x02)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* CPU usage error code: The number of threads is invalid.
|
||||
*
|
||||
* Value: 0x02001e03
|
||||
*
|
||||
* Solution: Check whether the number of threads is applicable for the current operation.
|
||||
*/
|
||||
#define LOS_ERRNO_CPUP_MAXNUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_CPUP, 0x03)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* CPU usage error code: The target thread is not created.
|
||||
*
|
||||
* Value: 0x02001e04
|
||||
*
|
||||
* Solution: Check whether the target thread is created.
|
||||
*/
|
||||
#define LOS_ERRNO_CPUP_THREAD_NO_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_CPUP, 0x04)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* CPU usage error code: The target task ID is invalid.
|
||||
*
|
||||
* Value: 0x02001e05
|
||||
*
|
||||
* Solution: Check whether the target task ID is applicable for the current operation.
|
||||
*/
|
||||
#define LOS_ERRNO_CPUP_TSK_ID_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_CPUP, 0x05)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* Sum of cpup with all tasks. It means the value of cpup is a permillage.
|
||||
*/
|
||||
#define LOS_CPUP_PRECISION 1000
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* Multiple of current cpup precision change to percent.
|
||||
*/
|
||||
#define LOS_CPUP_PRECISION_MULT (LOS_CPUP_PRECISION / 100)
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* Count the CPU usage structures of all tasks.
|
||||
*/
|
||||
typedef struct tagCpupInfo {
|
||||
UINT16 usStatus; /**< save the cur task status */
|
||||
UINT32 uwUsage; /**< Usage. The value range is [0,1000]. */
|
||||
} CPUP_INFO_S;
|
||||
|
||||
/**
|
||||
* @ingroup los_monitor
|
||||
* Type of the CPU usage query.
|
||||
*/
|
||||
typedef enum {
|
||||
SYS_CPU_USAGE = 0, /* system cpu occupancy rate */
|
||||
TASK_CPU_USAGE, /* task cpu occupancy rate */
|
||||
} CPUP_TYPE_E;
|
||||
|
||||
/**
|
||||
* @ingroup los_monitor
|
||||
* Mode of the CPU usage query.
|
||||
*/
|
||||
typedef enum {
|
||||
CPUP_IN_10S = 0, /* cpu occupancy rate in 10s */
|
||||
CPUP_IN_1S, /* cpu occupancy rate in 1s */
|
||||
CPUP_LESS_THAN_1S, /* cpu occupancy rate less than 1s, if the input mode is none of them, it will be this. */
|
||||
} CPUP_MODE_E;
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the current CPU usage.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the current CPU usage.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, error codes will be returned.</li>
|
||||
* <li> The precision of the CPU usage can be adjusted by changing the value of the CPUP_PRECISION macro.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #cpup [0,100], current CPU usage, of which the precision is adjustable.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_SysCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_SysCpuUsage(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the historical CPU usage.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the historical CPU usage.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param mode [IN] UINT16. Task mode. The parameter value 0 indicates that the CPU usage within 10s will be
|
||||
* obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained. Other values
|
||||
* indicate that the CPU usage in the period that is less than 1s will be obtained.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #cpup [0,100], historical CPU usage, of which the precision is adjustable.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_HistoryTaskCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_HistorySysCpuUsage(UINT16 mode);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the CPU usage of a specified task.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the CPU usage of a task specified by a passed-in task ID.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* <li>The passed-in task ID must be valid and the task specified by the task ID must be created. Otherwise,
|
||||
* the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param taskID [IN] UINT32. Task ID.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #OS_ERRNO_CPUP_TSK_ID_INVALID 0x02001e05: The target task ID is invalid.
|
||||
* @retval #OS_ERRNO_CPUP_THREAD_NO_CREATED 0x02001e04: The target thread is not created.
|
||||
* @retval #cpup [0,100], CPU usage of the specified task.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_HistoryTaskCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_TaskCpuUsage(UINT32 taskID);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the historical CPU usage of a specified task.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the historical CPU usage of a task specified by a passed-in task ID.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise,
|
||||
* the CPU usage fails to be obtained.</li>
|
||||
* <li>The passed-in task ID must be valid and the task specified by the task ID must be created. Otherwise,
|
||||
* the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param taskID [IN] UINT32. Task ID.
|
||||
* @param mode [IN] UINT16. Task mode. The parameter value 0 indicates that the CPU usage within 10s
|
||||
* will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained.
|
||||
* Other values indicate that the CPU usage in the period that is less than 1s will be obtained.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #OS_ERRNO_CPUP_TSK_ID_INVALID 0x02001e05: The target task ID is invalid.
|
||||
* @retval #OS_ERRNO_CPUP_THREAD_NO_CREATED 0x02001e04: The target thread is not created.
|
||||
* @retval #cpup [0,100], CPU usage of the specified task.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_HistorySysCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_HistoryTaskCpuUsage(UINT32 taskID, UINT16 mode);
|
||||
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Obtain the CPU usage of all tasks.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain the CPU usage of all tasks according to maximum number of threads.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* <li>The input parameter pointer must not be NULL, Otherwise, the CPU usage fails to be obtained.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param cpupInfo [OUT]Type. CPUP_INFO_S* Pointer to the task CPUP information structure to be obtained.
|
||||
* @param mode [IN] UINT16. Task mode. The parameter value 0 indicates that the CPU usage within 10s
|
||||
* will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained.
|
||||
* Other values indicate that the CPU usage in the period that is less than 1s will be obtained.
|
||||
*
|
||||
* @retval #OS_ERRNO_CPUP_NO_INIT 0x02001e02: The CPU usage is not initialized.
|
||||
* @retval #OS_ERRNO_CPUP_TASK_PTR_NULL 0x02001e01: The input parameter pointer is NULL.
|
||||
* @retval #LOS_OK 0x00000000: The CPU usage of all tasks is successfully obtained.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_cpup.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_SysCpuUsage
|
||||
*/
|
||||
extern UINT32 LOS_AllTaskCpuUsage(CPUP_INFO_S *cpupInfo, UINT16 mode);
|
||||
|
||||
/**
|
||||
* @ingroup los_monitor
|
||||
* @brief Obtain CPU usage history of certain task.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to obtain CPU usage history of certain task.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>This API can be called only after the CPU usage is initialized. Otherwise, -1 will be returned.</li>
|
||||
* <li> Only in SYS_CPU_USAGE type, uwTaskID is invalid.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param type [IN] cpup type, SYS_CPU_USAGE and TASK_CPU_USAGE
|
||||
* @param mode [IN] mode,CPUP_IN_10S = usage in 10s,CPUP_IN_1S = usage in last 1s,
|
||||
* CPUP_LESS_THAN_1S = less than 1s, if the inpuit mode is none of them, it will be as CPUP_LESS_THAN_1S.
|
||||
* @param taskID [IN] task ID, Only in SYS_CPU_USAGE type, taskID is invalid
|
||||
*
|
||||
* @retval #OS_ERROR -1:CPU usage info obtain failed.
|
||||
* @retval #LOS_OK 0:CPU usage info is successfully obtained.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_monitor.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_CpupUsageMonitor
|
||||
*/
|
||||
extern UINT32 LOS_CpupUsageMonitor(CPUP_TYPE_E type, CPUP_MODE_E mode, UINT32 taskID);
|
||||
|
||||
/**
|
||||
* @ingroup los_task
|
||||
* Null task ID
|
||||
|
@ -1552,7 +1297,7 @@ extern UINT32 LOS_CpupUsageMonitor(CPUP_TYPE_E type, CPUP_MODE_E mode, UINT32 ta
|
|||
*
|
||||
* @retval 0 or 1. One indicates that the task ID is invalid, whereas zero indicates that the task ID is valid.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
#define OS_TSK_GET_INDEX(taskID) (taskID)
|
||||
|
@ -1569,7 +1314,7 @@ extern UINT32 LOS_CpupUsageMonitor(CPUP_TYPE_E type, CPUP_MODE_E mode, UINT32 ta
|
|||
*
|
||||
* @retval Pointer to the task control block.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
#define OS_TCB_FROM_PENDLIST(ptr) LOS_DL_LIST_ENTRY(ptr, LosTaskCB, pendList)
|
||||
|
@ -1586,7 +1331,7 @@ extern UINT32 LOS_CpupUsageMonitor(CPUP_TYPE_E type, CPUP_MODE_E mode, UINT32 ta
|
|||
*
|
||||
* @retval Pointer to the task control block.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
#define OS_TCB_FROM_TID(taskID) (((LosTaskCB *)g_taskCBArray) + (taskID))
|
||||
|
@ -1737,7 +1482,7 @@ extern LOS_DL_LIST g_taskRecyleList;
|
|||
*
|
||||
* @retval UINT32 Initialization result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
extern UINT32 OsTaskInit(VOID);
|
||||
|
@ -1758,7 +1503,7 @@ extern UINT32 OsTaskInit(VOID);
|
|||
*
|
||||
* @retval UINT32 Create result.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
extern UINT32 OsIdleTaskCreate(VOID);
|
||||
|
@ -1779,7 +1524,7 @@ extern UINT32 OsIdleTaskCreate(VOID);
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
extern VOID OsTaskSwitchCheck(VOID);
|
||||
|
@ -1800,7 +1545,7 @@ extern VOID OsTaskSwitchCheck(VOID);
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
extern VOID OsTaskMonInit(VOID);
|
||||
|
@ -1821,7 +1566,7 @@ extern VOID OsTaskMonInit(VOID);
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see
|
||||
*/
|
||||
extern VOID OsTaskEntry(UINT32 taskID);
|
||||
|
@ -1842,7 +1587,7 @@ extern VOID OsTaskEntry(UINT32 taskID);
|
|||
*
|
||||
* @retval UINT32 Task water line.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsGetTaskWaterLine(UINT32 taskID);
|
||||
|
@ -1863,7 +1608,7 @@ extern UINT32 OsGetTaskWaterLine(UINT32 taskID);
|
|||
*
|
||||
* @retval UINT8 * String.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT8 *OsConvertTskStatus(UINT16 taskStatus);
|
||||
|
@ -1884,7 +1629,7 @@ extern UINT8 *OsConvertTskStatus(UINT16 taskStatus);
|
|||
*
|
||||
* @retval UINT32 All task information.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_task_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsGetAllTskInfo(VOID);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @defgroup los_tick Tick
|
||||
* @defgroup los_tick
|
||||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
|
@ -99,13 +99,13 @@ extern "C" {
|
|||
extern UINT64 LOS_SysCycleGet(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* Number of milliseconds in one second.
|
||||
*/
|
||||
#define OS_SYS_MS_PER_SECOND 1000
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* Number of microseconds in one second.
|
||||
*/
|
||||
#define OS_SYS_US_PER_SECOND 1000000
|
||||
|
@ -125,7 +125,7 @@ extern UINT64 LOS_SysCycleGet(VOID);
|
|||
#define OS_NS_PER_TICK (OS_SYS_NS_PER_SECOND / LOSCFG_BASE_CORE_TICK_PER_SECOND)
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* System time basic function error code: Null pointer.
|
||||
*
|
||||
* Value: 0x02000010
|
||||
|
@ -135,7 +135,7 @@ extern UINT64 LOS_SysCycleGet(VOID);
|
|||
#define LOS_ERRNO_SYS_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_SYS, 0x10)
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* System time basic function error code: Invalid system clock configuration.
|
||||
*
|
||||
* Value: 0x02000011
|
||||
|
@ -145,7 +145,7 @@ extern UINT64 LOS_SysCycleGet(VOID);
|
|||
#define LOS_ERRNO_SYS_CLOCK_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_SYS, 0x11)
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* System time basic function error code: This error code is not in use temporarily.
|
||||
*
|
||||
* Value: 0x02000012
|
||||
|
@ -155,7 +155,7 @@ extern UINT64 LOS_SysCycleGet(VOID);
|
|||
#define LOS_ERRNO_SYS_MAXNUMOFCORES_IS_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_SYS, 0x12)
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* System time error code: This error code is not in use temporarily.
|
||||
*
|
||||
* Value: 0x02000013
|
||||
|
@ -165,7 +165,7 @@ extern UINT64 LOS_SysCycleGet(VOID);
|
|||
#define LOS_ERRNO_SYS_PERIERRCOREID_IS_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_SYS, 0x13)
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* System time error code: This error code is not in use temporarily.
|
||||
*
|
||||
* Value: 0x02000014
|
||||
|
@ -175,10 +175,10 @@ extern UINT64 LOS_SysCycleGet(VOID);
|
|||
#define LOS_ERRNO_SYS_HOOK_IS_FULL LOS_ERRNO_OS_ERROR(LOS_MOD_SYS, 0x14)
|
||||
|
||||
/**
|
||||
* @ingroup los_typedef
|
||||
* @ingroup los_tick
|
||||
* system time structure.
|
||||
*/
|
||||
typedef struct tagSysTime {
|
||||
typedef struct TagSysTime {
|
||||
UINT16 uwYear; /**< value 1970 ~ 2038 or 1970 ~ 2100 */
|
||||
UINT8 ucMonth; /**< value 1 - 12 */
|
||||
UINT8 ucDay; /**< value 1 - 31 */
|
||||
|
@ -189,7 +189,7 @@ typedef struct tagSysTime {
|
|||
} SYS_TIME_S;
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Obtain the number of Ticks.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -203,13 +203,13 @@ typedef struct tagSysTime {
|
|||
*
|
||||
* @retval UINT64 The number of Ticks.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None
|
||||
*/
|
||||
extern UINT64 LOS_TickCountGet(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Obtain the number of cycles in one second.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -223,13 +223,13 @@ extern UINT64 LOS_TickCountGet(VOID);
|
|||
*
|
||||
* @retval UINT32 Number of cycles obtained in one second.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None
|
||||
*/
|
||||
extern UINT32 LOS_CyclePerTickGet(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Convert Ticks to milliseconds.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -244,13 +244,13 @@ extern UINT32 LOS_CyclePerTickGet(VOID);
|
|||
* @retval UINT32 Number of milliseconds obtained through the conversion. Ticks are successfully converted to
|
||||
* milliseconds.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_MS2Tick
|
||||
*/
|
||||
extern UINT32 LOS_Tick2MS(UINT32 ticks);
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Convert milliseconds to Ticks.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -265,17 +265,11 @@ extern UINT32 LOS_Tick2MS(UINT32 ticks);
|
|||
*
|
||||
* @retval UINT32 Number of Ticks obtained through the conversion.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see LOS_Tick2MS
|
||||
*/
|
||||
extern UINT32 LOS_MS2Tick(UINT32 millisec);
|
||||
|
||||
/**
|
||||
* @ingroup los_tick
|
||||
* Count of Ticks
|
||||
*/
|
||||
extern UINT64 g_ullTickCount;
|
||||
|
||||
/**
|
||||
* @ingroup los_tick
|
||||
* Ticks per second
|
||||
|
@ -299,6 +293,7 @@ extern UINT32 g_cyclesPerTick;
|
|||
* System Clock
|
||||
*/
|
||||
extern UINT32 g_sysClock;
|
||||
|
||||
/**
|
||||
* @ingroup los_tick
|
||||
* @brief Handle the system tick timeout.
|
||||
|
@ -315,58 +310,58 @@ extern UINT32 g_sysClock;
|
|||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_tick_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern VOID OsTickHandler(VOID);
|
||||
|
||||
/**
|
||||
* @ingroup los_base
|
||||
* @ingroup los_tick
|
||||
* Define the CPU Tick structure.
|
||||
*/
|
||||
typedef struct tagCpuTick {
|
||||
typedef struct TagCpuTick {
|
||||
UINT32 cntHi; /* < Upper 32 bits of the tick value */
|
||||
UINT32 cntLo; /* < Lower 32 bits of the tick value */
|
||||
} CpuTick;
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* Number of operable bits of a 32-bit operand
|
||||
*/
|
||||
#define OS_SYS_MV_32_BIT 32
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* Number of milliseconds in one second.
|
||||
*/
|
||||
#define OS_SYS_MS_PER_SECOND 1000
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* Number of microseconds in one second.
|
||||
*/
|
||||
#define OS_SYS_US_PER_SECOND 1000000
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* The maximum length of name.
|
||||
*/
|
||||
#define OS_SYS_APPVER_NAME_MAX 64
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* The magic word.
|
||||
*/
|
||||
#define OS_SYS_MAGIC_WORD 0xAAAAAAAA
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* The initialization value of stack space.
|
||||
*/
|
||||
#define OS_SYS_EMPTY_STACK 0xCACACACA
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Convert cycles to milliseconds.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -383,13 +378,13 @@ typedef struct tagCpuTick {
|
|||
* @retval #LOS_ERRNO_SYS_PTR_NULL 0x02000011: Invalid parameter.
|
||||
* @retval #LOS_OK 0: Cycles are successfully converted to microseconds.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsCpuTick2MS(CpuTick *cpuTick, UINT32 *msHi, UINT32 *msLo);
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Convert cycles to microseconds.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -406,13 +401,13 @@ extern UINT32 OsCpuTick2MS(CpuTick *cpuTick, UINT32 *msHi, UINT32 *msLo);
|
|||
* @retval #LOS_ERRNO_SYS_PTR_NULL 0x02000011: Invalid parameter.
|
||||
* @retval #LOS_OK 0: Cycles are successfully converted to microseconds.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
extern UINT32 OsCpuTick2US(CpuTick *cpuTick, UINT32 *usHi, UINT32 *usLo);
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Convert cycles to milliseconds.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -426,7 +421,7 @@ extern UINT32 OsCpuTick2US(CpuTick *cpuTick, UINT32 *usHi, UINT32 *usLo);
|
|||
*
|
||||
* @retval Number of milliseconds obtained through the conversion. Cycles are successfully converted to milliseconds.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
STATIC_INLINE UINT64 OsCycle2MS(UINT64 cycle)
|
||||
|
@ -435,7 +430,7 @@ STATIC_INLINE UINT64 OsCycle2MS(UINT64 cycle)
|
|||
}
|
||||
|
||||
/**
|
||||
* @ingroup los_sys
|
||||
* @ingroup los_tick
|
||||
* @brief Convert cycles to microseconds.
|
||||
*
|
||||
* @par Description:
|
||||
|
@ -449,7 +444,7 @@ STATIC_INLINE UINT64 OsCycle2MS(UINT64 cycle)
|
|||
*
|
||||
* @retval Number of microseconds obtained through the conversion. Cycles are successfully converted to microseconds.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_sys_pri.h: the header file that contains the API declaration.</li></ul>
|
||||
* <ul><li>los_tick.h: the header file that contains the API declaration.</li></ul>
|
||||
* @see None.
|
||||
*/
|
||||
STATIC_INLINE UINT64 OsCycle2US(UINT64 cycle)
|
||||
|
|
Loading…
Reference in New Issue