6#include <nlohmann/json_fwd.hpp>
106 std::array<IcHausField, kMaxFieldsPerRegister>
fields{};
114 std::string
layout()
const;
119void to_json(nlohmann::json& j,
const IcHausRegister& r);
Pure SOMANET (Synapticon manufacturer-specific) vocabulary — object indices, sub-entry numbers and en...
Definition ic_haus_registers.cc:7
void to_json(nlohmann::json &j, const IcHausField &field)
Serialises an IcHausField. Participates in nlohmann ADL.
Definition ic_haus_registers.cc:358
std::span< const IcHausRegisterSpace > icHausRegisterSpaces()
Every register space of both chips, in the order a reader should meet them: the iC-MU's two,...
Definition ic_haus_registers.cc:382
constexpr std::string_view toString(IcHausChip chip)
Name of a chip, as the console and logs should render it. Never returns nullptr.
Definition ic_haus_registers.h:53
IcHausChip
Which chip a register space belongs to.
Definition ic_haus_registers.h:47
@ kIcMu
The position encoder; BiSS-C to the drive.
@ kIcPvl
The battery-buffered multiturn counter, reached over I²C through the iC-MU.
constexpr size_t kMaxFieldsPerRegister
How many fields one register row can name.
Definition ic_haus_registers.h:87
One field of a register — a named piece of it, with what the datasheet calls it.
Definition ic_haus_registers.h:64
std::string_view description
The datasheet's own one-line description of the field.
Definition ic_haus_registers.h:75
std::string_view bits
Definition ic_haus_registers.h:73
std::string_view name
The datasheet's own name, e.g. "GC_M".
Definition ic_haus_registers.h:65
One addressable register space of one chip.
Definition ic_haus_registers.h:122
std::string_view addressing
How the space is reached, since that is what decides whether OS command 0 can read it at all.
Definition ic_haus_registers.h:127
IcHausChip chip
Definition ic_haus_registers.h:123
std::string_view name
The datasheet's own name for the space.
Definition ic_haus_registers.h:124
std::span< const IcHausRegister > registers
Definition ic_haus_registers.h:129
One row of a register map — usually one address, sometimes a printed range.
Definition ic_haus_registers.h:90
uint8_t fieldCount
How many of fields this row actually names.
Definition ic_haus_registers.h:107
uint8_t lastAddress
Definition ic_haus_registers.h:97
std::span< const IcHausField > namedFields() const
The fields this row names, most significant bit first.
Definition ic_haus_registers.h:110
bool reserved
The whole row is reserved and names no fields.
Definition ic_haus_registers.h:99
bool spiOnly
Definition ic_haus_registers.h:104
std::string layout() const
The row as the datasheet prints it — field names with their bit slices, joined with " | "....
Definition ic_haus_registers.cc:339
std::array< IcHausField, kMaxFieldsPerRegister > fields
Only the first fieldCount count.
Definition ic_haus_registers.h:106
uint8_t address
The address, or the first of a range.
Definition ic_haus_registers.h:91