I2Cwrapper v0.4.0
Generic framework for Arduino I2C target devices
I2Cwrapper.h File Reference

Core helper class of the I2Cwrapper framework. Handles target device management and I2C communication on the controller's side. More...

Detailed Description

Core helper class of the I2Cwrapper framework. Handles target device management and I2C communication on the controller's side.

Author

Copyright (c) 2022 juh

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

Todo:
Enhance diagnostics with a self-diagnosing function to determine the optimal/minimal I2Cdelay in a given controller-target setup.

Classes

class  I2Cwrapper
 A helper class for the AccelStepperI2C and related libraries. More...
 

Variables

const uint8_t I2CwrapperDefaultAddress = 0x08
 
const uint8_t I2CmaxBuf = 20
 
const unsigned long I2CdefaultDelay = 20
 
const unsigned long defaultResetDelay = 100
 
const uint8_t autoAdjustDefaultReps = 3
 
const uint8_t resetCmd = 241
 
const uint8_t changeI2CaddressCmd = 242
 
const uint8_t setInterruptPinCmd = 243
 
const uint8_t clearInterruptCmd = 244
 
const uint8_t clearInterruptResult = 1
 
const uint8_t getVersionCmd = 245
 
const uint8_t getVersionResult = 4
 
const uint8_t pingBackCmd = 246
 
const uint8_t interruptReason_none = 0
 You should not encounter this in practice, as you don't want to be interrupted without a reason... More...
 

Variable Documentation

◆ autoAdjustDefaultReps

const uint8_t autoAdjustDefaultReps = 3

◆ changeI2CaddressCmd

const uint8_t changeI2CaddressCmd = 242

◆ clearInterruptCmd

const uint8_t clearInterruptCmd = 244

◆ clearInterruptResult

const uint8_t clearInterruptResult = 1

◆ defaultResetDelay

const unsigned long defaultResetDelay = 100

◆ getVersionCmd

const uint8_t getVersionCmd = 245

◆ getVersionResult

const uint8_t getVersionResult = 4

◆ I2CdefaultDelay

const unsigned long I2CdefaultDelay = 20

◆ I2CmaxBuf

const uint8_t I2CmaxBuf = 20

◆ I2CwrapperDefaultAddress

const uint8_t I2CwrapperDefaultAddress = 0x08

◆ pingBackCmd

const uint8_t pingBackCmd = 246

◆ resetCmd

const uint8_t resetCmd = 241

◆ setInterruptPinCmd

const uint8_t setInterruptPinCmd = 243