Skip to content

Commit 3999dff

Browse files
author
ladyada
committed
they'll need to define Serial1 so we dont get irq conflicts with DMA on the same pins, zats ok!
1 parent 0b3ddf5 commit 3999dff

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

variants/monster_m4sk/variant.cpp

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const PinDescription g_APinDescription[]=
2929
{
3030
// 0..13 - Digital pins
3131
// ----------------------
32-
// 0/1 - PDM Mic (but could also be used for UART or serial
33-
{ PORTA, 17, PIO_SERCOM, PIN_ATTR_PWM_F, No_ADC_Channel, TCC1_CH1, TC2_CH1, EXTERNAL_INT_1 }, // Uart on PDM pins (sercom 1)
34-
{ PORTA, 16, PIO_SERCOM, PIN_ATTR_PWM_F, No_ADC_Channel, TCC1_CH0, TC2_CH0, EXTERNAL_INT_0 }, // Uart on PDM pins (sercom 1)
32+
// 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)
3535

3636
// 2..12
3737
// Digital Low
@@ -99,22 +99,3 @@ SERCOM sercom2( SERCOM2 ) ;
9999
SERCOM sercom3( SERCOM3 ) ;
100100
SERCOM sercom4( SERCOM4 ) ;
101101
SERCOM sercom5( SERCOM5 ) ;
102-
103-
Uart Serial1( &sercom1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ;
104-
105-
void SERCOM1_0_Handler()
106-
{
107-
Serial1.IrqHandler();
108-
}
109-
void SERCOM1_1_Handler()
110-
{
111-
Serial1.IrqHandler();
112-
}
113-
void SERCOM1_2_Handler()
114-
{
115-
Serial1.IrqHandler();
116-
}
117-
void SERCOM1_3_Handler()
118-
{
119-
Serial1.IrqHandler();
120-
}

variants/monster_m4sk/variant.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static const uint8_t MOSI2 = PIN_SPI_MOSI ;
163163
static const uint8_t MISO2 = PIN_SPI_MISO ;
164164
static const uint8_t SCK2 = PIN_SPI_SCK ;
165165

166+
166167
/*
167168
* Wire Interfaces
168169
*/

0 commit comments

Comments
 (0)