Skip to content

Commit b64fe90

Browse files
committed
fix for rev B hardware
cc @BlitzCityDIY
1 parent 72e88b4 commit b64fe90

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

variants/trrstrinkey_m0/variant.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ const PinDescription g_APinDescription[]=
4242
// Internal NeoPixel / D6
4343
{ PORTA, 1, PIO_ANALOG, PIN_ATTR_ANALOG, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
4444

45+
// QT SDA D7
46+
{ PORTA, 8, PIO_SERCOM_ALT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), ADC_Channel16, PWM0_CH0, TCC0_CH0, EXTERNAL_INT_NMI }, // TCC0/WO[0]
4547

46-
// USB pins D7, D8, D9
48+
// QT SCL D8
49+
{ PORTA, 9, PIO_SERCOM_ALT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), ADC_Channel17, PWM0_CH1, TCC0_CH1, EXTERNAL_INT_9 }, // TCC0/WO[1]
50+
51+
// USB pins D9, D10, D11
4752
{ PORTA, 28, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB Host enable
4853
{ PORTA, 24, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DM
4954
{ PORTA, 25, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DP

variants/trrstrinkey_m0/variant.h

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,29 @@ static const uint8_t SCK = PIN_SPI_SCK;
129129
/*
130130
* Wire Interfaces, fake just for compilation
131131
*/
132-
#define WIRE_INTERFACES_COUNT 1
132+
#define WIRE_INTERFACES_COUNT 2
133133

134-
#define PIN_WIRE_SDA PIN_RING2
135-
#define PIN_WIRE_SCL PIN_SLEEVE
136-
#define PERIPH_WIRE sercom0
137-
#define WIRE_IT_HANDLER SERCOM0_Handler
134+
// QT Port
135+
#define PIN_WIRE_SDA (7ul)
136+
#define PIN_WIRE_SCL (8ul)
137+
#define PERIPH_WIRE sercom2
138+
#define WIRE_IT_HANDLER SERCOM2_Handler
139+
140+
// second, sekret I2C on the headphone jack
141+
#define PIN_WIRE1_SDA PIN_RING2
142+
#define PIN_WIRE1_SCL PIN_SLEEVE
143+
#define PERIPH_WIRE1 sercom0
144+
#define WIRE1_IT_HANDLER SERCOM0_Handler
138145

139146
static const uint8_t SDA = PIN_WIRE_SDA;
140147
static const uint8_t SCL = PIN_WIRE_SCL;
141148

142149
/*
143150
* USB
144151
*/
145-
#define PIN_USB_HOST_ENABLE (7ul)
146-
#define PIN_USB_DM (8ul)
147-
#define PIN_USB_DP (9ul)
152+
#define PIN_USB_HOST_ENABLE (9ul)
153+
#define PIN_USB_DM (10ul)
154+
#define PIN_USB_DP (11ul)
148155
/*
149156
* I2S Interfaces
150157
*/

0 commit comments

Comments
 (0)