feat(ecs): slice 1 — I2C field model, board registers, pixel (ports of _fields/board/pixel.py)
- innesco-ecs: declarative I2cField (byte/enum/bool/int) with the exact read-modify-write semantics of _fields.py, incl. the raw-byte getter quirk - Board: mux, fastin_src, external_dac, sel_data_en_src, si_clk_oe, si_clk_in, analog_power, direction_register + config_crystal sequencer - Pixel: power/frontend/adj/ctrl + finetune_dac nibble logic - 7 integration tests against a fake data_server (register-file mock) - faithful-port findings #7 (enum codes wider than mask don't round-trip in Python either) and #8 (crystal hi/lo aliasing) documented - 21 tests green across the workspace
This commit is contained in:
@@ -35,6 +35,20 @@
|
||||
addresses (which is exactly where the Python `ix/iy` shadowing bug lived —
|
||||
not reproduced here; see `_bindings.py` history in the original repo).
|
||||
|
||||
## Faithful-port findings (bugs/quirks in the original, mirrored exactly)
|
||||
|
||||
7. **`i2c_enum` codes do not always round-trip through the getter.** The
|
||||
Python setter writes `enum_code & mask`, but several enums define codes
|
||||
wider than their mask (`fastin_src` LVDS=0xFF with mask 0x01,
|
||||
`external_dac` OFF=0xFF/0x02, `sel_data_en_src` J14=0xFF/0x04,
|
||||
`si_clk_oe` ON=0xFF/0x08). After such a write, the masked read yields a
|
||||
code that is not an enum key, so the getter returns the hex fallback
|
||||
(e.g. `"01"`) instead of the name. The Rust port reproduces this exactly;
|
||||
a future cleanup (agreed to be deferred) would store masked codes.
|
||||
8. **`config_crystal` hi/lo aliasing**: the high byte of each register
|
||||
address is written to subaddress 0x01 of the controller (0x75), so a row
|
||||
whose low byte IS 0x01 overwrites the next row's hi byte. Mirrored as-is.
|
||||
|
||||
## Domain constants (kept identical)
|
||||
|
||||
- Quadrants: NE=0, SE=1, SW=2, NW=3 (`decoding.c` defines).
|
||||
|
||||
Reference in New Issue
Block a user