chip_write*()

Updated: April 19, 2023

Write one, two, four or eight bytes from the device specified by chip_access().

Synopsis:

unsigned chip_write8(unsigned off)

Arguments:

off
The offset to write to.
Before it is used, the off parameter is first scaled by the reg_shift value specified in the chip_access() function.

Description:

Write to the device specified by chip_access(). The functions are named for the number bits bits written, so to write one byte (eight bits) call chip_write8(); to write two bits (16 bits) call chip_write16(), and so on.

Returns:

>0
Success.