Skip to content

Commit 1e690d9

Browse files
committed
Corrected pin defs for USB
1 parent c3caa49 commit 1e690d9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

variants/mysensors_gw/variant.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ const PinDescription g_APinDescription[]=
141141
| 42 | RFM_DIO5 | PB05 | | 5 | 13 | | Y11 | | | | | | | |
142142
| 43 | RESET_RFM | PB10 | | 10 | | | | | | 4/2 | TC5/0 | TCC0/4 | I2S/MCK1 | GCLK_IO4 |
143143
| 44 | SECURITY | PA11 | ATSHA204 | 11 | 19 | | X03 | | 0/3 | 2/3 | TCC1/1 | TCC0/3 | I2S/FS0 | GCLK_IO5 |
144+
| 45 | | PA24 | USB_NEGATIVE | *USB/DM
145+
| 46 | | PA25 | USB_POSITIVE | *USB/DP
144146
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
145147
*/
146148

@@ -152,7 +154,9 @@ const PinDescription g_APinDescription[]=
152154
{ PORTB, 1, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_1 },
153155
{ PORTB, 5, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_5 },
154156
{ PORTB, 10, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_6 },
155-
{ PORTA, 11, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE}
157+
{ PORTA, 11, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE},
158+
{ PORTA, 24, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DM
159+
{ PORTA, 25, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE } // USB/DP
156160
};
157161

158162
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ;

variants/mysensors_gw/variant.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,18 @@ static const uint8_t SCK2 = PIN_SPI2_SCK;
181181

182182
#define PIN_WIRE_SDA (07u)
183183
#define PIN_WIRE_SCL (06u)
184+
#define PERIPH_WIRE sercom3
185+
#define WIRE_IT_HANDLER SERCOM3_Handler
184186

185187
static const uint8_t SDA = PIN_WIRE_SDA;
186188
static const uint8_t SCL = PIN_WIRE_SCL;
187189

188190
/*
189191
* USB
190192
*/
191-
#define PIN_USB_HOST_ENABLE (27ul)
192-
#define PIN_USB_DM (28ul)
193-
#define PIN_USB_DP (29ul)
193+
#define PIN_USB_HOST_ENABLE LED_ORANGE
194+
#define PIN_USB_DM (45ul)
195+
#define PIN_USB_DP (46ul)
194196

195197
#ifdef __cplusplus
196198
}

0 commit comments

Comments
 (0)