V.06 11/3
Dependencies: FT6206 SDFileSystem SPI_TFT_ILI9341 TFT_fonts
Fork of ATT_AWS_IoT_demo by
Timer interface definition for MQTT client. More...
Go to the source code of this file.
Typedefs | |
typedef TimerExt | Timer |
The platform specific timer header that defines the Timer struct. | |
Functions | |
bool | has_timer_expired (Timer *) |
Check if a timer is expired. | |
void | countdown_ms (Timer *, uint32_t) |
Create a timer (milliseconds) | |
void | countdown_sec (Timer *, uint32_t) |
Create a timer (seconds) | |
uint32_t | left_ms (Timer *) |
Check the time remaining on a given timer. | |
void | init_timer (Timer *) |
Initialize a timer. |
Detailed Description
Timer interface definition for MQTT client.
Defines an interface to timers that can be used by other system components. MQTT client requires timers to handle timeouts and MQTT keep alive. Starting point for porting the SDK to the timer hardware layer of a new platform.
Definition in file timer_interface.h.
Typedef Documentation
The platform specific timer header that defines the Timer struct.
Timer Type
Forward declaration of a timer struct. The definition of this struct is platform dependent. When porting to a new platform add this definition in "timer_<platform>.h" and include that file above.
Definition at line 51 of file timer_interface.h.
Function Documentation
void countdown_ms | ( | Timer * | , |
uint32_t | |||
) |
Create a timer (milliseconds)
Sets the timer to expire in a specified number of milliseconds.
- Parameters:
-
Timer - pointer to the timer to be set to expire in milliseconds uint32_t - set the timer to expire in this number of milliseconds
void countdown_sec | ( | Timer * | , |
uint32_t | |||
) |
Create a timer (seconds)
Sets the timer to expire in a specified number of seconds.
- Parameters:
-
Timer - pointer to the timer to be set to expire in seconds uint32_t - set the timer to expire in this number of seconds
bool has_timer_expired | ( | Timer * | ) |
Check if a timer is expired.
Call this function passing in a timer to check if that timer has expired.
- Parameters:
-
Timer - pointer to the timer to be checked for expiration
- Returns:
- bool - true = timer expired, false = timer not expired
void init_timer | ( | Timer * | ) |
Initialize a timer.
Performs any initialization required to the timer passed in.
- Parameters:
-
Timer - pointer to the timer to be initialized
uint32_t left_ms | ( | Timer * | ) |
Generated on Tue Jul 12 2022 14:16:20 by 1.7.2