Skip to content

Commit acc6df4

Browse files
committed
merge similar fix in
2 parents d94023e + 524fa82 commit acc6df4

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t* self,
3737
const mcu_pin_obj_t* pin_a, const mcu_pin_obj_t* pin_b) {
38-
if (!pin_a->has_extint || !pin_a->has_extint) {
38+
if (!pin_a->has_extint || !pin_b->has_extint) {
3939
mp_raise_RuntimeError(translate("Both pins must support hardware interrupts"));
4040
}
4141

ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636

3737
#define MICROPY_HW_LED_STATUS (&pin_P1_14)
3838

39+
// Unusually, board does not have a 32 kHz xtal. Nearly all boards do.
40+
#define BOARD_HAS_32KHZ_XTAL (0)
41+
3942
#if QSPI_FLASH_FILESYSTEM
4043
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 21)
4144
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 23)

ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ MCU_CHIP = nrf52840
1010
SD ?= s140
1111
SOFTDEV_VERSION ?= 6.1.0
1212

13-
# Unusually, board does not have a 32 kHz xtal.
14-
BOARD_HAS_32KHZ_XTAL = 0
15-
1613
BOOT_SETTING_ADDR = 0xFF000
1714

1815
ifeq ($(SD),)

ports/nrf/mpconfigport.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
#define MICROPY_PY_UBINASCII (1)
3939
#define MICROPY_PY_UJSON (1)
4040

41+
#ifndef BOARD_HAS_32KHZ_XTAL
42+
// Assume crystal is present, which is the most common case.
43+
#define BOARD_HAS_32KHZ_XTAL (0)
44+
#endif
45+
4146
// TODO this is old BLE stuff
4247
#if BLUETOOTH_SD
4348
#define MICROPY_PY_BLEIO (1)

ports/nrf/mpconfigport.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ CIRCUITPY_RTC = 1
2828
# frequencyio not yet implemented
2929
CIRCUITPY_FREQUENCYIO = 0
3030

31-
ifndef BOARD_HAS_32KHZ_XTAL
32-
# Assume crystal is present, which is the most common case.
33-
BOARD_HAS_32KHZ_XTAL = 1
34-
endif
35-
3631
# CircuitPython doesn't yet support NFC so force the NFC antenna pins to be GPIO.
3732
# See https://github.com/adafruit/circuitpython/issues/1300
3833
# Defined here because system_nrf52840.c doesn't #include any of our own include files.

ports/nrf/peripherals/nrf/clocks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*/
2727

2828
#include "nrfx.h"
29+
#include "mpconfigboard.h"
2930

3031
void nrf_peripherals_clocks_init(void) {
3132

0 commit comments

Comments
 (0)