board.h
Generated from the header
This page is rodeo-sdk/common/board.h — its comments and declarations.
To change it, change the header.
Every Seed pin the motherboard uses, by what it is wired to, so drivers and apps say board::pin::kSatTx rather than seed::D2. Host-safe: plain constants and constexpr functions only, no libDaisy, so host tests include it too and check the map itself (common/tests/board_gtest.cpp). Target code converts a SeedPin to libDaisy’s Pin with board_daisy.h.
Source of truth: hardware/rodeo-motherboard/docs/rev-b.md, “Seed pin map”, checked against libDaisy’s seed::D0-D30 and seed::A0-A11 (daisy_seed.h).
Which control or sound a connector carries is an instrument’s decision, in its own control map. Nothing here names one.
SeedPin
struct SeedPinOne Seed pin: the STM32 port and pin, libDaisy’s seed::D number, and the physical pin on the Seed’s 40-pin header.
Members
char port— ‘A’..’G’uint8_t num— 0..15 within the port; also its EXTI lineint8_t seed_d— seed::D<n>uint8_t header— 1..40
SharesExti
constexpr bool SharesExti(SeedPin a, SeedPin b);Two pins share an external-interrupt line when their pin numbers match, whatever the port: only one of them can be an interrupt input.
SamePin
constexpr bool SamePin(SeedPin a, SeedPin b);pin::kSatRx
constexpr SeedPin kSatRx = {'C', 11, 1, 2};Satellite chain, USART3 (AF7). The ring’s wire protocol is sat_frame.h.
pin::kSatTx
constexpr SeedPin kSatTx = {'C', 10, 2, 3};pin::kCodec2Reset
constexpr SeedPin kCodec2Reset = {'C', 9, 3, 4};Second codec (CS4272) on SAI2. Reset has a 10 kOhm pull-down: hold the codec in reset until SAI2’s MCLK and LRCK run, then release it.
pin::kCodec2Mclk
constexpr SeedPin kCodec2Mclk = {'A', 1, 24, 31};pin::kCodec2Sdout
constexpr SeedPin kCodec2Sdout = {'A', 0, 25, 32};from its ADC: SAI2 SD_B
pin::kCodec2Sdin
constexpr SeedPin kCodec2Sdin = {'D', 11, 26, 33};to its DAC: SAI2 SD_A
pin::kCodec2Lrck
constexpr SeedPin kCodec2Lrck = {'G', 9, 27, 34};SAI2 FS
pin::kCodec2Sclk
constexpr SeedPin kCodec2Sclk = {'A', 2, 28, 35};SAI2 SCK
pin::kSdD0
constexpr SeedPin kSdD0 = {'C', 8, 4, 5};microSD, SDMMC1 in 1-bit mode: D1-D3 would need the satellite chain’s pins.
pin::kSdCmd
constexpr SeedPin kSdCmd = {'D', 2, 5, 6};pin::kSdClk
constexpr SeedPin kSdClk = {'C', 12, 6, 7};pin::kSpiExtCs
constexpr SeedPin kSpiExtCs = {'B', 12, 0, 1};SPI1 to the expansion header (an optional ADC board, or an SPI display). CS has a 10 kOhm pull-up, so the header’s device stays deselected at boot.
pin::kSpiSck
constexpr SeedPin kSpiSck = {'G', 11, 8, 9};pin::kSpiMiso
constexpr SeedPin kSpiMiso = {'B', 4, 9, 10};pin::kSpiMosi
constexpr SeedPin kSpiMosi = {'B', 5, 10, 11};pin::kI2cScl
constexpr SeedPin kI2cScl = {'B', 8, 11, 12};I2C1: the OLED, the battery gauge and four taps. 2.2 kOhm pull-ups on board.
pin::kI2cSda
constexpr SeedPin kI2cSda = {'B', 9, 12, 13};pin::kMidiTx
constexpr SeedPin kMidiTx = {'B', 6, 13, 14};MIDI, USART1, to the MIDI daughterboard.
pin::kMidiRx
constexpr SeedPin kMidiRx = {'B', 7, 14, 15};pin::kUsbDm
constexpr SeedPin kUsbDm = {'B', 14, 29, 36};USB_OTG_HS on its internal full-speed PHY, to the power board’s USB-C.
pin::kUsbDp
constexpr SeedPin kUsbDp = {'B', 15, 30, 37};IoConnector
struct IoConnectorOne I/O connector, named by its silkscreen.
Members
const char* label— silkscreen: “D1”, “A1”..”A7”, “CV1”, “CV2”SeedPin pinint8_t adc— seed::A<n> for an analog read, or -1 (digital only)int8_t dac— DAC channel 1 or 2, or -1
kNumIo
constexpr int kNumIo = 10;kIo
constexpr IoConnector kIo[kNumIo] = { {"D1", {'G', 10, 7, 8}, -1, -1}, {"A1", {'C', 0, 15, 22}, 0, -1}, {"A2", {'A', 3, 16, 23}, 1, -1}, {"A3", {'B', 1, 17, 24}, 2, -1}, {"A4", {'A', 7, 18, 25}, 3, -1}, {"A5", {'A', 6, 19, 26}, 4, -1}, {"A6", {'C', 1, 20, 27}, 5, -1}, {"A7", {'C', 4, 21, 28}, 6, -1}, {"CV1", {'A', 4, 23, 30}, 8, 1}, {"CV2", {'A', 5, 22, 29}, 7, 2}, };In silkscreen order. Index into this with the Io enum below.
Io
enum Io : uint8_tkIoD1kIoA1kIoA2kIoA3kIoA4kIoA5kIoA6kIoA7kIoCv1kIoCv2
i2c::kOledAddr
constexpr uint8_t kOledAddr = 0x3C;SSD130x, on the OLED’s own board
i2c::kBatteryGaugeAddr
constexpr uint8_t kBatteryGaugeAddr = 0x36;MAX17048 on the motherboard
kNumAudioIn
constexpr int kNumAudioIn = 4;--- Audio -------------------------------------------------------------------- Channels follow the back panel: 1/2 are the Seed’s own codec (SAI1), 3/4 the CS4272 (SAI2).
kNumAudioOut
constexpr int kNumAudioOut = 4;kSampleRate
constexpr float kSampleRate = 48000.0f;kBlockSize
constexpr int kBlockSize = 48;One block per millisecond, so a USB audio frame is exactly one block.
kSatUsart
constexpr int kSatUsart = 3;The satellite chain’s UART instance; its baud rate is part of the protocol.