UWCubeSat / DubSat1

Main repository for all flight software (including all subsystems, core libraries, and hardware abstraction layers) for the DubSat-1 3U Cubesat.
22 stars 10 forks source link

Add standardized "bus status" structure and helpers to all comm layers (SPI, CAN, I2C) #18

Open jeffchrisope opened 7 years ago

jeffchrisope commented 7 years ago

Should use UART as example. Probably add sprintf-based (debug only) statusToString fund for each bus, for debug console.

jeffchrisope commented 7 years ago

Maybe have the notion of two layers of status - lightweight vs. intrusive. The former simply captures what the software has collected (e.g. Number of bytes sent since reboot, number of overruns called), while the latter would actually call into hardware to get more info (e.g. CAN chipmtransmit/receive errors, etc.). The idea is that sometimes just asking for status from hardware is enough to change the status, so it'd be good to have control over how lightly you want to tread.