Changes from code review

pull/48/head
Peter Harper 2024-11-07 19:20:06 +00:00
rodzic f74bd50af7
commit 54e7410307
3 zmienionych plików z 4 dodań i 6 usunięć

Wyświetl plik

@ -42,7 +42,7 @@ static void aon_sleep(void) {
// Go to sleep for 10 seconds, with RTC running off GP20 // Go to sleep for 10 seconds, with RTC running off GP20
// The external clock is the RTC of another pico being fed to 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() { int main() {
@ -66,7 +66,7 @@ int main() {
sleep_run_from_xosc(); sleep_run_from_xosc();
#else #else
printf("Switching to LPSC\n"); printf("Switching to LPSC\n");
sleep_run_from_lpsc(); sleep_run_from_lposc();
#endif #endif
uart_default_tx_wait_blocking(); uart_default_tx_wait_blocking();

Wyświetl plik

@ -41,9 +41,7 @@ int main() {
printf("Sleeping for 10 seconds\n"); printf("Sleeping for 10 seconds\n");
uart_default_tx_wait_blocking(); uart_default_tx_wait_blocking();
int alarm_id = -1; if (sleep_goto_sleep_for(10000, &alarm_sleep_callback)) {
sleep_goto_sleep_for(10000, &alarm_sleep_callback, &alarm_id);
if (alarm_id >= 0) {
// Make sure we don't wake // Make sure we don't wake
while (!awake) { while (!awake) {
printf("Should be sleeping\n"); printf("Should be sleeping\n");

Wyświetl plik

@ -28,7 +28,7 @@ static void aon_sleep(void) {
uart_default_tx_wait_blocking(); uart_default_tx_wait_blocking();
// Go to sleep // Go to sleep
sleep_goto_aon_sleep_until(&ts, &sleep_callback); sleep_goto_sleep_until(&ts, &sleep_callback);
} }
int main() { int main() {