picofuse

Macros
i2c.h File Reference

I2C (Inter-Integrated Circuit) interface. More...

#include "deviceio.h"
#include "gpio.h"
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for i2c.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HW_I2C_BAUD_RATE   100000
 Fixed I2C baud rate in Hz, used for every bus on the Pico. More...
 

Functions

Lifecycle
hw_deviceio_thw_i2c_init_default (uint8_t addr)
 Initialize an I2C interface using the platform default adapter and pins. More...
 
hw_deviceio_thw_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. More...
 
hw_deviceio_thw_i2c_init_device (const char *device, uint8_t addr)
 Initialize an I2C interface from a platform-specific device path. More...
 
Properties
uint8_t hw_i2c_count (void)
 Get the total number of available I2C adapters. More...
 
Methods
bool hw_i2c_detect (hw_deviceio_t *device, uint8_t addr)
 Probe whether any device acknowledges an address on a bus. More...
 

Detailed Description

I2C (Inter-Integrated Circuit) interface.

Definition in file i2c.h.