mirror of
https://github.com/apache/nuttx.git
synced 2025-12-10 12:14:36 +08:00
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:
committed by
Xiang Xiao
parent
a923cfe4ed
commit
6689a408f3
@@ -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.
|
||||
|
||||
@@ -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 |
@@ -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*
|
||||
|
||||
Reference in New Issue
Block a user