|
ChibiOS/HAL 9.0.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.

Macros | |
| #define | ST_LLD_NUM_ALARMS 1 |
Typedefs | |
| typedef void(* | st_callback_t) (unsigned alarm) |
Functions | |
| void | stInit (void) |
| ST Driver initialization. | |
| void | stBind (void) |
| Enables an alarm interrupt on the invoking core. | |
| systime_t | stGetCounter (void) |
| Returns the time counter value. | |
| void | stStartAlarm (systime_t abstime) |
| Starts the alarm zero. | |
| void | stStopAlarm (void) |
| Stops the alarm zero interrupt. | |
| void | stSetAlarm (systime_t abstime) |
| Sets the alarm zero time. | |
| systime_t | stGetAlarm (void) |
| Returns the alarm zero current time. | |
| bool | stIsAlarmActive (void) |
| Determines if the alarm zero is active. | |
| void | stSetCallback (unsigned alarm, st_callback_t cb) |
| Associates a callback to an alarm. | |
| void | stBindAlarmN (unsigned alarm) |
| Enables an alarm interrupt on the invoking core. | |
| void | stStartAlarmN (unsigned alarm, systime_t abstime) |
| Starts an additional alarm. | |
| void | stStopAlarmN (unsigned alarm) |
| Stops an additional alarm. | |
| void | stSetAlarmN (unsigned alarm, systime_t abstime) |
| Sets an additional alarm time. | |
| systime_t | stGetAlarmN (unsigned alarm) |
| Returns an additional alarm current time. | |
| bool | stIsAlarmActiveN (unsigned alarm) |
| Determines if the specified alarm is active. | |
| void | st_lld_init (void) |
| Low level ST driver initialization. | |
| static systime_t | st_lld_get_counter (void) |
| Returns the time counter value. | |
| static void | st_lld_start_alarm (systime_t abstime) |
| Starts the alarm. | |
| static void | st_lld_stop_alarm (void) |
| Stops the alarm interrupt. | |
| static void | st_lld_set_alarm (systime_t abstime) |
| Sets the alarm time. | |
| static systime_t | st_lld_get_alarm (void) |
| Returns the current alarm time. | |
| static bool | st_lld_is_alarm_active (void) |
| Determines if the alarm is active. | |
Variables | |
| st_callback_t | st_callbacks [ST_LLD_NUM_ALARMS] |
| Callback pointers for each alarm. | |
| #define ST_LLD_NUM_ALARMS 1 |
Definition at line 46 of file hal_st.h.
Referenced by stBindAlarmN(), stGetAlarmN(), stInit(), stIsAlarmActiveN(), stSetAlarmN(), stSetCallback(), stStartAlarmN(), and stStopAlarmN().
| 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.
References st_callbacks, st_lld_init(), and ST_LLD_NUM_ALARMS.
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 stBindAlarmN(), 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 |
Definition at line 197 of file hal_st.c.
References osalDbgCheck, st_callbacks, and ST_LLD_NUM_ALARMS.
| 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 osalDbgAssert, osalDbgCheck, ST_LLD_NUM_ALARMS, and stIsAlarmActive().

| 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 osalDbgAssert, osalDbgCheck, ST_LLD_NUM_ALARMS, and stIsAlarmActiveN().

| 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, and ST_LLD_NUM_ALARMS.
| 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 osalDbgAssert, osalDbgCheck, ST_LLD_NUM_ALARMS, and stIsAlarmActiveN().

| 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 osalDbgAssert, osalDbgCheck, ST_LLD_NUM_ALARMS, and stIsAlarmActiveN().

| 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, and ST_LLD_NUM_ALARMS.
Referenced by stGetAlarmN(), stSetAlarmN(), and stStartAlarmN().
| void st_lld_init | ( | void | ) |
Low level ST driver initialization.
Definition at line 62 of file hal_st_lld.c.
Referenced by stInit().
|
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().
| st_callback_t st_callbacks[ST_LLD_NUM_ALARMS] |
Callback pointers for each alarm.
Definition at line 51 of file hal_st.c.
Referenced by stInit(), and stSetCallback().