24#ifndef _WATCH_I2C_H_INCLUDED
25#define _WATCH_I2C_H_INCLUDED
void watch_disable_i2c(void)
Disables the I2C peripheral.
uint32_t watch_i2c_read32(int16_t addr, uint8_t reg)
Reads an unsigned little-endian int from a register in an I2C device.
void watch_i2c_receive(int16_t addr, uint8_t *buf, uint16_t length)
Receives a series of values from a device on the I2C bus.
uint32_t watch_i2c_read24(int16_t addr, uint8_t reg)
Reads three bytes as an unsigned little-endian int from a register in an I2C device.
void watch_i2c_send(int16_t addr, uint8_t *buf, uint16_t length)
Sends a series of values to a device on the I2C bus.
void watch_enable_i2c(void)
Enables the I2C peripheral. Call this before attempting to interface with I2C devices.
uint8_t watch_i2c_read8(int16_t addr, uint8_t reg)
Reads a byte from a register in an I2C device.
uint16_t watch_i2c_read16(int16_t addr, uint8_t reg)
Reads an unsigned little-endian word from a register in an I2C device.
void watch_i2c_write8(int16_t addr, uint8_t reg, uint8_t data)
Writes a byte to a register in an I2C device.