|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|

结构体 | |
| struct | tagSysTime |
宏定义 | |
| #define | OS_SYS_MS_PER_SECOND 1000 |
| #define | OS_SYS_US_PER_SECOND 1000000 |
| #define | OS_SYS_NS_PER_SECOND 1000000000 |
| #define | OS_SYS_US_PER_MS 1000 |
| #define | OS_SYS_NS_PER_MS 1000000 |
| #define | OS_SYS_NS_PER_US 1000 |
| #define | LOS_ERRNO_TICK_CFG_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_TICK, 0x00) |
| #define | LOS_ERRNO_TICK_NO_HWTIMER LOS_ERRNO_OS_ERROR(LOS_MOD_TICK, 0x01) |
| #define | LOS_ERRNO_TICK_PER_SEC_TOO_SMALL LOS_ERRNO_OS_ERROR(LOS_MOD_TICK, 0x02) |
类型定义 | |
| typedef struct tagSysTime | SYS_TIME_S |
函数 | |
| UINT64 | LOS_TickCountGet (void) |
| Obtain the number of Ticks. | |
| UINT32 | LOS_CyclePerTickGet (void) |
| Obtain the number of cycles in one tick. | |
| UINT32 | LOS_Tick2MS (UINT32 tick) |
| Convert Ticks to milliseconds. | |
| UINT32 | LOS_MS2Tick (UINT32 millisec) |
| Convert milliseconds to Ticks. | |
| void | LOS_GetCpuCycle (UINT32 *puwCntHi, UINT32 *puwCntLo) |
| Obtain system cycle count. | |
| UINT64 | LOS_CurrNanosec (void) |
| Obtain system time in nanoseconds. | |
| void | LOS_Udelay (UINT32 usecs) |
| spinning-delay in microsecond (us). | |
| void | LOS_Mdelay (UINT32 msecs) |
| spinning-delay in millisecond (ms). | |
| #define LOS_ERRNO_TICK_CFG_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_TICK, 0x00) |
Tick error code: The Tick configuration is incorrect.
Value: 0x02000400.
Solution: Change values of the OS_SYS_CLOCK and #LOSCFG_BASE_CORE_TICK_PER_SECOND in los_config.h.
| #define LOS_ERRNO_TICK_NO_HWTIMER LOS_ERRNO_OS_ERROR(LOS_MOD_TICK, 0x01) |
Tick error code: This error code is not in use temporarily.
Value: 0x02000401
| #define LOS_ERRNO_TICK_PER_SEC_TOO_SMALL LOS_ERRNO_OS_ERROR(LOS_MOD_TICK, 0x02) |
Tick error code: This error code is not in use temporarily.
Value: 0x02000402
| #define OS_SYS_MS_PER_SECOND 1000 |
Number of milliseconds in one second.
| #define OS_SYS_NS_PER_MS 1000000 |
Number of nanoseconds in one milliseconds.
| #define OS_SYS_NS_PER_SECOND 1000000000 |
Number of nanoseconds in one second.
| #define OS_SYS_NS_PER_US 1000 |
Number of nanoseconds in one microsecond.
| #define OS_SYS_US_PER_MS 1000 |
Number of microseconds in one milliseconds.
| #define OS_SYS_US_PER_SECOND 1000000 |
Number of microseconds in one second.
| typedef struct tagSysTime SYS_TIME_S |
system time structure.
|
extern |
Obtain system time in nanoseconds.
| None. |
| UINT64 | system time in nanoseconds. |
|
extern |
Obtain the number of cycles in one tick.
| None. |
| UINT32 | Number of cycles in one tick. |
Obtain system cycle count.
| puwCntHi | [OUT] Type UINT32 Pointer to the higher 32bit of cycles to be obtained. |
| puwCntLo | [OUT] Type UINT32 Pointer to the lower 32bit of cycles to be obtained. |
| None. |
|
extern |
spinning-delay in millisecond (ms).
| msecs | millisecond needs to delay. |
| None. |
Convert milliseconds to Ticks.
| millisec | [IN] The milliseconds need to be converted to Ticks. If KERNEL_TICK_PER_SECOND > OS_SYS_MS_PER_SECOND, the value range is (0, 0xFFFFFFFF * OS_SYS_MS_PER_SECOND / KERNEL_TICK_PER_SECOND). If KERNEL_TICK_PER_SECOND <= OS_SYS_MS_PER_SECOND, the value range is (0, 0xFFFFFFFF]. |
| UINT32 | Number of Ticks obtained through the conversion. If 32-bit integer overflow occurs in the conversion, retval will be fixed at 0xFFFFFFFF. |
Convert Ticks to milliseconds.
| tick | [IN] Number of Ticks. If KERNEL_TICK_PER_SECOND > OS_SYS_MS_PER_SECOND, the value range is (0, 0xFFFFFFFF]. If KERNEL_TICK_PER_SECOND <= OS_SYS_MS_PER_SECOND, the value range is (0, 0xFFFFFFFF * KERNEL_TICK_PER_SECOND / OS_SYS_MS_PER_SECOND]. |
| UINT32 | Milliseconds obtained through the conversion. If 32-bit integer overflow occurs in the conversion, retval will be fixed at 0xFFFFFFFF. |
|
extern |
Obtain the number of Ticks.
| None |
| UINT64 | The number of Ticks. |
|
extern |
spinning-delay in microsecond (us).
| usecs | microsecond needs to delay. |
| None. |