move USE_LFXO/USE_LFRC to variant.h

This commit is contained in:
hathach committed 2018-11-08 23:24:03 +07:00
1 parent a7f8694220
commit 2b229f4929
5 files changed
+11 -6

No files matched your search

+1 -5
View File
@@ -257,14 +257,10 @@ err_t AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
.source = NRF_CLOCK_LF_SRC_RC,
.rc_ctiv = 16,
.rc_temp_ctiv = 2,
#if SD_VER < 500
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM
#else
.accuracy = NRF_CLOCK_LF_ACCURACY_250_PPM
#endif
};
#else
#error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board
#error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board in variant.h
#endif
VERIFY_STATUS( sd_softdevice_enable(&clock_cfg, nrf_error_cb) );
+1 -1
View File
@@ -60,7 +60,7 @@ nordic.path={build.core.path}/nordic
# ARDUINO_FEATHER52 is defined for backward compatiable with other lib only
# should be replaced by ARDUINO_NRF52_ADAFRUIT in the future
compiler.nrf.flags= -DARDUINO_FEATHER52 -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DUSE_LFXO {build.sd_flags} {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/usb" "-I{build.core.path}/usb/tinyusb/src"
compiler.nrf.flags= -DARDUINO_FEATHER52 -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES {build.sd_flags} {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/usb" "-I{build.core.path}/usb/tinyusb/src"
# These can be overridden in platform.local.txt
compiler.c.extra_flags=
+3
View File
@@ -22,6 +22,9 @@
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
// define USE_LFRC // Board uses RC for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
@@ -22,6 +22,9 @@
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
// define USE_LFRC // Board uses RC for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
+3
View File
@@ -22,6 +22,9 @@
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
// define USE_LFRC // Board uses RC for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/