Skip to content

daisy::I2CHandle::Config

More...

#include <i2c.h>

Public Types

Name
enum class Mode
enum class Peripheral
enum class Speed

Public Attributes

Name
Peripheral periph
dsy_gpio_pin scl
dsy_gpio_pin sda
struct daisy::I2CHandle::Config::@13 pin_config
Speed speed
Mode mode
uint8_t address

Detailed Description

struct daisy::I2CHandle::Config;

Contains settings for initialising an I2C interface.

Public Types Documentation

enum Mode

Enumerator Value Description
I2C_MASTER
I2C_SLAVE

Specifies whether the interface will operate in master or slave mode.

enum Peripheral

Enumerator Value Description
I2C_1 0 &
I2C_2 &
I2C_3 &
I2C_4 &

Specifices the internal peripheral to use (these are mapped to different pins on the hardware).

enum Speed

Enumerator Value Description
I2C_100KHZ &
I2C_400KHZ &
I2C_1MHZ &

Rate at which the clock/data will be sent/received. The device being used will have maximum speeds. 1MHZ Mode is currently 886kHz

Public Attributes Documentation

variable periph

Peripheral periph;

&

variable scl

dsy_gpio_pin scl;

&

variable sda

dsy_gpio_pin sda;

&

variable pin_config

struct daisy::I2CHandle::Config::@13 pin_config;

&

variable speed

Speed speed;

&

variable mode

Mode mode;

&

variable address

uint8_t address = 0x10;

&


Updated on 2024-01-03 at 19:41:00 +0000