Skip to content

Commit 4390221

Browse files
committed
variants: Remove ringbuffer in pins_arduino_h.
Signed-off-by: MDin <[email protected]>
1 parent 4ae1762 commit 4390221

File tree

8 files changed

+12
-76
lines changed

8 files changed

+12
-76
lines changed

variants/XMC1100/config/XMC1100_Boot_Kit/pins_arduino.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ XMC_ADC_t mapping_adc[] = {{VADC, 0, DISABLED}, {VADC, 1, DISABLED}, {VADC, 2, D
215215
{VADC, 5, DISABLED}, {VADC, 6, DISABLED}};
216216
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
217217

218-
/*
219-
* UART objects
220-
*/
221-
RingBuffer rx_buffer_0;
222-
RingBuffer tx_buffer_0;
223-
224218
/* First UART channel pins are swapped between debug and normal use */
225219
XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH1,
226220
.rx = {.port = (XMC_GPIO_PORT_t *)PORT1_BASE,
@@ -254,7 +248,7 @@ XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH1,
254248
.irq_num = USIC0_0_IRQn,
255249
.irq_service_request = 0};
256250

257-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
251+
HardwareSerial Serial(&XMC_UART_0);
258252

259253
// SPI instance
260254
XMC_SPI_t XMC_SPI_0 = {

variants/XMC1100/config/XMC1100_XMC2GO/pins_arduino.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,6 @@ XMC_ADC_t mapping_adc[] = {
163163
{VADC, 1, DISABLED}, {VADC, 2, DISABLED}, {VADC, 3, DISABLED}, {VADC, 4, DISABLED}};
164164
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
165165

166-
/*
167-
* UART objects
168-
*/
169-
RingBuffer rx_buffer_0;
170-
RingBuffer tx_buffer_0;
171-
172166
/* First UART channel pins are swapped between debug and normal use */
173167
XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH0,
174168
.rx = {.port = (XMC_GPIO_PORT_t *)PORT2_BASE,
@@ -206,7 +200,7 @@ XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH0,
206200
.irq_num = USIC0_0_IRQn,
207201
.irq_service_request = 0};
208202

209-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
203+
HardwareSerial Serial(&XMC_UART_0);
210204

211205
// SPI instance
212206
XMC_SPI_t XMC_SPI_0 = {

variants/XMC1300/config/XMC1300_Boot_Kit/pins_arduino.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,6 @@ XMC_ADC_t mapping_adc[] = {{VADC, 6, VADC_G1, 1, 4, DISABLED},
218218
{VADC, 5, VADC_G0, 0, 8, DISABLED}};
219219
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
220220

221-
/*
222-
* UART objects
223-
*/
224-
RingBuffer rx_buffer_0;
225-
RingBuffer tx_buffer_0;
226-
227221
/* First UART channel pins are swapped between debug and normal use */
228222
XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH1,
229223
.rx = {.port = (XMC_GPIO_PORT_t *)PORT1_BASE,
@@ -259,7 +253,7 @@ XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH1,
259253
.irq_num = USIC0_0_IRQn,
260254
.irq_service_request = 0};
261255

262-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
256+
HardwareSerial Serial(&XMC_UART_0);
263257

264258
// SPI instance
265259
XMC_SPI_t XMC_SPI_0 = {

variants/XMC1400/config/XMC1400_Arduino_Kit/pins_arduino.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,6 @@ XMC_ADC_t mapping_adc[] = {
219219

220220
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
221221

222-
/*
223-
* UART objects
224-
*/
225-
RingBuffer rx_buffer_0;
226-
RingBuffer tx_buffer_0;
227-
228222
/* First UART channel pins are swapped between debug and normal use */
229223
XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH1,
230224
.rx = {.port = (XMC_GPIO_PORT_t *)PORT1_BASE,
@@ -258,7 +252,7 @@ XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH1,
258252
.irq_num = USIC0_0_IRQn,
259253
.irq_service_request = 0};
260254

261-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
255+
HardwareSerial Serial(&XMC_UART_0);
262256

263257
// SPI instance
264258
XMC_SPI_t XMC_SPI_0 = {

variants/XMC1400/config/XMC1400_XMC2GO/pins_arduino.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,6 @@ XMC_ADC_t mapping_adc[] = {
217217

218218
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
219219

220-
/*
221-
* UART objects
222-
*/
223-
RingBuffer rx_buffer_0;
224-
RingBuffer tx_buffer_0;
225-
226220
/* First UART channel pins are swapped between debug and normal use */
227221
XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH0,
228222
.rx = {.port = (XMC_GPIO_PORT_t *)PORT2_BASE, // RX P2.6
@@ -260,7 +254,7 @@ XMC_UART_t XMC_UART_0 = {.channel = XMC_UART0_CH0,
260254
.irq_num = USIC0_0_IRQn,
261255
.irq_service_request = 0};
262256

263-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
257+
HardwareSerial Serial(&XMC_UART_0);
264258

265259
// SPI instance
266260
XMC_SPI_t XMC_SPI_0 = {

variants/XMC4200/config/XMC4200_Platform2GO/pins_arduino.h

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -235,23 +235,6 @@ XMC_ADC_t mapping_adc[] = {
235235
};
236236
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
237237

238-
/*
239-
* UART objects
240-
*
241-
*/
242-
243-
// Since both the UART interfaces are present on different USIC instances,
244-
// both can be enabled independently.
245-
246-
// Serial is PC-DEBUG interface
247-
// Serial1 is ONBOARD interface
248-
249-
RingBuffer rx_buffer_0;
250-
RingBuffer tx_buffer_0;
251-
252-
RingBuffer rx_buffer_1;
253-
RingBuffer tx_buffer_1;
254-
255238
XMC_UART_t XMC_UART_0 = {
256239
.channel = XMC_UART0_CH0,
257240
.rx = {.port = (XMC_GPIO_PORT_t *)PORT1_BASE, .pin = (uint8_t)4},
@@ -287,9 +270,9 @@ XMC_UART_t XMC_UART_1 = {
287270
.irq_service_request = 0};
288271

289272
// Object instantiated of the HardwareSerial class for UART PC (debug) interface
290-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
273+
HardwareSerial Serial(&XMC_UART_0);
291274
// Object instantiated of the HardwareSerial class for UART ONBOARD interface
292-
HardwareSerial Serial1(&XMC_UART_1, &rx_buffer_1, &tx_buffer_1);
275+
HardwareSerial Serial1(&XMC_UART_1);
293276

294277
// SPI instance
295278
XMC_SPI_t XMC_SPI_0 = {

variants/XMC4400/config/XMC4400_Platform2GO/pins_arduino.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,6 @@ XMC_ADC_t mapping_adc[] = {
313313
};
314314
const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
315315

316-
/*
317-
* UART objects
318-
*
319-
* See many XMC1x00 pins_arduino.h for proper way to handle HOSTPC
320-
* NUM_SERIAL defines number of PHYSICAL ports NOT configurations
321-
*/
322-
RingBuffer rx_buffer_0;
323-
RingBuffer tx_buffer_0;
324-
325316
XMC_UART_t XMC_UART_0 = {
326317
.channel = XMC_UART1_CH0,
327318
.rx =
@@ -364,7 +355,7 @@ XMC_UART_t XMC_UART_0 = {
364355
.irq_service_request = 0};
365356

366357
// Single Hardware Serial object for both UART interfaces
367-
HardwareSerial Serial(&XMC_UART_0, &rx_buffer_0, &tx_buffer_0);
358+
HardwareSerial Serial(&XMC_UART_0);
368359

369360
// SPI instance
370361
XMC_SPI_t XMC_SPI_0 = {

variants/XMC4700/config/XMC4700_Relax_Kit/pins_arduino.h

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -394,15 +394,6 @@ const uint8_t NUM_INTERRUPT = (sizeof(mapping_interrupt) / sizeof(XMC_PIN_INTERR
394394
// VADC_G2, 2, 4, DISABLED}, {VADC, 7, VADC_G2, 2, 7, DISABLED}};
395395
// const uint8_t NUM_ANALOG_INPUTS = (sizeof(mapping_adc) / sizeof(XMC_ADC_t));
396396

397-
/*
398-
* UART objects
399-
*
400-
* Serial 0 is Debug port
401-
* Serial 1 is on-board port
402-
*/
403-
arduino::RingBuffer rx_buffer_0;
404-
arduino::RingBuffer rx_buffer_1;
405-
406397
XMC_UART_t XMC_UART_0 = {
407398
.channel = XMC_UART0_CH0,
408399
.rx = {.port = (XMC_GPIO_PORT_t *)PORT1_BASE, .pin = (uint8_t)4},
@@ -437,10 +428,11 @@ XMC_UART_t XMC_UART_1 = {
437428
.irq_num = USIC1_0_IRQn,
438429
.irq_service_request = 0};
439430

431+
440432
// Debug port
441-
Uart Serial(&XMC_UART_0, &rx_buffer_0);
442-
// On-board port
443-
Uart Serial1(&XMC_UART_1, &rx_buffer_1);
433+
Uart Serial(&XMC_UART_0);
434+
// On-Board port
435+
Uart Serial1(&XMC_UART_1);
444436

445437
// // Three SPI instances possible
446438
// XMC_SPI_t XMC_SPI_0 = {

0 commit comments

Comments
 (0)