1# i2c_write_byte 2 3## Description 4 5Writes a byte to a device register. Communicates with the device directly using 6the [I2C interface](i2c_interface.md). 7 8## Properties 9 10| Name | Required | Type | Description | 11| :------- | :------: | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 12| register | yes | string | Device register address expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes. | 13| value | yes | string | Byte value to write expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes. | 14| mask | no | string | Bit mask expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes. Specifies which bits to write within the byte value. Only the bits with a value of 1 in the mask will be written. | 15 16## Return Value 17 18true 19 20## Example 21 22```json 23{ 24 "i2c_write_byte": { 25 "register": "0x0A", 26 "value": "0xCC" 27 } 28} 29``` 30