ChibiOS
21.6.0
|
Generic System Tick Driver. More...
Generic System Tick Driver.
This module implements a system tick timer in order to support the underlying operating system.
Functions | |
void | stInit (void) |
ST Driver initialization. More... | |
void | stBind (void) |
Enables an alarm interrupt on the invoking core. More... | |
systime_t | stGetCounter (void) |
Returns the time counter value. More... | |
void | stStartAlarm (systime_t abstime) |
Starts the alarm zero. More... | |
void | stStopAlarm (void) |
Stops the alarm zero interrupt. More... | |
void | stSetAlarm (systime_t abstime) |
Sets the alarm zero time. More... | |
systime_t | stGetAlarm (void) |
Returns the alarm zero current time. More... | |
bool | stIsAlarmActive (void) |
Determines if the alarm zero is active. More... | |
void | stSetCallback (unsigned alarm, st_callback_t cb) |
Associates a callback to an alarm. More... | |
void | stBindAlarmN (unsigned alarm) |
Enables an alarm interrupt on the invoking core. More... | |
void | stStartAlarmN (unsigned alarm, systime_t abstime) |
Starts an additional alarm. More... | |
void | stStopAlarmN (unsigned alarm) |
Stops an additional alarm. More... | |
void | stSetAlarmN (unsigned alarm, systime_t abstime) |
Sets an additional alarm time. More... | |
systime_t | stGetAlarmN (unsigned alarm) |
Returns an additional alarm current time. More... | |
bool | stIsAlarmActiveN (unsigned alarm) |
Determines if the specified alarm is active. More... | |
void | st_lld_init (void) |
Low level ST driver initialization. More... | |
static systime_t | st_lld_get_counter (void) |
Returns the time counter value. More... | |
static void | st_lld_start_alarm (systime_t abstime) |
Starts the alarm. More... | |
static void | st_lld_stop_alarm (void) |
Stops the alarm interrupt. More... | |
static void | st_lld_set_alarm (systime_t abstime) |
Sets the alarm time. More... | |
static systime_t | st_lld_get_alarm (void) |
Returns the current alarm time. More... | |
static bool | st_lld_is_alarm_active (void) |
Determines if the alarm is active. More... | |
Variables | |
st_callback_t | st_callbacks [ST_LLD_NUM_ALARMS] |
Callback pointers for each alarm. More... | |
void stInit | ( | void | ) |
ST Driver initialization.
halInit()
, there is no need to explicitly initialize the driver.Definition at line 69 of file hal_st.c.
Referenced by halInit().
void stBind | ( | void | ) |
systime_t stGetCounter | ( | void | ) |
Returns the time counter value.
Definition at line 103 of file hal_st.c.
References st_lld_get_counter().
void stStartAlarm | ( | systime_t | abstime | ) |
Starts the alarm zero.
[in] | abstime | the time to be set for the first alarm |
Definition at line 119 of file hal_st.c.
References osalDbgAssert, st_lld_start_alarm(), and stIsAlarmActive().
void stStopAlarm | ( | void | ) |
Stops the alarm zero interrupt.
Definition at line 133 of file hal_st.c.
References st_lld_stop_alarm().
void stSetAlarm | ( | systime_t | abstime | ) |
Sets the alarm zero time.
[in] | abstime | the time to be set for the next alarm |
Definition at line 147 of file hal_st.c.
References osalDbgAssert, st_lld_set_alarm(), and stIsAlarmActive().
systime_t stGetAlarm | ( | void | ) |
Returns the alarm zero current time.
Definition at line 163 of file hal_st.c.
References osalDbgAssert, st_lld_get_alarm(), and stIsAlarmActive().
bool stIsAlarmActive | ( | void | ) |
Determines if the alarm zero is active.
false | if the alarm is not active. |
true | is the alarm is active |
Definition at line 179 of file hal_st.c.
References st_lld_is_alarm_active().
Referenced by stGetAlarm(), stSetAlarm(), and stStartAlarm().
void stSetCallback | ( | unsigned | alarm, |
st_callback_t | cb | ||
) |
Associates a callback to an alarm.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
[in] | cb | alarm callback or NULL |
void stBindAlarmN | ( | unsigned | alarm | ) |
Enables an alarm interrupt on the invoking core.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
Definition at line 213 of file hal_st.c.
References osalDbgCheck.
void stStartAlarmN | ( | unsigned | alarm, |
systime_t | abstime | ||
) |
Starts an additional alarm.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
[in] | abstime | the time to be set for the first alarm |
Definition at line 234 of file hal_st.c.
References osalDbgCheck.
void stStopAlarmN | ( | unsigned | alarm | ) |
Stops an additional alarm.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
Definition at line 251 of file hal_st.c.
References osalDbgCheck.
void stSetAlarmN | ( | unsigned | alarm, |
systime_t | abstime | ||
) |
Sets an additional alarm time.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
[in] | abstime | the time to be set for the next alarm |
Definition at line 268 of file hal_st.c.
References osalDbgCheck.
systime_t stGetAlarmN | ( | unsigned | alarm | ) |
Returns an additional alarm current time.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
Definition at line 286 of file hal_st.c.
References osalDbgCheck.
bool stIsAlarmActiveN | ( | unsigned | alarm | ) |
Determines if the specified alarm is active.
[in] | alarm | alarm channel number (0..ST_LLD_NUM_ALARMS-1) |
false | if the alarm is not active. |
true | is the alarm is active |
Definition at line 304 of file hal_st.c.
References osalDbgCheck.
void st_lld_init | ( | void | ) |
Low level ST driver initialization.
Definition at line 62 of file hal_st_lld.c.
|
inlinestatic |
Returns the time counter value.
Definition at line 73 of file hal_st_lld.h.
Referenced by stGetCounter().
|
inlinestatic |
Starts the alarm.
[in] | abstime | the time to be set for the first alarm |
Definition at line 87 of file hal_st_lld.h.
Referenced by stStartAlarm().
|
inlinestatic |
Stops the alarm interrupt.
Definition at line 97 of file hal_st_lld.h.
Referenced by stStopAlarm().
|
inlinestatic |
Sets the alarm time.
[in] | abstime | the time to be set for the next alarm |
Definition at line 108 of file hal_st_lld.h.
Referenced by stSetAlarm().
|
inlinestatic |
Returns the current alarm time.
Definition at line 120 of file hal_st_lld.h.
Referenced by stGetAlarm().
|
inlinestatic |
Determines if the alarm is active.
false | if the alarm is not active. |
true | is the alarm is active |
Definition at line 134 of file hal_st_lld.h.
Referenced by stIsAlarmActive().