Skip to content

Commit 2f25bd4

Browse files
authored
Merge pull request #3 from tbowmo/master
Fixed problem with USB / I2C clash
2 parents dfe8b54 + b3c9070 commit 2f25bd4

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
2121

2222
name=Mysensors SAMD (32-bits ARM Cortex-M0+) Boards
23-
version=1.0.2
23+
version=1.0.3
2424

2525
# Compile variables
2626
# -----------------

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: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ extern "C" {
7474
// #define digitalPinToTimer(P)
7575

7676
// LEDs
77-
#define PIN_LED_13 (7u)
78-
#define PIN_LED_RXL (6u)
79-
#define PIN_LED_TXL (12u)
77+
#define PIN_LED_13 (16u)
78+
#define PIN_LED_RXL LED_ORANGE
79+
#define PIN_LED_TXL LED_ORANGE
8080
#define PIN_LED LED_BLUE
8181
#define PIN_LED2 LED_RED
8282
#define PIN_LED4 LED_GREEN
@@ -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)