libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::I2CHandle::Config Struct Reference

Detailed Description

Contains settings for initialising an I2C interface.

#include <i2c.h>

Public Types

enum class  Mode { I2C_MASTER , I2C_SLAVE }
 
enum class  Peripheral { I2C_1 = 0 , I2C_2 , I2C_3 , I2C_4 }
 
enum class  Speed { I2C_100KHZ , I2C_400KHZ , I2C_1MHZ }
 

Public Attributes

Peripheral periph
 
struct { 
 
   dsy_gpio_pin   scl 
 
   dsy_gpio_pin   sda 
 
pin_config 
 
Speed speed
 
Mode mode
 
uint8_t address = 0x10
 

Member Enumeration Documentation

◆ Mode

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

Enumerator
I2C_MASTER 
I2C_SLAVE 

◆ Peripheral

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

Enumerator
I2C_1 

&

I2C_2 

&

I2C_3 

&

I2C_4 

&

◆ Speed

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

Enumerator
I2C_100KHZ 

&

I2C_400KHZ 

&

I2C_1MHZ 

&

Member Data Documentation

◆ address

uint8_t daisy::I2CHandle::Config::address = 0x10

&

◆ mode

Mode daisy::I2CHandle::Config::mode

&

◆ periph

Peripheral daisy::I2CHandle::Config::periph

&

◆ [struct]

struct { ... } daisy::I2CHandle::Config::pin_config

&

◆ scl

dsy_gpio_pin daisy::I2CHandle::Config::scl

&

◆ sda

dsy_gpio_pin daisy::I2CHandle::Config::sda

&

◆ speed

Speed daisy::I2CHandle::Config::speed

&


The documentation for this struct was generated from the following file: