Make read-register and write-register tools operational for Strips
The src/tools/read-register.cpp|write-register.cpp
do not work with the Strips chips right now. Because StripsChips.h
does not implement fully the FrontEnd
methods that are used in those executables:
/// Reads the named register and writes it to the local object memory
virtual void readUpdateWriteNamedReg(std::string name) {}
/// Write to a register using a string name (most likely from json)
virtual void writeNamedRegister(std::string name, uint16_t value) = 0;
/// Reads a named register and returns the value of it
virtual uint16_t readNamedRegister(std::string name) {return 0;}
Let's implement them, with the following practical considerations in mind:
- The commands should be able to read the full register, not just the sub-registers.
- And it would be nice to have a more consistent naming: in some places the HCC register names begin with the HCC_ prefix, in others they don't.
- Also, the sub-register enums are capitalized (like OPMODE, STOPHPR), when the chip config files and the HCC/ABC spec documents have different cases (OPmode, StopHPR). Probably it makes sense to make it insensitive to the font case.
- The
read-register
andwrite-register
should have the debugging log mode.