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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Typedefs | |
| typedef fnet_uint32_t | fnet_time_t |
| Unsigned integer type representing time uinits. It can be ticks, seconds or milliseconds. | |
Functions | |
| fnet_time_t | fnet_timer_get_ticks (void) |
| Gets the timer counter value in ticks. | |
| fnet_time_t | fnet_timer_get_seconds (void) |
| Gets the timer counter value in seconds. | |
| fnet_time_t | fnet_timer_get_ms (void) |
| Gets the timer counter value in milliseconds. | |
| fnet_time_t | fnet_timer_ms2ticks (fnet_time_t time_ms) |
| Converts milliseconds to timer ticks. | |
| fnet_time_t | fnet_timer_get_interval (fnet_time_t start, fnet_time_t end) |
| Calculates an interval between two moments in time. | |
| void | fnet_timer_delay (fnet_time_t delay_ticks) |
| Performs a delay for the given number of timer ticks. | |
Detailed Description
An application can use the fnet_timer_get_ticks() function to get a number of ticks (periods, defined by the FNET_TIMER_PERIOD_MS) since the hardware timer startup.
Typedef Documentation
| typedef fnet_uint32_t fnet_time_t |
Unsigned integer type representing time uinits. It can be ticks, seconds or milliseconds.
Definition at line 66 of file fnet_timer.h.
Function Documentation
| void fnet_timer_delay | ( | fnet_time_t | delay_ticks ) |
Performs a delay for the given number of timer ticks.
- Parameters:
-
delay_ticks Time value used for delay, in ticks.
This function performs a delay for a given number of timer ticks. The function is blocked, till the delay_ticks expires.
| fnet_time_t fnet_timer_get_interval | ( | fnet_time_t | start, |
| fnet_time_t | end | ||
| ) |
Calculates an interval between two moments in time.
- Parameters:
-
start Start time in ticks. end End time in ticks.
- Returns:
- This function returns an interval value between two time moments (in timer ticks).
This function calculates an interval between two moments in time, start and end. This function takes into account also a possible counter overrun (start>end).
| fnet_time_t fnet_timer_get_ms | ( | void | ) |
Gets the timer counter value in milliseconds.
- Returns:
- This function returns a current value of the timer counter in milliseconds.
- See also:
- fnet_timer_get_ms()
This function returns a current value of the timer counter in milliseconds, from the moment of the hardware timer initialization (it's done in the FNET stack initialization).
Definition at line 43 of file ns_fnet_port.c.
| fnet_time_t fnet_timer_get_seconds | ( | void | ) |
Gets the timer counter value in seconds.
- Returns:
- This function returns a current value of the timer counter in seconds.
- See also:
- fnet_timer_get_ticks()
This function returns a current value of the timer counter in seconds, from the moment of the hardware timer initialization (it's done in the FNET stack initialization).
| fnet_time_t fnet_timer_get_ticks | ( | void | ) |
Gets the timer counter value in ticks.
- Returns:
- This function returns a current value of the timer counter in ticks.
- See also:
- fnet_timer_get_seconds()
This function returns a current value of the timer counter that contains a number of periods from the moment of the hardware timer initialization (it's done in the FNET stack initialization).
The period of one timer tick is defined by the FNET_TIMER_PERIOD_MS.
| fnet_time_t fnet_timer_ms2ticks | ( | fnet_time_t | time_ms ) |
Converts milliseconds to timer ticks.
- Parameters:
-
time_ms Time value in milliseconds.
- Returns:
- This function returns the time value in timer ticks.
This function converts the time value time_ms in milliseconds to the time value in timer ticks.
The period of one timer tick is defined by the FNET_TIMER_PERIOD_MS.
Generated on Tue Jul 12 2022 13:55:26 by
1.7.2