We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95de294 commit 46f388dCopy full SHA for 46f388d
source/board/nrf5x_dk_ext.c
@@ -155,12 +155,12 @@ static void nrf_prerun_board_config(void)
155
// nonzero if external target is detected
156
bit1 = (PIOB->PIO_PDSR >> 6) & 1; // Read PB6
157
bit2 = (PIOB->PIO_PDSR >> 18) & 1; // Read PB18
158
- target_ext = bit1 & !bit2;
+ target_ext = bit1 | !bit2;
159
160
// nonzero if shield-mounted target is detected
161
bit1 = (PIOB->PIO_PDSR >> 5) & 1; // Read PB5
162
bit2 = (PIOB->PIO_PDSR >> 23) & 1; // Read PB23
163
- target_shield = bit1 & !bit2;
+ target_shield = bit1 | !bit2;
164
165
// Disable pull-ups for detection
166
PIOB->PIO_PUDR = (1 << 18); // pull-up disable
0 commit comments