Skip to content

Commit

Permalink
tested
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Mar 5, 2024
1 parent f146749 commit 9ac1875
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions variants/sht4xtrinkey_m0/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const PinDescription g_APinDescription[]=
{ PORTA, 3, PIO_ANALOG, PIN_ATTR_ANALOG, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },

// I2C SDA D3 & SCL D4
{ PORTA, 4, PIO_SERCOM, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_4 }, // D4 / SDA / PWM
{ PORTA, 5, PIO_SERCOM, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_5 }, // D5 / SCL / PWM
{ PORTA, 4, PIO_SERCOM_ALT, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_4 }, // D4 / SDA / PWM
{ PORTA, 5, PIO_SERCOM_ALT, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_5 }, // D5 / SCL / PWM

// USB pins D5, D6, D7
{ PORTA, 28, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB Host enable
Expand Down
16 changes: 6 additions & 10 deletions variants/sht4xtrinkey_m0/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ extern "C"
// Number of pins defined in PinDescription array
#define PINS_COUNT (10u)
#define NUM_DIGITAL_PINS (6u)
#define NUM_ANALOG_INPUTS (3u)
#define NUM_ANALOG_INPUTS (2u)
#define NUM_ANALOG_OUTPUTS (1u)
#define analogInputToDigitalPin(p) (p)

Expand All @@ -77,25 +77,21 @@ extern "C"
// #define digitalPinToTimer(P)

// LEDs
#define PIN_NEOPIXEL (3u)
#define PIN_NEOPIXEL (2u)
#define NUM_NEOPIXEL (1u)

// TOUCH PINS
#define PIN_TOUCH 1

#define PIN_INTERRUPT 6

/*
* Analog pins
*/
#define PIN_A0 (0ul)
#define PIN_A1 (1)
#define PIN_A2 (2)
#define PIN_DAC0 PIN_A0

static const uint8_t A0 = PIN_A0;
static const uint8_t A1 = PIN_A1;
static const uint8_t A2 = PIN_A2;

#define ADC_RESOLUTION 12

Expand Down Expand Up @@ -123,10 +119,10 @@ static const uint8_t SCK = PIN_SPI_SCK;
*/
#define WIRE_INTERFACES_COUNT 1

#define PIN_WIRE_SDA (4u)
#define PIN_WIRE_SCL (5u)
#define PERIPH_WIRE sercom1
#define WIRE_IT_HANDLER SERCOM1_Handler
#define PIN_WIRE_SDA (3u)
#define PIN_WIRE_SCL (4u)
#define PERIPH_WIRE sercom0
#define WIRE_IT_HANDLER SERCOM0_Handler

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

0 comments on commit 9ac1875

Please sign in to comment.