SolarOS

SolarOS 4.17.7 manual · api

Compatibility I/O modules

Use solaros.i2c, solaros.spi, solaros.uart, and solaros.onewire for simple scripts on the board's default connections. Use named buses with solaros.buses when you need multiple connections or runtime wiring.

The default I2C bus uses the board's primary controller and SDA/SCL pins. Starting another named I2C bus does not change this default. Board-defined buses on different controllers can operate independently through solaros.buses.

Safe workflow

  1. Inspect status() or allowed(pin).
  2. Use a board-supported bus, pin, chip select, address, mode, and speed.
  3. Check transfer results.
  4. Leave the service in a known state when the script exits.

For external hardware, man buses and man expansion describe the resource-owned path.

Quick reference

Compatibility modules are solaros.i2c info, probe, scan, read_reg, write_reg; solaros.spi status, xfer, read, write; solaros.uart status, baud, is_valid_baud, mode, write, read; solaros.onewire allowed, reset, scan, xfer. Inspect status or allowed first. New multi-bus code should prefer solaros.buses. Modules are package-gated.