Documentation/drivers/timers: Add information about timers.

This commit added additional informantion about the timer driver
abstraction.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen
2025-11-24 09:49:35 +08:00
committed by Xiang Xiao
parent a923cfe4ed
commit 6689a408f3
4 changed files with 30 additions and 5 deletions

View File

@@ -6,8 +6,31 @@ Timers Drivers
:caption: Supported Drivers
timer.rst
oneshot.rst
pwm.rst
watchdog.rst
rtc.rst
capture.rst
The NuttX timing subsystem consists of four layers:
.. figure:: timer.svg
* 1 Hardware Timer Drivers: Includes implementations of various hardware
timer drivers.
* 2 Timer Driver Abstraction: Such as Oneshot and Timer, which provide
oneshot/periodical timer hardware abstraction.
* 3 OS Timer Interfaces: Arch_Timer(up_timer_*) and Arch_Alarm(up_alarm_*),
offering relative timer (trigger an event with a certain delay)
and absolute timer (trigger an event at a certain time)
interfaces.
* 4 OS Timer Abstraction: The wdog timer manages software timers
and provides a unified timer API to upper layers.
The Timer Driver Abstraction is not mandatory. If the driver is simple enough
(e.g.,just providing a periodic tick), the OS Timer interfaces Arch_Timer
can be implemented directly, bypassing the timer driver abstraction layer.
The design purpose of the Timer Driver Abstraction is to simplify driver
implementation, improve performance, and enhance the reusability of driver
code.

View File

@@ -7,10 +7,12 @@ The NuttX timing subsystem consists of four layers:
* 1 Hardware Timer Drivers: Includes implementations of various hardware
timer drivers.
* 2 Timer Driver Abstraction: Such as Oneshot and Timer, which provide
timer hardware abstraction.
* 3 OS Timer Interfaces: Timer and Alarm, offering relative and
absolute timer interfaces.
* 4 OS Timer Abstraction: The wdog (watchdog) module manages software timers
oneshot/periodical timer hardware abstraction.
* 3 OS Timer Interfaces: Arch_Timer(up_timer_*) and Arch_Alarm(up_alarm_*),
offering relative timer (trigger an event with a certain delay)
and absolute timer (trigger an event at a certain time)
interfaces.
* 4 OS Timer Abstraction: The wdog timer manages software timers
and provides a unified timer API to upper layers.
Here we focus on the oneshot timer driver abstraction.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -12,7 +12,6 @@ divided in three classes:
block/index.rst
special/index.rst
thermal/index.rst
timers/oneshot/index.rst
.. note::
Device driver support depends on the *in-memory*, *pseudo*