Skip to content

Struct daisy::I2CHandle::Config

ClassList > daisy > I2CHandle > Config

More...

  • #include <i2c.h>

Public Types

Type Name
enum Mode
enum Peripheral
enum Speed

Public Attributes

Type Name
uint8_t address = 0x10
Mode mode
Peripheral periph
struct daisy::I2CHandle::Config pin_config
Pin scl
Pin sda
Speed speed

Detailed Description

Contains settings for initialising an I2C interface.

Public Types Documentation

enum Mode

enum daisy::I2CHandle::Config::Mode {
    I2C_MASTER,
    I2C_SLAVE
};

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


enum Peripheral

enum daisy::I2CHandle::Config::Peripheral {
    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

enum daisy::I2CHandle::Config::Speed {
    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 address

uint8_t daisy::I2CHandle::Config::address;

&


variable mode

Mode daisy::I2CHandle::Config::mode;

&


variable periph

Peripheral daisy::I2CHandle::Config::periph;

&


variable pin_config

struct daisy::I2CHandle::Config daisy::I2CHandle::Config::pin_config;

&


variable scl

Pin daisy::I2CHandle::Config::scl;

&


variable sda

Pin daisy::I2CHandle::Config::sda;

&


variable speed

Speed daisy::I2CHandle::Config::speed;

&



The documentation for this class was generated from the following file external-docs/libDaisy/src/per/i2c.h