mirror of
https://github.com/xreef/PCF8574_library.git
synced 2024-08-30 18:12:18 +00:00
Adding integration for Arduino SMT32 #8
This commit is contained in:
@ -22,7 +22,7 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
_usingInterrupt = true;
|
||||
};
|
||||
|
||||
#ifndef __AVR
|
||||
#if !defined(__AVR) && !defined(STM32F1)
|
||||
/**
|
||||
* Constructor
|
||||
* @param address: i2c address
|
||||
@ -59,16 +59,16 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
* wake up i2c controller
|
||||
*/
|
||||
void PCF8574::begin(){
|
||||
#ifndef __AVR
|
||||
#if !defined(__AVR) && !defined(STM32F1)
|
||||
Wire.begin(_sda, _scl);
|
||||
#else
|
||||
// Default pin for AVR some problem on software emulation
|
||||
// Default pin for AVR and Arduino STM32 some problem on software emulation
|
||||
// #define SCL_PIN _scl
|
||||
// #define SDA_PIN _sda
|
||||
Wire.begin();
|
||||
#endif
|
||||
|
||||
// Che if there are pins to set low
|
||||
// Check if there are pins to set low
|
||||
if (writeMode>0 || readMode>0){
|
||||
DEBUG_PRINTLN("Set write mode");
|
||||
Wire.beginTransmission(_address);
|
||||
|
Reference in New Issue
Block a user