Skip to content

Commit 9a6ab51

Browse files
author
ladyada
committed
remove serial1
1 parent 54be8f0 commit 9a6ab51

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

variants/monster_m4sk/variant.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const PinDescription g_APinDescription[]=
3030
// 0..13 - Digital pins
3131
// ----------------------
3232
// 0/1 - PDM Mic (but could also be used for UART or serial)
33-
{ PORTA, 16, PIO_SERCOM_ALT, PIN_ATTR_PWM_F, No_ADC_Channel, TCC1_CH0, TC2_CH0, EXTERNAL_INT_0 }, // Uart on PDM pins (sercom 3.1)
34-
{ PORTA, 17, PIO_SERCOM_ALT, PIN_ATTR_PWM_F, No_ADC_Channel, TCC1_CH1, TC2_CH1, EXTERNAL_INT_1 }, // Uart on PDM pins (sercom 3.0)
33+
{ PORTA, 16, PIO_SERCOM_ALT, PIN_ATTR_PWM_F, No_ADC_Channel, TCC1_CH0, TC2_CH0, EXTERNAL_INT_0 }, // Uart RX on PDM pins (sercom 3.1/1.0)
34+
{ PORTA, 17, PIO_SERCOM_ALT, PIN_ATTR_PWM_F, No_ADC_Channel, TCC1_CH1, TC2_CH1, EXTERNAL_INT_1 }, // Uart TX on PDM pins (sercom 3.0/1.1)
3535

3636
// 2..12
3737
// Digital Low
@@ -87,6 +87,12 @@ const PinDescription g_APinDescription[]=
8787
{ PORTA, 9, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_9 },
8888
{ PORTA, 10, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_10 },
8989
{ PORTA, 11, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_11 },
90+
91+
// 35 - SWD Clock
92+
{ PORTA, 30, PIO_DIGITAL, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_14 },
93+
// 36- SWD Data
94+
{ PORTA, 31, PIO_DIGITAL, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_15 },
95+
9096
} ;
9197

9298
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3 } ;

variants/monster_m4sk/variant.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ extern "C"
5757
*----------------------------------------------------------------------------*/
5858

5959
// Number of pins defined in PinDescription array
60-
#define PINS_COUNT (35u)
61-
#define NUM_DIGITAL_PINS (35u)
60+
#define PINS_COUNT (37u)
61+
#define NUM_DIGITAL_PINS (37u)
6262
#define NUM_ANALOG_INPUTS (4u)
6363
#define NUM_ANALOG_OUTPUTS (2u)
6464
#define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? (p) + PIN_A0 : -1)
@@ -114,8 +114,8 @@ static const uint8_t ATN = PIN_ATN;
114114
*/
115115

116116
// Serial1
117-
#define PIN_SERIAL1_RX (0ul)
118-
#define PIN_SERIAL1_TX (1ul)
117+
#define PIN_SERIAL1_RX (0ul) // sercom3
118+
#define PIN_SERIAL1_TX (1ul) // sercom3
119119
#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1)
120120
#define PAD_SERIAL1_TX (UART_TX_PAD_0)
121121

@@ -226,8 +226,6 @@ extern SERCOM sercom3;
226226
extern SERCOM sercom4;
227227
extern SERCOM sercom5;
228228

229-
extern Uart Serial1;
230-
231229
#endif
232230

233231
// These serial port names are intended to allow libraries and architecture-neutral
@@ -247,9 +245,6 @@ extern Uart Serial1;
247245
// pins are NOT connected to anything by default.
248246
#define SERIAL_PORT_USBVIRTUAL Serial
249247
#define SERIAL_PORT_MONITOR Serial
250-
// Serial has no physical pins broken out, so it's not listed as HARDWARE port
251-
#define SERIAL_PORT_HARDWARE Serial1
252-
#define SERIAL_PORT_HARDWARE_OPEN Serial1
253248

254249
#endif /* _MONSTER_M4SK_ */
255250

0 commit comments

Comments
 (0)