code for i2c color sensor BH1749NUC

I’m trying to read and print RGB and IR values from color sensor BH1749NUC by ROHM without any module or evaluation kit. Is there a code specifically for this sensor out there (tried Github already) or a generic code for I2C color sensors where you can only change the register parameters and print the values?


datasheet says it all (see page 6..8) sheet

It doesn't tell you the syntax.
I want to know how and when to call and print the output from the registers.

About VALID Register
VALID register is measurement data update flag. It turns to ‘1’, when measurement data is updated.
It is cleared and turns to ‘0’ by changing register setup or reading VALID register.
(Setting change target registers are 0x41, 0x42, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65.)

Repeat read add 042H (bit 7)