mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
timer: add timer operation support
Add basic timer operations to the kernel, including registration, start/stop, and callback handling. This provides a consistent timer interface for use by kernel components and drivers. Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
This commit is contained in:
@@ -68,6 +68,13 @@
|
||||
* struct timer_notify_s.
|
||||
* TCIOC_MAXTIMEOUT - Get the maximum supported timeout value
|
||||
* Argument: A 32-bit timeout value in microseconds.
|
||||
* TCIOC_TICK_GETSTATUS - Get the status of the timer.
|
||||
* Argument: A writeable pointer to struct
|
||||
* timer_status_s.
|
||||
* TCIOC_TICK_SETTIMEOUT - Reset the timer timeout to this value
|
||||
* Argument: A 32-bit timeout value in ticks.
|
||||
* TCIOC_TICK_MAXTIMEOUT - Get the maximum supported timeout value
|
||||
* Argument: A 32-bit timeout value in ticks.
|
||||
*
|
||||
* WARNING: May change TCIOC_SETTIMEOUT to pass pointer to 64bit nanoseconds
|
||||
* or timespec structure.
|
||||
@@ -78,12 +85,15 @@
|
||||
* range.
|
||||
*/
|
||||
|
||||
#define TCIOC_START _TCIOC(0x0001)
|
||||
#define TCIOC_STOP _TCIOC(0x0002)
|
||||
#define TCIOC_GETSTATUS _TCIOC(0x0003)
|
||||
#define TCIOC_SETTIMEOUT _TCIOC(0x0004)
|
||||
#define TCIOC_NOTIFICATION _TCIOC(0x0005)
|
||||
#define TCIOC_MAXTIMEOUT _TCIOC(0x0006)
|
||||
#define TCIOC_START _TCIOC(0x0001)
|
||||
#define TCIOC_STOP _TCIOC(0x0002)
|
||||
#define TCIOC_GETSTATUS _TCIOC(0x0003)
|
||||
#define TCIOC_SETTIMEOUT _TCIOC(0x0004)
|
||||
#define TCIOC_NOTIFICATION _TCIOC(0x0005)
|
||||
#define TCIOC_MAXTIMEOUT _TCIOC(0x0006)
|
||||
#define TCIOC_TICK_GETSTATUS _TCIOC(0x0007)
|
||||
#define TCIOC_TICK_SETTIMEOUT _TCIOC(0x0008)
|
||||
#define TCIOC_TICK_MAXTIMEOUT _TCIOC(0x0009)
|
||||
|
||||
/* Bit Settings *************************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user