33 #ifndef HW_I2C_BAUD_RATE 34 #define HW_I2C_BAUD_RATE 100000 struct hw_deviceio_t hw_deviceio_t
Opaque device I/O handle.
struct hw_gpio_t hw_gpio_t
GPIO logical pin structure.
GPIO (General Purpose Input/Output) interface.
hw_deviceio_t * hw_i2c_init_device(const char *device, uint8_t addr)
Initialize an I2C interface from a platform-specific device path.
bool hw_i2c_detect(hw_deviceio_t *device, uint8_t addr)
Probe whether any device acknowledges an address on a bus.
hw_deviceio_t * hw_i2c_init_default(uint8_t addr)
Initialize an I2C interface using the platform default adapter and pins.
hw_deviceio_t * hw_i2c_init(uint8_t index, uint8_t addr, hw_gpio_t *sda_pin, hw_gpio_t *scl_pin)
Initialize an I2C interface with a specific adapter and pins.
Abstract device I/O interface.
uint8_t hw_i2c_count(void)
Get the total number of available I2C adapters.