blob: 272285445d4d39ad5a32e93ca133457e35ea3398 [file] [log] [blame]
#include <math.h>
#include <stdlib.h>
#include "mbtk_alarm.h"
#include "lynq_alarm.h"
#include "mbtk_str.h"
int lynq_set_wakealarm(unsigned long time_sec)
{
UNUSED(time_sec);
if(time_sec < 1 || time_sec > pow(2, 28)) {
return -1;
}
return 0;
}
int lynq_set_poweralarm(unsigned long time_sec)
{
UNUSED(time_sec);
if(time_sec < 1 || time_sec > pow(2, 28)) {
return -1;
}
return 0;
}
// min:1 max:2^28
ssize_t wakealarm(char *buffer)
{
UNUSED(buffer);
if(str_empty(buffer)) {
return -1;
}
return lynq_set_wakealarm(atol(buffer));
}
// min:1 max:2^28
ssize_t poweralarm(char *buffer)
{
UNUSED(buffer);
if(str_empty(buffer)) {
return -1;
}
return lynq_set_poweralarm(atol(buffer));
}
int cancel_wakealarm(void)
{
return 0;
}