Skip to content
Rodeo

sat_chain_port.h

Generated from the header

This page is rodeo-sdk/common/sat_chain_port.h — its comments and declarations. To change it, change the header.

rodeo::SatChain chain;
rodeo::SatChainPort port;
chain.Init(rodeo::SatChain::Config(), System::GetUs());
port.Init();
for(;;)
{
port.Process(chain); // as often as the main loop comes round
float cutoff = chain.Pot(0, 2);
}

Pins and streams (rev-b.md, “Satellite chain on USART3”): TX on PC10 (Seed pin 3), RX on PC11 (pin 2), alternate function 7. RX on DMA1_Stream7 and TX on DMA2_Stream5, which libDaisy doesn’t use. Buffers sit in SRAM1, which libDaisy maps uncached, so neither side needs cache maintenance. No interrupts: Process() polls the DMA counters, so nothing here competes with audio for priority.

SatChainPort

class SatChainPort

Members

  • uint32_t exchanges = 0 — Diagnostics: exchanges started, and the last reply’s length and first bytes. Read-only for the app; examples/sat_chain prints them.
  • uint16_t last_len = 0
  • uint8_t last_head[8] = {}

SatChainPort::Init

void Init();

Pins, USART3 and both DMA streams. Call once, after the Seed’s Init().

SatChainPort::Process

void Process(SatChain& chain);

Collect a finished or timed-out reply, and start the next exchange the chain wants. Never blocks.

SatChainPort::Received

uint16_t Received() const;

Bytes received so far in the exchange in flight (for diagnostics).