add TODO 1wire description (subject to change a lot)

xenia 2021-07-26 02:19:01 +00:00
parent 4b42da8222
commit d0c01016b2
1 changed files with 31 additions and 0 deletions

@ -141,6 +141,37 @@ The I2C command format used here is based heavily on the one of [I2C-Tiny-USB](h
* Get upper temperature limit (`0x04`): returns the 2-byte maximum temperature before things start going bad.
* Get critical temperature limit (`0x05`): returns the 2-byte critical temperature when things are going really bad.
#### 1wire commands
TODO
commands
- `0x00 <1 byte mode>` set mode (see interface modes)
1wire interface modes
- `0x00` controller
- `0x10` controller (overdrive)
- `0x01` peripheral
- `0x11` peripheral (overdrive)
controller operations
- `0x01 <2 byte write size> <2 byte read size> <write data>` reset, then write / read, returns 1 byte status then up to the number of requested bytes
- `0x02 <read size>` read rom (eg, DS2401). basically a write/read where the write is 0x33, returns 1 byte status then up to the number of requested bytes
- `0x03` TODO match rom (executes the 1wire match rom algorithm)
- `0x04 <2 byte maximum number of devices to return>` search rom (executes the 1wire search rom algorithm to detect all connected peripherals)
- TODO
peripheral ops
- `0x81 <2 byte mode>` set peripheral mode (below)
- `0x82 <2 byte size> <data>` set peripheral data (eg, eeprom contents)
peripheral modes
- `0x2401` DS2401 emulation (with configurable ID)
- TODO
additional peripheral ops
- `0x83` report timing (returns a measurement of the time taken between one controller query and the next)
## Mode 3 (JTAG pinout scanner) (not yet implemented)
* `0x33`: Get status: no argument bytes, one result byte