Skip to content

Commit 4d3a355

Browse files
committed
Tweak blink and treat SWD reset like reset button
1 parent e0919c4 commit 4d3a355

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

supervisor/shared/bluetooth/bluetooth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ void supervisor_bluetooth_init(void) {
176176
}
177177
while (diff < 1000) {
178178
#ifdef CIRCUITPY_STATUS_LED
179-
// Blink on for 100, off for 100, on for 100, off for 100 and on for 200
180-
bool led_on = ble_mode != 0 || (diff % 150) <= 75;
179+
// Blink on for 50 and off for 100
180+
bool led_on = ble_mode != 0 || (diff % 150) <= 50;
181181
if (led_on) {
182182
new_status_color(0x0000ff);
183183
} else {

supervisor/shared/safe_mode.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ safe_mode_t wait_for_safe_mode_reset(void) {
5555
port_set_saved_word(SAFE_MODE_DATA_GUARD);
5656
current_safe_mode = safe_mode;
5757
return safe_mode;
58+
} else {
59+
current_safe_mode = 0;
5860
}
5961

6062
const mcu_reset_reason_t reset_reason = common_hal_mcu_processor_get_reset_reason();
6163
if (reset_reason != RESET_REASON_POWER_ON &&
6264
reset_reason != RESET_REASON_RESET_PIN &&
63-
reset_reason != RESET_REASON_UNKNOWN) {
65+
reset_reason != RESET_REASON_UNKNOWN &&
66+
reset_reason != RESET_REASON_SOFTWARE) {
6467
return NO_SAFE_MODE;
6568
}
6669
port_set_saved_word(SAFE_MODE_DATA_GUARD | (MANUAL_SAFE_MODE << 8));

0 commit comments

Comments
 (0)