Skip to content

Commit 2bdccf0

Browse files
committed
cpb: define the SPEAKER_ENABLE_PIN
This allows the board to disable the onboard speaker until explicitly enabled in user code. Testing performed on a CPB: * Touching the AUDIO pin with a fingertip no longer generates noise/buzz * Generating a waveform with `simpleio.tone` produces no sound by default * When the board.SPEAKER_ENABLE is configured as a digital output and set True, `simpleio.tone` does produce sound Note that while guides should include information about SPEAKER_ENABLE, it's possible that some users who omitted it could view this as a breaking change. They can fix it by simply adding code similar to speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE) speaker_enable.direction = digitalio.Direction.OUTPUT speaker_enable.value = True before using the internal speaker. Closes: adafruit#2258
1 parent fe47eba commit 2bdccf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,5 @@
7070

7171
#define DEFAULT_UART_BUS_RX (&pin_P0_30)
7272
#define DEFAULT_UART_BUS_TX (&pin_P0_14)
73+
74+
#define SPEAKER_ENABLE_PIN (&pin_P1_04)

0 commit comments

Comments
 (0)