Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Timer Management
Functions | |
| TIMER_HANDLE | SetAlarm (CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period) |
| Set an alarm to execute a callback function when expired. | |
| TIMER_HANDLE | DelAlarm (TIMER_HANDLE handle) |
| Delete an alarm before expiring. | |
| void | setTimer (TIMEVAL value) |
| Set a timerfor a given time. | |
| TIMEVAL | getElapsedTime (void) |
| Get the time elapsed since latest timer occurence. | |
| void | EnterMutex (void) |
| Acquire mutex. | |
| void | LeaveMutex (void) |
| Release mutex. | |
| void | TimerInit (void) |
| Initialize Timer. | |
| void | TimerCleanup (void) |
| Cleanup Timer. | |
| void | StartTimerLoop (TimerCallback_t Callback) |
| Start the timer task. | |
| void | StopTimerLoop (TimerCallback_t Callback) |
| Stop the timer task. | |
Function Documentation
| TIMER_HANDLE DelAlarm | ( | TIMER_HANDLE | handle ) |
Delete an alarm before expiring.
- Parameters:
-
handle A timer handle
- Returns:
- The timer handle
----- Use this to remove an alarm ----
- Parameters:
-
handle
- Returns:
Definition at line 103 of file canopen_timer.c.
| void EnterMutex | ( | void | ) |
Acquire mutex.
| TIMEVAL getElapsedTime | ( | void | ) |
Get the time elapsed since latest timer occurence.
- Returns:
- time elapsed since latest timer occurence
Definition at line 79 of file timer_mbed.cpp.
| void LeaveMutex | ( | void | ) |
Release mutex.
| TIMER_HANDLE SetAlarm | ( | CO_Data * | d, |
| UNS32 | id, | ||
| TimerCallback_t | callback, | ||
| TIMEVAL | value, | ||
| TIMEVAL | period | ||
| ) |
Set an alarm to execute a callback function when expired.
- Parameters:
-
*d Pointer to a CAN object data structure id The alarm Id callback A callback function value Call the callback function at current time + value period Call periodically the callback function
- Returns:
- handle The timer handle
------- Use this to declare a new alarm ------
- Parameters:
-
d id callback value period
- Returns:
Definition at line 57 of file canopen_timer.c.
| void setTimer | ( | TIMEVAL | value ) |
Set a timerfor a given time.
- Parameters:
-
value The time value.
Definition at line 69 of file timer_mbed.cpp.
| void StartTimerLoop | ( | TimerCallback_t | Callback ) |
Start the timer task.
- Parameters:
-
Callback A callback function
| void StopTimerLoop | ( | TimerCallback_t | Callback ) |
Stop the timer task.
- Parameters:
-
Callback A callback function
| void TimerCleanup | ( | void | ) |
Cleanup Timer.
| void TimerInit | ( | void | ) |
Initialize Timer.
Generated on Tue Jul 12 2022 17:11:51 by
1.7.2