File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 28
28
29
29
using namespace utest ::v1;
30
30
31
- volatile static bool complete;
32
- volatile static timestamp_t complete_timestamp;
31
+ static volatile bool complete;
32
+ static volatile timestamp_t complete_timestamp;
33
33
static ticker_event_t delay_event;
34
34
static const ticker_data_t *lp_ticker_data = get_lp_ticker_data();
35
35
@@ -39,8 +39,13 @@ static const ticker_data_t *lp_ticker_data = get_lp_ticker_data();
39
39
#define SHORT_TIMEOUT (600 )
40
40
41
41
void cb_done (uint32_t id) {
42
- complete = true ;
43
42
complete_timestamp = us_ticker_read ();
43
+ complete = true ;
44
+ }
45
+
46
+ void cb_done_deepsleep (uint32_t id) {
47
+ complete_timestamp = lp_ticker_read ();
48
+ complete = true ;
44
49
}
45
50
46
51
void lp_ticker_delay_us (uint32_t delay_us, uint32_t tolerance)
@@ -77,7 +82,7 @@ void lp_ticker_1s_deepsleep()
77
82
*/
78
83
wait_ms (10 );
79
84
80
- ticker_set_handler (lp_ticker_data, cb_done );
85
+ ticker_set_handler (lp_ticker_data, cb_done_deepsleep );
81
86
ticker_remove_event (lp_ticker_data, &delay_event);
82
87
delay_ts = lp_ticker_read () + 1000000 ;
83
88
You can’t perform that action at this time.
0 commit comments