Using the M5BM8563 Real Time Clock with pigpio

I bought this Real Time Clock from pimoroni (U126) and it is cheap, but the data sheet is in Chinese. I can find example code for the arduino (M5_BM8563/M5_BM8563.cpp at master · m5stack/M5_BM8563 · GitHub) and can successfully read date and time from it, but do not seem to be able to write to the device to update the time.

The cpp code on the arduino to write is this:
void BM8563::writeReg(uint8_t reg, uint8_t data) {
    _wire->beginTransmission(0x51);
    _wire->write(reg);
    _wire->write(data);
    _wire->endTransmission();
}

My pigpio (pigpio library) code (actually pigpioj) looks like this:
err = pigpio.i2cWriteByteData( handle, reg, data );
note I write and read each data item to/from the same address. I read somewhere that this might not be the right thing to do, but they are meant to be even/odd addresses if that is the case…

Any guidance greatly appreciated
P

Okay I found a better example … and in English.
It turns out the datasheet says you can only write the registers as a block for some reason.
For the Full Monty see this cpp code:

Pimoroni might like to update the linked example code and update the datasheet to the NXP one rather than the datasheet for the Chinese clone that is actually sold.