Skip to content

Commit

Permalink
fix: ensure we can read ROM even when some on the ui_in DIP switches …
Browse files Browse the repository at this point in the history
…are on
  • Loading branch information
urish committed Jan 6, 2025
1 parent 6372807 commit af12836
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ttboard/demoboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,17 @@ def __init__(self,
ports = ['uo_out', 'ui_in', 'uio_in', 'uio_out', 'uio_oe_pico']
for p in ports:
setattr(self, p, getattr(self.pins, p))


# Make sure we can read the ROM even if the user has set some of the ui_in DIP switches
pins_mode = self.pins.mode
self.pins.dieOnInputControlSwitchHigh = False
self.pins.mode = pins_mode # force re-init of pins to apply new setting
self.shuttle = Globals.project_mux(self.user_config.force_shuttle)
if self.shuttle.run == 'tt07':
pins_mode = self.pins.mode
GPIOMapTT06.tt07_cb_fix = True
self.pins.mode = pins_mode # force re-init of pins to apply new pin map
self.pins.dieOnInputControlSwitchHigh = True
self.pins.mode = pins_mode # force re-init of pins to apply new setting

# config
self.apply_configs = apply_user_config
Expand Down

0 comments on commit af12836

Please sign in to comment.