SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::time::TimerHost::TimerCommand Struct Reference

POD command record passed from the public API methods to the tick task via the command queue. More...

Collaboration diagram for stk::time::TimerHost::TimerCommand:

Public Types

enum  EId : uint8_t {
  CMD_SHUTDOWN = 0 ,
  CMD_START ,
  CMD_STOP ,
  CMD_RESET ,
  CMD_RESTART ,
  CMD_START_OR_RESET ,
  CMD_SET_PERIOD
}
 Identifies the operation to perform on the target timer. More...

Public Attributes

EId cmd
 command id
Timertimer
 timer instance
Ticks timestamp
 hw tick count captured at call site
uint32_t delay
 initial delay ticks (CMD_START / CMD_RESTART / CMD_START_OR_RESET)
uint32_t period
 reload period ticks (CMD_START / CMD_RESTART / CMD_START_OR_RESET / CMD_SET_PERIOD)

Detailed Description

POD command record passed from the public API methods to the tick task via the command queue.

Each command encodes a single operation together with the timer pointer, a call-site timestamp, and optional delay/period arguments. Commands are produced by the public API (Start, Stop, Reset, …) and consumed exclusively by the tick task inside ProcessCommands().

Definition at line 394 of file stk_time_timer.h.

Member Enumeration Documentation

◆ EId

Identifies the operation to perform on the target timer.

Enumerator
CMD_SHUTDOWN 

shutdown timer host

CMD_START 

start timer

CMD_STOP 

stop timer

CMD_RESET 

reset timer

CMD_RESTART 

atomic stop + re-start

CMD_START_OR_RESET 

start if inactive, reset deadline if active and periodic

CMD_SET_PERIOD 

change period of a running periodic timer

Definition at line 399 of file stk_time_timer.h.

400 {
401 CMD_SHUTDOWN = 0,
402 CMD_START,
403 CMD_STOP,
404 CMD_RESET,
408 };
@ CMD_SET_PERIOD
change period of a running periodic timer
@ CMD_START_OR_RESET
start if inactive, reset deadline if active and periodic
@ CMD_RESTART
atomic stop + re-start

Member Data Documentation

◆ cmd

EId stk::time::TimerHost::TimerCommand::cmd

command id

Definition at line 410 of file stk_time_timer.h.

Referenced by stk::time::TimerHost::ProcessCommands(), and stk::time::TimerHost::PushCommand().

◆ delay

uint32_t stk::time::TimerHost::TimerCommand::delay

initial delay ticks (CMD_START / CMD_RESTART / CMD_START_OR_RESET)

Definition at line 413 of file stk_time_timer.h.

Referenced by stk::time::TimerHost::ProcessCommands().

◆ period

uint32_t stk::time::TimerHost::TimerCommand::period

reload period ticks (CMD_START / CMD_RESTART / CMD_START_OR_RESET / CMD_SET_PERIOD)

Definition at line 414 of file stk_time_timer.h.

Referenced by stk::time::TimerHost::ProcessCommands().

◆ timer

Timer* stk::time::TimerHost::TimerCommand::timer

timer instance

Definition at line 411 of file stk_time_timer.h.

Referenced by stk::time::TimerHost::ProcessCommands(), and stk::time::TimerHost::PushCommand().

◆ timestamp

Ticks stk::time::TimerHost::TimerCommand::timestamp

hw tick count captured at call site

Definition at line 412 of file stk_time_timer.h.

Referenced by stk::time::TimerHost::ProcessCommands().


The documentation for this struct was generated from the following file: