W801_SDK_dev_env/app/app_lib/app_utils.h

25 lines
561 B
C

#ifndef APP_UTILS_H
#define APP_UTILS_H
#include "wm_include.h"
uint32_t millis(void);
void millis_run_cb(void *arg);
void us_delay(uint32_t us);
void ms_delay(uint32_t ms);
uint32_t random_gen_6_digit(void);
/**
* @brief Function parsing a string having format : __TIME__" "__DATE__
* and filling the given struct tm accordingly.
*
* @param time_date a string having the proper time and date format
* @param time a pointer to the struct tm to fill
*/
void time_date_to_tm(const char *time_date, struct tm *time);
#endif //APP_UTILS_H