change io_expander not to borrow i2c indefinitely and create io_expander0..1 to store out_current data #255
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#255
Loading…
Reference in New Issue
No description provided.
Delete Branch "morgan/artiq-zynq:refactor_expander"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
IoExpander
atio_expander.rs
now does not borrow i2c indefinitelyIoExpander
does not storei2c
anymoreIoExpander
functions now take ini2c
IoExpander
functions are modified to takes ini2c
parameter at runtime & satmanmain.rs
io_expander0
andio_expander1
are created to storeout_current
datacompilation check
nix build <variant> -L
for kasli-soc master, satellite & standalone and all built successfullyfunctional check
Checklist of backporting SFP0..3 LED indication
Not sure if that's an improvement. TBH I find the original code borderline.
Also we generally only fix bugs on release-7. There is no bug associated with this as far as I can tell.
For the SFP0..3 LED, I need to create
ioexpander0
andioexpander1
which before the patch, one will borrow thei2c
indefinitely and fail the borrow checker. Also, if theioexpander
is created like in the for loop, there will be a bug where Kasli-soc cannot turn off all its LED(self.out_current = [0; 2])
. Due toself.out_current
reset to[0; 2]
each time anioexpander
is created. Theself.out_target != self.out_current
check will fail which won't allow all LED to turn off.change io_expander not to borrow i2c indefinitelyto change io_expander not to borrow i2c indefinitely and create io_expander0..1 to store out_current data