Have also tidied up ths bindings- combining some individual registers into i2cdevice virtual registers for automatic bit twiddling- so this will need some thorough testing.
Corrected a bug in am/pm and 12 hour time format- 12 hour time was 1-bit short and the am/pm flag was one bit to the right.
Combined UNIX_TIME into one 32bit register, i2cdevice automatically handles this
Combined USER_RAM into one 16bit register, again i2cdevice handles shifting & twiddling
Combined PASSWORD into one 32bit register
Combined TIMER_VALUE and TIMER_STATUS into 16bit (actually 12bit) registers
Combined version and id into one CHIP register, i2cdevice handles masks and shifts
TODO: Check I haven't horribly broken the byte order of the above combined >8bit regs.
Details here - https://github.com/pimoroni/i2cdevice-python/pull/3
Have also tidied up ths bindings- combining some individual registers into i2cdevice virtual registers for automatic bit twiddling- so this will need some thorough testing.
UNIX_TIME
into one 32bit register, i2cdevice automatically handles thisUSER_RAM
into one 16bit register, again i2cdevice handles shifting & twiddlingPASSWORD
into one 32bit registerTIMER_VALUE
andTIMER_STATUS
into 16bit (actually 12bit) registersversion
andid
into oneCHIP
register, i2cdevice handles masks and shiftsTODO: Check I haven't horribly broken the byte order of the above combined >8bit regs.