# KAL ## **Overview** Defines the kernel adaptation layer \(KAL\), which provides compatible interfaces across different types of OpenHarmony devices. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Files
Defines the kernel adaptation layer (KAL), which provides compatible interfaces across different types of OpenHarmony devices. |
KalTimerType { KAL_TIMER_ONCE = 0, KAL_TIMER_PERIODIC = 1 } |
|
KalErrCode { KAL_OK = 0, KAL_ERR_PARA = 1, KAL_ERR_INNER = 2, KAL_ERR_TIMER_STATE = 0x100 } |
KalThreadGetInfo (unsigned int threadId, ThreadInfo *info) |
|
KalDelayUs (unsigned int us) |
|
KalTimerCreate (KalTimerProc func, KalTimerType type, void *arg, unsigned int ticks) |
|
KalTimerStart (KalTimerId timerId) |
|
KalTimerChange (KalTimerId timerId, unsigned int ticks) |
|
KalTimerStop (KalTimerId timerId) |
|
KalTimerDelete (KalTimerId timerId) |
|
KalTimerIsRunning (KalTimerId timerId) |
|
KalTickToMs (unsigned int ticks) |
|
KalMsToTick (unsigned int millisec) |
|
KalGetMemInfo (MemInfo *pmemInfo) |
Indicates the number of microseconds to delay. The actual delay precision is one tick. |
Indicates the pointer to the buffer for storing the obtained thread information. |
Indicates the ID of the timer whose duration is to change, which is the value returned by KalTimerCreate. |
|
Indicates the entry to timer callback. The callback is triggered when the timer expires. |
|
Indicates the pointer to the argument used in timer callback. |
|
Indicates the ID of the timer to delete, which is the value returned by KalTimerCreate. |
Indicates the ID of the timer to check, which is the value returned by KalTimerCreate. |
Indicates the ID of the timer to start, which is the value returned by KalTimerCreate. |
Indicates the ID of the timer to stop, which is the value returned by KalTimerCreate. |