Skip to content

Commit fd02ea2

Browse files
authored
Merge pull request #434 from adafruit/develop
clean up for release 0.18.0
2 parents 94f659d + ef2451c commit fd02ea2

File tree

12 files changed

+10
-95
lines changed

12 files changed

+10
-95
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Adafruit nRF52 Arduino Core Changelog
22

3+
## 0.18.0 - 2020.02.03
4+
5+
- Add EXTERNAL_FLASH_USE_QSPI to all variants that has on-board flash
6+
37
## 0.17.0 - 2020.02.01
48

59
### Core

libraries/Bluefruit52Lib/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit Bluefruit nRF52 Libraries
2-
version=0.17.0
2+
version=0.18.0
33
author=Adafruit
44
maintainer=Adafruit <info@adafruit.com>
55
sentence=Arduino library for nRF52-based Adafruit Bluefruit LE modules

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818

1919
name=Adafruit nRF52 Boards
20-
version=0.17.0
20+
version=0.18.0
2121

2222
# Compile variables
2323
# -----------------

variants/circuitplayground_nrf52840/variant.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
133133
#define EXTERNAL_FLASH_DEVICES GD25Q16C
134134
#define EXTERNAL_FLASH_USE_QSPI
135135

136-
#define USB_MSC_BLOCK_SIZE 512
137-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
138-
139136
/*
140137
* PDM Interfaces
141138
*/

variants/clue_nrf52840/variant.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ static const uint8_t SCK1 = PIN_SPI1_SCK ;
133133
#define EXTERNAL_FLASH_DEVICES GD25Q16C
134134
#define EXTERNAL_FLASH_USE_QSPI
135135

136-
#define USB_MSC_BLOCK_SIZE 512
137-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
138-
139136
#ifdef __cplusplus
140137
}
141138
#endif

variants/feather_nrf52840_express/variant.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
130130
#define EXTERNAL_FLASH_DEVICES GD25Q16C
131131
#define EXTERNAL_FLASH_USE_QSPI
132132

133-
#define USB_MSC_BLOCK_SIZE 512
134-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
135-
136133
#ifdef __cplusplus
137134
}
138135
#endif

variants/feather_nrf52840_sense/variant.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
134134
#define EXTERNAL_FLASH_DEVICES GD25Q16C
135135
#define EXTERNAL_FLASH_USE_QSPI
136136

137-
#define USB_MSC_BLOCK_SIZE 512
138-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
139-
140137
#ifdef __cplusplus
141138
}
142139
#endif

variants/itsybitsy_nrf52840_express/variant.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
126126
#define EXTERNAL_FLASH_DEVICES GD25Q16C
127127
#define EXTERNAL_FLASH_USE_QSPI
128128

129-
#define USB_MSC_BLOCK_SIZE 512
130-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
131-
132129
#ifdef __cplusplus
133130
}
134131
#endif

variants/metro_nrf52840_express/variant.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
132132
#define EXTERNAL_FLASH_DEVICES GD25Q16C
133133
#define EXTERNAL_FLASH_USE_QSPI
134134

135-
#define USB_MSC_BLOCK_SIZE 512
136-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
137-
138-
139135
#ifdef __cplusplus
140136
}
141137
#endif

variants/particle_xenon/variant.cpp

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ const uint32_t g_ADigitalPinMap[] =
5353
18, // P0.18 (RESET)
5454
};
5555

56-
void initVariant()
57-
{
58-
switch_antenna(false);
59-
}
60-
61-
void switch_antenna(bool useExternal) {
56+
static void switch_antenna(bool useExternal) {
6257
if (useExternal) {
6358
digitalWrite(ANTENNA_SWITCH_1, LOW);
6459
digitalWrite(ANTENNA_SWITCH_2, HIGH);
@@ -69,57 +64,7 @@ void switch_antenna(bool useExternal) {
6964
}
7065
}
7166

72-
void led_pwm_init(uint32_t led_index, uint32_t led_pin) {
73-
NRF_PWM_Type* pwm = NRF_PWM0;
74-
75-
pwm->ENABLE = 0;
76-
77-
nrf_gpio_cfg_output(led_pin);
78-
nrf_gpio_pin_write(led_pin, 1 - LED_STATE_ON);
79-
80-
pwm->PSEL.OUT[led_index] = led_pin;
81-
82-
pwm->MODE = PWM_MODE_UPDOWN_Up;
83-
pwm->COUNTERTOP = 0xff;
84-
pwm->PRESCALER = PWM_PRESCALER_PRESCALER_DIV_16;
85-
pwm->DECODER = PWM_DECODER_LOAD_Individual;
86-
pwm->LOOP = 0;
87-
88-
pwm->SEQ[0].PTR = (uint32_t) (led_duty_cycles);
89-
pwm->SEQ[0].CNT = 4; // default mode is Individual --> count must be 4
90-
pwm->SEQ[0].REFRESH = 0;
91-
pwm->SEQ[0].ENDDELAY = 0;
92-
93-
pwm->ENABLE = 1;
94-
95-
pwm->EVENTS_SEQEND[0] = 0;
96-
// pwm->TASKS_SEQSTART[0] = 1;
97-
}
98-
99-
void led_pwm_teardown(void) {
100-
pwm_teardown(NRF_PWM0);
101-
}
102-
103-
void led_pwm_duty_cycle(uint32_t led_index, uint16_t duty_cycle) {
104-
led_duty_cycles[led_index] = duty_cycle;
105-
nrf_pwm_event_clear(NRF_PWM0, NRF_PWM_EVENT_SEQEND0);
106-
nrf_pwm_task_trigger(NRF_PWM0, NRF_PWM_TASK_SEQSTART0);
67+
void initVariant()
68+
{
69+
switch_antenna(false);
10770
}
108-
109-
void pwm_teardown(NRF_PWM_Type* pwm) {
110-
pwm->TASKS_SEQSTART[0] = 0;
111-
pwm->ENABLE = 0;
112-
113-
pwm->PSEL.OUT[0] = 0xFFFFFFFF;
114-
pwm->PSEL.OUT[1] = 0xFFFFFFFF;
115-
pwm->PSEL.OUT[2] = 0xFFFFFFFF;
116-
pwm->PSEL.OUT[3] = 0xFFFFFFFF;
117-
118-
pwm->MODE = 0;
119-
pwm->COUNTERTOP = 0x3FF;
120-
pwm->PRESCALER = 0;
121-
pwm->DECODER = 0;
122-
pwm->LOOP = 0;
123-
pwm->SEQ[0].PTR = 0;
124-
pwm->SEQ[0].CNT = 0;
125-
}

variants/particle_xenon/variant.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,6 @@ static const uint8_t SCK1 = PIN_SPI1_SCK;
184184
#define EXTERNAL_FLASH_DEVICES GD25Q16C
185185
#define EXTERNAL_FLASH_USE_QSPI
186186

187-
#define USB_MSC_BLOCK_SIZE 512
188-
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
189-
190-
void switch_antenna(bool useExternal);
191-
192-
// led pwm
193-
void led_pwm_init(uint32_t led_index, uint32_t led_pin);
194-
void led_pwm_teardown(void);
195-
void led_pwm_duty_cycle(uint32_t led_index, uint16_t duty_cycle);
196-
void pwm_teardown(NRF_PWM_Type* pwm);
197-
static uint16_t led_duty_cycles[PWM0_CH_NUM] = { 0 };
198-
199187
#ifdef __cplusplus
200188
}
201189
#endif

variants/pca10056/variant.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
137137
#define EXTERNAL_FLASH_DEVICES MX25R6435F
138138
#define EXTERNAL_FLASH_USE_QSPI
139139

140-
#define USB_MSC_BLOCK_SIZE 512
141-
#define USB_MSC_BLOCK_COUNT ((8*1024*1024) / USB_MSC_BLOCK_SIZE)
142-
143140
#ifdef __cplusplus
144141
}
145142
#endif

0 commit comments

Comments
 (0)