Skip to content

Commit 3d49611

Browse files
committed
remove unused USB_MSC_BLOCK_SIZE/USB_MSC_BLOCK_COUNT
1 parent 94f659d commit 3d49611

File tree

9 files changed

+4
-93
lines changed

9 files changed

+4
-93
lines changed

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)