<duskwuff[m]>
Indeed. All good on the pinout then, just wanted to make sure this was an intended change.
<duskwuff[m]>
As far as addressing modes go, I've been having a think about this and I'm curious how you'd feel about a class-based approach along these lines, rather than a bunch of branches in the Interface class - https://gist.github.com/duskwuff/a4008360dd52c433441d019e3a8c0624
redstarcomrade has joined #glasgow
redstarcomrade has quit [Changing host]
redstarcomrade has joined #glasgow
redstarcomrade has quit [Read error: Connection reset by peer]
bvernoux has joined #glasgow
<whitequark[m]>
I don't like it--that is just a branch with more ceremony and indirection
<whitequark[m]>
inheritance hierarchies are only useful in cases where there is open recursion
<whitequark[m]>
the set of addressing modes should be closed, it's not an API we should be providing
<whitequark[m]>
(you will find that Glasgow, and my code in general, uses inheritance exceptionally; either when open recursion is needed, or as replacement for nonexistent sum types; not many other cases)
<duskwuff[m]>
Noted; this is exactly why I asked before getting too far into that design. I'll proceed with the original approach
<whitequark[m]>
I don't think there is anything wrong with an enum, and if you want, you can put the addressing related code in the enum members (but I think that keeping it without members is probably slightly nicer)
<whitequark[m]>
generally I like separating data and behavior
<whitequark[m]>
if all of the behavior lies in the *Interface class, that's easier to think about a bit
<fridtjof[m]>
After reading the new technical description (Really like it, btw!), i remembered wondering about whether fluctuations on the +5V rail affect current measurements on the VSENSE pins (in short - do measurements taken by INA233 depend on stable vbus/vs?)
<fridtjof[m]>
(vbus/vs from the perspective of INA233)
<fridtjof[m]>
so for example, if +5V drops to 4.5V or something (4.0V seems to be the reset threshold given the supervisor part), does that skew measurements of some external voltage I attach to vsense?
nyanotech has quit [Remote host closed the connection]