add new hardware peripheral

This commit is contained in:
2026-05-25 18:41:46 +02:00
parent 8028dfd5fc
commit be5dd9632c
10 changed files with 91 additions and 18 deletions

View File

@@ -11,6 +11,29 @@
See [blue-pill.md](docs/hardware/blue-pill.md) for wiring notes.
## Attached Hardware
- internal LED: `PC13`
- RGB LED:
- `PA5` = red
- `PA6` = green
- `PA7` = blue
- `PA4` = drive low for the LED return path
- 5-way button board:
- `PB12` = GND, drive low
- `PA10` = VCC, drive high
- `PB13` = right
- `PB14` = down
- `PB15` = left
- `PA8` = center
- `PA9` = up
- HMC5883L module:
- `PB4` = VCC, drive high
- `PB5` = GND, drive low
- `PB6` = SCL
- `PB7` = SDA
- `PB8` = DRDY
## Important Target Note
- Blue Pill `STM32F103` is Cortex-M3 and uses `thumbv7m-none-eabi`.
@@ -71,14 +94,15 @@ probe-rs chip list | rg STM32F103
- `blinky-basic` - plain `no_std` blink with a simple delay
- `blinky-timer` - periodic blink driven by a timer abstraction
- `button-input` - poll a button on `PA0`, mirror state on the LED, log transitions
- `button-input` - poll the center button on `PA8`, mirror state on the LED, log transitions
- `embassy-blinky` - minimal async blink with Embassy
- `embassy-button` - minimal Embassy polling loop for a button on `PA0`
- `embassy-button` - minimal Embassy polling loop for the center button on `PA8`
The button examples assume a simple external button:
The button examples assume the 5-way board is wired like this:
- one side to `PA0`
- one side to `3V3`
- `PB12` forced low for ground
- `PA10` forced high for power
- `PA8` used as the center button input
- internal pull-down enabled in firmware
- common ground still required for the probe