Skip to content

nordic: Fix BLE HID to work after deep sleep #10381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ static bool __attribute__((noinline)) run_code_py(safe_mode_t safe_mode, bool *s
size_t total_time = blink_time + LED_SLEEP_TIME_MS;
#endif

// This loop is waits after code completes. It waits for fake sleeps to
// finish, user input or autoreloads.
// This loop is run after code completes. It waits for fake sleeps to
// finish, waits for user input, or waits for an autoreload.
#if CIRCUITPY_ALARM
bool fake_sleeping = false;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@
#define DEFAULT_UART_BUS_TX (&pin_P0_14)

#define SPEAKER_ENABLE_PIN (&pin_P1_04)

// Uncomment to allow debugging over console UART
// #define CIRCUITPY_CONSOLE_UART_TX (&pin_P0_14)
// #define CIRCUITPY_CONSOLE_UART_RX (&pin_P0_30)
7 changes: 4 additions & 3 deletions ports/nordic/common-hal/alarm/__init__.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "common-hal/alarm/touch/TouchAlarm.h"

typedef enum {
NRF_SLEEP_WAKEUP_UNDEFINED,
NRF_SLEEP_WAKEUP_UNDEFINED = 0,
NRF_SLEEP_WAKEUP_GPIO,
NRF_SLEEP_WAKEUP_TIMER,
NRF_SLEEP_WAKEUP_TOUCHPAD,
Expand All @@ -33,8 +33,9 @@ extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj;

enum {
SLEEPMEM_WAKEUP_BY_NONE = 0,
SLEEPMEM_WAKEUP_BY_PIN = 1,
SLEEPMEM_WAKEUP_BY_TIMER = 2,
SLEEPMEM_WAKEUP_BY_PIN,
SLEEPMEM_WAKEUP_BY_TIMER,
SLEEPMEM_WAKEUP_BY_TOUCH,
};
#define WAKEUP_PIN_UNDEF 0xFF
extern uint8_t sleepmem_wakeup_event;
Expand Down
1 change: 1 addition & 0 deletions supervisor/shared/bluetooth/bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void supervisor_bluetooth_init(void) {
boot_in_discovery_mode = false;
if (reset_reason != RESET_REASON_POWER_ON &&
reset_reason != RESET_REASON_RESET_PIN &&
reset_reason != RESET_REASON_DEEP_SLEEP_ALARM &&
reset_reason != RESET_REASON_UNKNOWN &&
reset_reason != RESET_REASON_SOFTWARE) {
return;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy