ChibiOS/HAL  6.1.0
ST Driver

Generic System Tick Driver. More...

Collaboration diagram for ST Driver:

Detailed Description

Generic System Tick Driver.

This module implements a system tick timer in order to support the underlying operating system.

Macro Functions

#define stGetCounter()   st_lld_get_counter()
 Returns the time counter value. More...
 
#define stIsAlarmActive()   st_lld_is_alarm_active()
 Determines if the alarm is active. More...
 

Functions

void stInit (void)
 ST Driver initialization. More...
 
void stStartAlarm (systime_t abstime)
 Starts the alarm. More...
 
void stStopAlarm (void)
 Stops the alarm interrupt. More...
 
void stSetAlarm (systime_t abstime)
 Sets the alarm time. More...
 
systime_t stGetAlarm (void)
 Returns the current alarm time. 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...
 

Macro Definition Documentation

#define stGetCounter ( )    st_lld_get_counter()

Returns the time counter value.

Note
This functionality is only available in free running mode, the behaviour in periodic mode is undefined.
Returns
The counter value.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 65 of file hal_st.h.

#define stIsAlarmActive ( )    st_lld_is_alarm_active()

Determines if the alarm is active.

Returns
The alarm status.
Return values
falseif the alarm is not active.
trueis the alarm is active
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 76 of file hal_st.h.

Referenced by stGetAlarm(), stSetAlarm(), and stStartAlarm().

Function Documentation

void stInit ( void  )

ST Driver initialization.

Note
This function is implicitly invoked by halInit(), there is no need to explicitly initialize the driver.
Function Class:Initializer, this function just initializes an object and can be invoked before the kernel is initialized.

Definition at line 60 of file hal_st.c.

References st_lld_init().

Referenced by halInit().

Here is the call graph for this function:

void stStartAlarm ( systime_t  abstime)

Starts the alarm.

Note
Makes sure that no spurious alarms are triggered after this call.
This functionality is only available in free running mode, the behavior in periodic mode is undefined.
Parameters
[in]abstimethe time to be set for the first alarm
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 76 of file hal_st.c.

References osalDbgAssert, st_lld_start_alarm(), and stIsAlarmActive.

Here is the call graph for this function:

void stStopAlarm ( void  )

Stops the alarm interrupt.

Note
This functionality is only available in free running mode, the behavior in periodic mode is undefined.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 90 of file hal_st.c.

References st_lld_stop_alarm().

Here is the call graph for this function:

void stSetAlarm ( systime_t  abstime)

Sets the alarm time.

Note
This functionality is only available in free running mode, the behavior in periodic mode is undefined.
Parameters
[in]abstimethe time to be set for the next alarm
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 104 of file hal_st.c.

References osalDbgAssert, st_lld_set_alarm(), and stIsAlarmActive.

Here is the call graph for this function:

systime_t stGetAlarm ( void  )

Returns the current alarm time.

Note
This functionality is only available in free running mode, the behavior in periodic mode is undefined.
Returns
The currently set alarm time.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 120 of file hal_st.c.

References osalDbgAssert, st_lld_get_alarm(), and stIsAlarmActive.

Here is the call graph for this function:

void st_lld_init ( void  )

Low level ST driver initialization.

Function Class:Not an API, this function is for internal use only.

Definition at line 62 of file hal_st_lld.c.

Referenced by stInit().

static systime_t st_lld_get_counter ( void  )
inlinestatic

Returns the time counter value.

Returns
The counter value.
Function Class:Not an API, this function is for internal use only.

Definition at line 73 of file hal_st_lld.h.

static void st_lld_start_alarm ( systime_t  abstime)
inlinestatic

Starts the alarm.

Note
Makes sure that no spurious alarms are triggered after this call.
Parameters
[in]abstimethe time to be set for the first alarm
Function Class:Not an API, this function is for internal use only.

Definition at line 87 of file hal_st_lld.h.

Referenced by stStartAlarm().

static void st_lld_stop_alarm ( void  )
inlinestatic

Stops the alarm interrupt.

Function Class:Not an API, this function is for internal use only.

Definition at line 97 of file hal_st_lld.h.

Referenced by stStopAlarm().

static void st_lld_set_alarm ( systime_t  abstime)
inlinestatic

Sets the alarm time.

Parameters
[in]abstimethe time to be set for the next alarm
Function Class:Not an API, this function is for internal use only.

Definition at line 108 of file hal_st_lld.h.

Referenced by stSetAlarm().

static systime_t st_lld_get_alarm ( void  )
inlinestatic

Returns the current alarm time.

Returns
The currently set alarm time.
Function Class:Not an API, this function is for internal use only.

Definition at line 120 of file hal_st_lld.h.

Referenced by stGetAlarm().

static bool st_lld_is_alarm_active ( void  )
inlinestatic

Determines if the alarm is active.

Returns
The alarm status.
Return values
falseif the alarm is not active.
trueis the alarm is active
Function Class:Not an API, this function is for internal use only.

Definition at line 134 of file hal_st_lld.h.