This commit is contained in:
Renzo Mischianti 2019-10-17 08:44:54 +02:00
parent 756c3524d1
commit 14ebfa3025

View File

@ -36,6 +36,9 @@
#include "WProgram.h" #include "WProgram.h"
#endif #endif
#define DEFAULT_SDA SDA;
#define DEFAULT_SCL SCL;
// Uncomment to enable printing out nice debug messages. // Uncomment to enable printing out nice debug messages.
// #define PCF8574_DEBUG // #define PCF8574_DEBUG
@ -124,13 +127,17 @@ public:
private: private:
uint8_t _address; uint8_t _address;
#if defined(__AVR) || defined(__STM32F1__) #ifdef __STM32F1__
uint8_t _sda; #ifndef SDA
uint8_t _scl; #define DEFAULT_SDA PB7
#else #define DEFAULT_SCL PB6
uint8_t _sda = SDA;
uint8_t _scl = SCL;
#endif #endif
#endif
uint8_t _sda = DEFAULT_SDA
;
uint8_t _scl = DEFAULT_SCL
;
TwoWire *_wire; TwoWire *_wire;