I2C - which library to use for hardware I2C

Post here all questions related to LibMaple core if you can't find a relevant section!
Post Reply
i998
Posts: 9
Joined: Wed Feb 23, 2022 2:14 am

I2C - which library to use for hardware I2C

Post by i998 »

Hi All,

What is the correct way to use hardware and software I2C on Maple Mini board with the Roger Clark's core ?

There are
Wire.h (that apparently has an issue 858
Wire_slave.h that was recommended as a solution ( update - tested and works)

and
TwoWire that I use as a hardware I2C as follows (tested and works too):

Code: Select all

    //Setup I2C interface
    TwoWire I2C_FAST=TwoWire(1,I2C_FAST_MODE); //I2C1 
    
    //Instantiate a device library 
    DeviceLibrary  Device = DeviceLibrary(&I2C_FAST, 0x40);  //a pointer to I2C interface and I2C address
    
Just would like to confirm which ones are a right use and which one is for hardware and software I2C?

Regards, i998
Post Reply

Return to “General discussion”