![]() |
SuperTinyKernel™ RTOS 1.06.0
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Public Member Functions | |
| StkTimer (osTimerFunc_t f, osTimerType_t t, void *arg, const char *n) | |
| virtual | ~StkTimer () |
| void | OnExpired (stk::time::TimerHost *) override |
| bool | IsActive () const |
| Ticks | GetDeadline () const |
| Ticks | GetTimestamp () const |
| uint32_t | GetPeriod () const |
| uint32_t | GetRemainingTime () const |
| Get remaining ticks until the timer next expires. | |
Static Public Member Functions | |
| static bool | EnsureTimerHostCreated () |
Public Attributes | |
| osTimerFunc_t | m_func |
| void * | m_argument |
| osTimerType_t | m_type |
| const char * | m_name |
| uint32_t | m_period_ticks |
| bool | m_cb_owned |
Private Types | |
| typedef DListEntry< Timer, _ClosedLoop > | DLEntryType |
| Convenience alias for this entry type. Used to avoid repeating the full template spelling. | |
| typedef DListHead< Timer, _ClosedLoop > | DLHeadType |
| Convenience alias for the corresponding list head type. | |
Private Member Functions | |
| STK_NONCOPYABLE_CLASS (Timer) | |
| DLHeadType * | GetHead () const |
| Get the list head this entry currently belongs to. | |
| DLEntryType * | GetNext () const |
| Get the next entry in the list. | |
| DLEntryType * | GetPrev () const |
| Get the previous entry in the list. | |
| bool | IsLinked () const |
| Check whether this entry is currently a member of any list. | |
| operator Timer * () | |
| Implicit conversion to a mutable pointer to the host object (T). | |
| operator const Timer * () const | |
| Implicit conversion to a const pointer to the host object (T). | |
| void | Link (DLHeadType *head, DLEntryType *next, DLEntryType *prev) |
| Wire this entry into a list between prev and next. | |
| void | Unlink () |
| Remove this entry from its current list. | |
Private Attributes | |
| Ticks | m_deadline |
| absolute expiration time (ticks) | |
| Ticks | m_timestamp |
| time at which timer expired (ticks), updated by TimerHost | |
| uint32_t | m_period |
| reload period in ticks (0 = one-shot) | |
| volatile bool | m_active |
| true if active | |
| volatile bool | m_pending |
| true if pending to be handled | |
| DLHeadType * | m_head |
Owning list head, or NULL when the entry is not linked. | |
| DLEntryType * | m_next |
Next entry in the list, or NULL (open list boundary) / first entry (closed loop). | |
| DLEntryType * | m_prev |
Previous entry in the list, or NULL (open list boundary) / last entry (closed loop). | |
Definition at line 306 of file cmsis_os2_stk.cpp.
|
inherited |
Convenience alias for this entry type. Used to avoid repeating the full template spelling.
Definition at line 70 of file stk_linked_list.h.
|
inherited |
Convenience alias for the corresponding list head type.
Definition at line 75 of file stk_linked_list.h.
|
inlineexplicit |
Definition at line 308 of file cmsis_os2_stk.cpp.
References m_argument, m_cb_owned, m_func, m_name, m_period_ticks, and m_type.
|
inlinevirtual |
Definition at line 311 of file cmsis_os2_stk.cpp.
|
inlinestatic |
Definition at line 319 of file cmsis_os2_stk.cpp.
References stk::ACCESS_PRIVILEGED, g_StkKernel, g_TimerHost, and g_TimerHostBuf.
Referenced by osTimerNew().
|
inlineinherited |
Definition at line 154 of file stk_time_timer.h.
References m_deadline.
Referenced by stk_timer_get_deadline().
|
inlineinherited |
Get the list head this entry currently belongs to.
NULL if the entry is not linked. Definition at line 80 of file stk_linked_list.h.
|
inlineinherited |
Get the next entry in the list.
NULL if this is the last entry (open list) or the first entry (closed loop, where next wraps to first). _ClosedLoop == true) this pointer is never NULL when the entry is linked. Definition at line 88 of file stk_linked_list.h.
|
inlineinherited |
Definition at line 156 of file stk_time_timer.h.
References m_period.
Referenced by stk_timer_get_period().
|
inlineinherited |
Get the previous entry in the list.
NULL if this is the first entry (open list) or the last entry (closed loop, where prev wraps to last). _ClosedLoop == true) this pointer is never NULL when the entry is linked. Definition at line 96 of file stk_linked_list.h.
|
inlineinherited |
Get remaining ticks until the timer next expires.
Definition at line 371 of file stk_time_timer.h.
References stk::GetTicks(), m_active, and m_deadline.
Referenced by stk_timer_get_remaining_time().
|
inlineinherited |
Definition at line 155 of file stk_time_timer.h.
References m_timestamp.
Referenced by stk_timer_get_timestamp().
|
inlineinherited |
Definition at line 153 of file stk_time_timer.h.
References m_active.
Referenced by osTimerDelete(), osTimerStop(), stk_timer_destroy(), and stk_timer_is_active().
|
inlineinherited |
Check whether this entry is currently a member of any list.
true if linked (m_head != NULL); false otherwise. Definition at line 101 of file stk_linked_list.h.
|
inlineprivateinherited |
Wire this entry into a list between prev and next.
| [in] | head | The owning DListHead. Stored as a back-pointer for IsLinked() and ownership checks. |
| [in] | next | The entry that will follow this one, or NULL if this becomes the last entry. |
| [in] | prev | The entry that will precede this one, or NULL if this becomes the first entry. |
Definition at line 137 of file stk_linked_list.h.
|
inlineoverridevirtual |
Implements stk::time::TimerHost::Timer.
Definition at line 314 of file cmsis_os2_stk.cpp.
References m_argument, and m_func.
|
inlineinherited |
Implicit conversion to a const pointer to the host object (T).
Definition at line 115 of file stk_linked_list.h.
|
inlineinherited |
Implicit conversion to a mutable pointer to the host object (T).
Definition at line 108 of file stk_linked_list.h.
|
privateinherited |
|
inlineprivateinherited |
Remove this entry from its current list.
Definition at line 157 of file stk_linked_list.h.
|
privateinherited |
true if active
Definition at line 172 of file stk_time_timer.h.
Referenced by GetRemainingTime(), IsActive(), stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::Reset(), stk::time::TimerHost::SetPeriod(), stk::time::TimerHost::Start(), stk::time::TimerHost::Stop(), Timer(), and stk::time::TimerHost::UpdateTime().
| void* StkTimer::m_argument |
Definition at line 332 of file cmsis_os2_stk.cpp.
Referenced by OnExpired(), and StkTimer().
| bool StkTimer::m_cb_owned |
Definition at line 336 of file cmsis_os2_stk.cpp.
Referenced by StkTimer().
|
privateinherited |
absolute expiration time (ticks)
Definition at line 169 of file stk_time_timer.h.
Referenced by GetDeadline(), GetRemainingTime(), stk::time::TimerHost::ProcessCommands(), Timer(), and stk::time::TimerHost::UpdateTime().
| osTimerFunc_t StkTimer::m_func |
Definition at line 331 of file cmsis_os2_stk.cpp.
Referenced by OnExpired(), and StkTimer().
|
privateinherited |
Owning list head, or NULL when the entry is not linked.
Definition at line 170 of file stk_linked_list.h.
| const char* StkTimer::m_name |
Definition at line 334 of file cmsis_os2_stk.cpp.
Referenced by StkTimer().
|
privateinherited |
Next entry in the list, or NULL (open list boundary) / first entry (closed loop).
Definition at line 171 of file stk_linked_list.h.
|
privateinherited |
true if pending to be handled
Definition at line 173 of file stk_time_timer.h.
Referenced by stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::ProcessTimers(), Timer(), and stk::time::TimerHost::UpdateTime().
|
privateinherited |
reload period in ticks (0 = one-shot)
Definition at line 171 of file stk_time_timer.h.
Referenced by GetPeriod(), stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::Reset(), stk::time::TimerHost::SetPeriod(), Timer(), and stk::time::TimerHost::UpdateTime().
| uint32_t StkTimer::m_period_ticks |
Definition at line 335 of file cmsis_os2_stk.cpp.
Referenced by osTimerStart(), and StkTimer().
|
privateinherited |
Previous entry in the list, or NULL (open list boundary) / last entry (closed loop).
Definition at line 172 of file stk_linked_list.h.
|
privateinherited |
time at which timer expired (ticks), updated by TimerHost
Definition at line 170 of file stk_time_timer.h.
Referenced by GetTimestamp(), Timer(), and stk::time::TimerHost::UpdateTime().
| osTimerType_t StkTimer::m_type |
Definition at line 333 of file cmsis_os2_stk.cpp.
Referenced by osTimerStart(), and StkTimer().