Merge pull request #434 from adafruit/develop
clean up for release 0.18.0
This commit is contained in:
12 files changed
+10
-95
No files matched your search
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name=Adafruit Bluefruit nRF52 Libraries
|
||||
version=0.17.0
|
||||
version=0.18.0
|
||||
author=Adafruit
|
||||
maintainer=Adafruit <info@adafruit.com>
|
||||
sentence=Arduino library for nRF52-based Adafruit Bluefruit LE modules
|
||||
|
||||
+1
-1
@@ -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
|
||||
# -----------------
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 initVariant()
|
||||
{
|
||||
switch_antenna(false);
|
||||
}
|
||||
|
||||
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 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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user