feat: refactor sgclaw around zeroclaw compat runtime

This commit is contained in:
zyl
2026-03-26 16:23:31 +08:00
parent bca5b75801
commit ff0771a83f
1059 changed files with 409460 additions and 23 deletions

View File

@@ -0,0 +1,41 @@
# aardvark0 — <Device Name> (<Part Number>)
<!-- Copy this file to ~/.zeroclaw/hardware/devices/aardvark0.md -->
<!-- Fill in the device details from the datasheet. -->
## Connection
- Adapter: Total Phase Aardvark (aardvark0)
- Protocol: I2C <!-- or SPI -->
- I2C Address: 0x48 <!-- change to the actual device address -->
- Bitrate: 100 kHz
## Key Registers (from datasheet)
<!-- Example for LM75 temperature sensor — replace with your device -->
| Register | Address | Description | Notes |
|----------|---------|----------------------------------------|------------------------|
| Temp | 0x00 | Temperature (2 bytes, big-endian) | MSB × 0.5 °C per LSB |
| Config | 0x01 | Configuration register | Read/write |
| Thyst | 0x02 | Hysteresis temperature | Read/write |
| Tos | 0x03 | Overtemperature shutdown threshold | Read/write |
## Datasheet
- File: `~/.zeroclaw/hardware/datasheets/<device>.pdf`
- Source: <!-- URL where you downloaded the datasheet -->
## Verified Working Commands
```python
# Read temperature from LM75 at I2C address 0x48, register 0x00
i2c_read(addr=0x48, register=0x00, len=2)
# Convert two bytes to °C:
# raw = (byte[0] << 1) | (byte[1] >> 7)
# temp = raw * 0.5 (if byte[0] bit 7 is 1, it's negative: raw - 256)
```
## Notes
<!-- Add any device-specific quirks, power-on sequences, or gotchas here -->