#include "device_state.h" #include "znordic.h" static device_state_t m_device_state = kdevice_state_standby; // 设备状态 static uint32_t m_change_to_cur_state_tp = 0; // 切换到当前状态的时间戳 void ds_change_to_state(device_state_t state) { ZLOGI("change state from %s to %s", device_state_to_str(m_device_state), device_state_to_str(state)); m_device_state = state; m_change_to_cur_state_tp = znordic_getpower_on_ms(); } uint32_t ds_cur_state_haspassed_ms() { return znordic_haspassed_ms(m_change_to_cur_state_tp); } device_state_t ds_now_state() { return m_device_state; } static sample_capture_state_t m_sample_capture_state; sample_capture_state_t* sample_capture_state_get() { // return &m_sample_capture_state; } void sample_capture_state_reset() { // m_sample_capture_state.is_over30s = false; }; void sample_capture_state_set_is_over30s(bool over30s) { // m_sample_capture_state.is_over30s = over30s; }