kopia lustrzana https://github.com/raspberrypi/pico-playground
Changes from code review
rodzic
f74bd50af7
commit
54e7410307
|
@ -42,7 +42,7 @@ static void aon_sleep(void) {
|
|||
|
||||
// Go to sleep for 10 seconds, with RTC running off GP20
|
||||
// The external clock is the RTC of another pico being fed to GP20
|
||||
sleep_goto_aon_dormant_until(&ts, &sleep_callback);
|
||||
sleep_goto_dormant_until(&ts, &sleep_callback);
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
@ -66,7 +66,7 @@ int main() {
|
|||
sleep_run_from_xosc();
|
||||
#else
|
||||
printf("Switching to LPSC\n");
|
||||
sleep_run_from_lpsc();
|
||||
sleep_run_from_lposc();
|
||||
#endif
|
||||
|
||||
uart_default_tx_wait_blocking();
|
||||
|
|
|
@ -41,9 +41,7 @@ int main() {
|
|||
printf("Sleeping for 10 seconds\n");
|
||||
uart_default_tx_wait_blocking();
|
||||
|
||||
int alarm_id = -1;
|
||||
sleep_goto_sleep_for(10000, &alarm_sleep_callback, &alarm_id);
|
||||
if (alarm_id >= 0) {
|
||||
if (sleep_goto_sleep_for(10000, &alarm_sleep_callback)) {
|
||||
// Make sure we don't wake
|
||||
while (!awake) {
|
||||
printf("Should be sleeping\n");
|
||||
|
|
|
@ -28,7 +28,7 @@ static void aon_sleep(void) {
|
|||
uart_default_tx_wait_blocking();
|
||||
|
||||
// Go to sleep
|
||||
sleep_goto_aon_sleep_until(&ts, &sleep_callback);
|
||||
sleep_goto_sleep_until(&ts, &sleep_callback);
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
Ładowanie…
Reference in New Issue