Skip to content

Commit

Permalink
fix for rev B hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed May 22, 2024
1 parent 72e88b4 commit b64fe90
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
7 changes: 6 additions & 1 deletion variants/trrstrinkey_m0/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ const PinDescription g_APinDescription[]=
// Internal NeoPixel / D6
{ PORTA, 1, PIO_ANALOG, PIN_ATTR_ANALOG, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },

// QT SDA D7
{ 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]

// USB pins D7, D8, D9
// QT SCL D8
{ 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]

// USB pins D9, D10, D11
{ PORTA, 28, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB Host enable
{ PORTA, 24, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DM
{ PORTA, 25, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DP
Expand Down
23 changes: 15 additions & 8 deletions variants/trrstrinkey_m0/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,29 @@ static const uint8_t SCK = PIN_SPI_SCK;
/*
* Wire Interfaces, fake just for compilation
*/
#define WIRE_INTERFACES_COUNT 1
#define WIRE_INTERFACES_COUNT 2

#define PIN_WIRE_SDA PIN_RING2
#define PIN_WIRE_SCL PIN_SLEEVE
#define PERIPH_WIRE sercom0
#define WIRE_IT_HANDLER SERCOM0_Handler
// QT Port
#define PIN_WIRE_SDA (7ul)
#define PIN_WIRE_SCL (8ul)
#define PERIPH_WIRE sercom2
#define WIRE_IT_HANDLER SERCOM2_Handler

// second, sekret I2C on the headphone jack
#define PIN_WIRE1_SDA PIN_RING2
#define PIN_WIRE1_SCL PIN_SLEEVE
#define PERIPH_WIRE1 sercom0
#define WIRE1_IT_HANDLER SERCOM0_Handler

static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;

/*
* USB
*/
#define PIN_USB_HOST_ENABLE (7ul)
#define PIN_USB_DM (8ul)
#define PIN_USB_DP (9ul)
#define PIN_USB_HOST_ENABLE (9ul)
#define PIN_USB_DM (10ul)
#define PIN_USB_DP (11ul)
/*
* I2S Interfaces
*/
Expand Down

0 comments on commit b64fe90

Please sign in to comment.