diff --git a/changelog.md b/changelog.md index 54cc71d6a..e377c26df 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Adafruit nRF52 Arduino Core Changelog +## 0.18.0 - 2020.02.03 + +- Add EXTERNAL_FLASH_USE_QSPI to all variants that has on-board flash + ## 0.17.0 - 2020.02.01 ### Core diff --git a/libraries/Bluefruit52Lib/library.properties b/libraries/Bluefruit52Lib/library.properties index 8a6375c01..208b34b28 100644 --- a/libraries/Bluefruit52Lib/library.properties +++ b/libraries/Bluefruit52Lib/library.properties @@ -1,5 +1,5 @@ name=Adafruit Bluefruit nRF52 Libraries -version=0.17.0 +version=0.18.0 author=Adafruit maintainer=Adafruit sentence=Arduino library for nRF52-based Adafruit Bluefruit LE modules diff --git a/platform.txt b/platform.txt index 2a53c2a27..efea43618 100644 --- a/platform.txt +++ b/platform.txt @@ -17,7 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA name=Adafruit nRF52 Boards -version=0.17.0 +version=0.18.0 # Compile variables # ----------------- diff --git a/variants/circuitplayground_nrf52840/variant.h b/variants/circuitplayground_nrf52840/variant.h index a7472709e..aa6e5a740 100644 --- a/variants/circuitplayground_nrf52840/variant.h +++ b/variants/circuitplayground_nrf52840/variant.h @@ -133,9 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK ; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - /* * PDM Interfaces */ diff --git a/variants/clue_nrf52840/variant.h b/variants/clue_nrf52840/variant.h index 4aa807f8f..f37b91761 100644 --- a/variants/clue_nrf52840/variant.h +++ b/variants/clue_nrf52840/variant.h @@ -133,9 +133,6 @@ static const uint8_t SCK1 = PIN_SPI1_SCK ; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - #ifdef __cplusplus } #endif diff --git a/variants/feather_nrf52840_express/variant.h b/variants/feather_nrf52840_express/variant.h index 695f4c8d6..c64a37280 100644 --- a/variants/feather_nrf52840_express/variant.h +++ b/variants/feather_nrf52840_express/variant.h @@ -130,9 +130,6 @@ static const uint8_t SCK = PIN_SPI_SCK ; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - #ifdef __cplusplus } #endif diff --git a/variants/feather_nrf52840_sense/variant.h b/variants/feather_nrf52840_sense/variant.h index 865ed8bee..5924cb166 100644 --- a/variants/feather_nrf52840_sense/variant.h +++ b/variants/feather_nrf52840_sense/variant.h @@ -134,9 +134,6 @@ static const uint8_t SCK = PIN_SPI_SCK ; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - #ifdef __cplusplus } #endif diff --git a/variants/itsybitsy_nrf52840_express/variant.h b/variants/itsybitsy_nrf52840_express/variant.h index e8c41bad0..22bf5a79d 100644 --- a/variants/itsybitsy_nrf52840_express/variant.h +++ b/variants/itsybitsy_nrf52840_express/variant.h @@ -126,9 +126,6 @@ static const uint8_t SCK = PIN_SPI_SCK ; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - #ifdef __cplusplus } #endif diff --git a/variants/metro_nrf52840_express/variant.h b/variants/metro_nrf52840_express/variant.h index acca4b4ae..852a147c3 100644 --- a/variants/metro_nrf52840_express/variant.h +++ b/variants/metro_nrf52840_express/variant.h @@ -132,10 +132,6 @@ static const uint8_t SCK = PIN_SPI_SCK ; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - - #ifdef __cplusplus } #endif diff --git a/variants/particle_xenon/variant.cpp b/variants/particle_xenon/variant.cpp index ac732d9a8..ba8b001e9 100644 --- a/variants/particle_xenon/variant.cpp +++ b/variants/particle_xenon/variant.cpp @@ -53,12 +53,7 @@ const uint32_t g_ADigitalPinMap[] = 18, // P0.18 (RESET) }; -void initVariant() -{ - switch_antenna(false); -} - -void switch_antenna(bool useExternal) { +static void switch_antenna(bool useExternal) { if (useExternal) { digitalWrite(ANTENNA_SWITCH_1, LOW); digitalWrite(ANTENNA_SWITCH_2, HIGH); @@ -69,57 +64,7 @@ void switch_antenna(bool useExternal) { } } -void led_pwm_init(uint32_t led_index, uint32_t led_pin) { - NRF_PWM_Type* pwm = NRF_PWM0; - - pwm->ENABLE = 0; - - nrf_gpio_cfg_output(led_pin); - nrf_gpio_pin_write(led_pin, 1 - LED_STATE_ON); - - pwm->PSEL.OUT[led_index] = led_pin; - - pwm->MODE = PWM_MODE_UPDOWN_Up; - pwm->COUNTERTOP = 0xff; - pwm->PRESCALER = PWM_PRESCALER_PRESCALER_DIV_16; - pwm->DECODER = PWM_DECODER_LOAD_Individual; - pwm->LOOP = 0; - - pwm->SEQ[0].PTR = (uint32_t) (led_duty_cycles); - pwm->SEQ[0].CNT = 4; // default mode is Individual --> count must be 4 - pwm->SEQ[0].REFRESH = 0; - pwm->SEQ[0].ENDDELAY = 0; - - pwm->ENABLE = 1; - - pwm->EVENTS_SEQEND[0] = 0; -// pwm->TASKS_SEQSTART[0] = 1; -} - -void led_pwm_teardown(void) { - pwm_teardown(NRF_PWM0); -} - -void led_pwm_duty_cycle(uint32_t led_index, uint16_t duty_cycle) { - led_duty_cycles[led_index] = duty_cycle; - nrf_pwm_event_clear(NRF_PWM0, NRF_PWM_EVENT_SEQEND0); - nrf_pwm_task_trigger(NRF_PWM0, NRF_PWM_TASK_SEQSTART0); +void initVariant() +{ + switch_antenna(false); } - -void pwm_teardown(NRF_PWM_Type* pwm) { - pwm->TASKS_SEQSTART[0] = 0; - pwm->ENABLE = 0; - - pwm->PSEL.OUT[0] = 0xFFFFFFFF; - pwm->PSEL.OUT[1] = 0xFFFFFFFF; - pwm->PSEL.OUT[2] = 0xFFFFFFFF; - pwm->PSEL.OUT[3] = 0xFFFFFFFF; - - pwm->MODE = 0; - pwm->COUNTERTOP = 0x3FF; - pwm->PRESCALER = 0; - pwm->DECODER = 0; - pwm->LOOP = 0; - pwm->SEQ[0].PTR = 0; - pwm->SEQ[0].CNT = 0; -} \ No newline at end of file diff --git a/variants/particle_xenon/variant.h b/variants/particle_xenon/variant.h index 1c04ad23b..66d876480 100644 --- a/variants/particle_xenon/variant.h +++ b/variants/particle_xenon/variant.h @@ -184,18 +184,6 @@ static const uint8_t SCK1 = PIN_SPI1_SCK; #define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE) - -void switch_antenna(bool useExternal); - -// led pwm -void led_pwm_init(uint32_t led_index, uint32_t led_pin); -void led_pwm_teardown(void); -void led_pwm_duty_cycle(uint32_t led_index, uint16_t duty_cycle); -void pwm_teardown(NRF_PWM_Type* pwm); -static uint16_t led_duty_cycles[PWM0_CH_NUM] = { 0 }; - #ifdef __cplusplus } #endif diff --git a/variants/pca10056/variant.h b/variants/pca10056/variant.h index 0f2899679..e9aa38db5 100644 --- a/variants/pca10056/variant.h +++ b/variants/pca10056/variant.h @@ -137,9 +137,6 @@ static const uint8_t SCK = PIN_SPI_SCK ; #define EXTERNAL_FLASH_DEVICES MX25R6435F #define EXTERNAL_FLASH_USE_QSPI -#define USB_MSC_BLOCK_SIZE 512 -#define USB_MSC_BLOCK_COUNT ((8*1024*1024) / USB_MSC_BLOCK_SIZE) - #ifdef __cplusplus } #endif