Skip to content

Commit 69d48fe

Browse files
committed
feat(xiao): expose onboard IMU control pins
1 parent 1211767 commit 69d48fe

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.cpp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ const PinName digitalPin[] = {
2323
PB_5, // D13 / FDCAN2_RX
2424
PB_13, // D14 / FDCAN2_TX
2525
PB_14, // D15 / CAN_STB
26-
PB_12 // Board LED, active low
26+
PB_12, // Board LED, active low
27+
PB_3, // Onboard IMU / I2C2_SCL
28+
PB_4, // Onboard IMU / I2C2_SDA
29+
PC_13, // Onboard IMU / INT1
30+
PA_8 // Onboard IMU heater / TIM1_CH1
2731
};
2832

2933
const pin_size_t analogInputPin[] = {

‎variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.h‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@
2222
#define PB13 14
2323
#define PB14 15
2424

25-
/* Board-only pin: it follows the XIAO connector pins in digitalPin[]. */
25+
/* Board-only pins: they follow the XIAO connector pins in digitalPin[]. */
2626
#define PB12 16
27+
#define PIN_IMU_SCL 17 // PB3 / I2C2_SCL
28+
#define PIN_IMU_SDA 18 // PB4 / I2C2_SDA
29+
#define PIN_IMU_INT1 19 // PC13 / LSM6DS3TR-C INT1
30+
#define PIN_IMU_HEATER 20 // PA8 / TIM1_CH1
2731

2832
/* Alternate functions used by the default board peripherals. */
2933
#define PA9_ALT1 (PA9 | ALT1)
3034
#define PA10_ALT1 (PA10 | ALT1)
3135

32-
#define NUM_DIGITAL_PINS 17
36+
#define NUM_DIGITAL_PINS 21
3337
#define NUM_ANALOG_INPUTS 4
3438

3539
#ifndef LED_BUILTIN

0 commit comments

Comments
 (0)