Skip to content

Commit 0b7291d

Browse files
committed
fix default crystal value; fix include order
1 parent acc6df4 commit 0b7291d

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161

6262
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
6363

64-
#define BOARD_HAS_CRYSTAL 1
65-
6664
#define DEFAULT_I2C_BUS_SCL (&pin_P0_04)
6765
#define DEFAULT_I2C_BUS_SDA (&pin_P0_05)
6866

ports/nrf/common-hal/bleio/Adapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ STATIC uint32_t ble_stack_enable(void) {
5151
.source = NRF_CLOCK_LF_SRC_XTAL,
5252
.rc_ctiv = 0,
5353
.rc_temp_ctiv = 0,
54-
.accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM
54+
.accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM,
5555
#else
5656
.source = NRF_CLOCK_LF_SRC_RC,
5757
.rc_ctiv = 16,
5858
.rc_temp_ctiv = 2,
59-
.accuracy = NRF_CLOCK_LF_ACCURACY_250_PPM
59+
.accuracy = NRF_CLOCK_LF_ACCURACY_250_PPM,
6060
#endif
6161
};
6262

ports/nrf/mpconfigport.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
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-
4641
// TODO this is old BLE stuff
4742
#if BLUETOOTH_SD
4843
#define MICROPY_PY_BLEIO (1)
@@ -58,6 +53,11 @@
5853

5954
#include "py/circuitpy_mpconfig.h"
6055

56+
#ifndef BOARD_HAS_32KHZ_XTAL
57+
// Assume crystal is present, which is the most common case.
58+
#define BOARD_HAS_32KHZ_XTAL (1)
59+
#endif
60+
6161
#define MICROPY_PORT_ROOT_POINTERS \
6262
CIRCUITPY_COMMON_ROOT_POINTERS \
6363
ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \

ports/nrf/peripherals/nrf/clocks.c

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

2828
#include "nrfx.h"
29-
#include "mpconfigboard.h"
29+
#include "mpconfigport.h"
3030

3131
void nrf_peripherals_clocks_init(void) {
3232

0 commit comments

Comments
 (0)