You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
744 B

#include "device_ctrl_service.h"
static device_state_t m_device_state = kdevice_state_standby; // 设备状态
static uint32_t m_change_to_cur_state_tp = 0; // 切换到当前状态的时间戳
void DeviceCtrl_change_to_state(device_state_t state) {
ZLOGI("change state from %s to %s", ds2str(m_device_state), ds2str(state));
m_device_state = state;
m_change_to_cur_state_tp = znordic_getpower_on_ms();
}
uint32_t DeviceCtrl_cur_state_haspassed_ms() { return znordic_haspassed_ms(m_change_to_cur_state_tp); }
device_state_t DeviceCtrl_now_state() { return m_device_state; }
void DeviceCtrl_startSample() {}
void DeviceCtrl_stopSample() {}
void DeviceCtrl_schdeule() {}
void DeviceCtrl_init() {}