TinyTapeout / tt-micropython-firmware

TinyTapeout demo pcb's RP2040 functionality
GNU Lesser General Public License v2.1
4 stars 7 forks source link

usability feature #21

Closed mattvenn closed 3 days ago

mattvenn commented 4 days ago

if tt.mode isn't 1, then when tt.ui_in = 100, nothing happens, maybe print a warning saying you can't write to ui_in because in wrong mode

psychogenic commented 3 days ago

With https://github.com/TinyTapeout/tt-micropython-firmware/commit/3dec09b899c93b30c940a25cbd32d6134617231b The ui_in.value uio_in.value writes get a message

>>> tt.ui_in.value
<LogicArray('00000001', Range(7, 'downto', 0))>
>>> tt.ui_in.value = 0b1011
>>> tt.ui_in.value
<LogicArray('00001011', Range(7, 'downto', 0))>
>>> tt.mode = RPMode.ASIC_MANUAL_INPUTS
ttboard.demoboard: Was auto-clocking @ 10 but stopping for mode change
ttboard.pins.pins: Setting mode to ASIC_MANUAL_INPUTS
>>> tt.ui_in.value
<LogicArray('00000000', Range(7, 'downto', 0))>
>>> tt.ui_in.value = 0b1011
ttboard.types.ioport: writes not supported on ui_in