cronalarms

介绍:

Header File

  • components/sys/bloop/loopapps/loopalarm/include/cronalarms.h

Functions

int cron_alarm_create(const char *cronstring, void *handler, int oneshot)

create cron alarm

Return
  • 0: success
  • -1: failed
Parameters
  • cronstring: cron alarm command string. handler: callback.
  • oneshot: if only run once, oneshot is 1, else, oneshot is 0

void cron_alarm_service(void)

cron alarm process.

void cronalarminit(void)

cron alarm init

uint32_t cronal_time(uint32_t test_time)

for demo.c test use. change time to check whether cron alarm run ok.

Return
  • seconds
Parameters
  • test_time: add seconds