Update PCF8574.h

This commit is contained in:
CloneTV 2020-10-16 13:26:01 +03:00 committed by GitHub
parent a112f94c68
commit 85cd960704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,9 +43,6 @@
#include "WProgram.h"
#endif
#define DEFAULT_SDA SDA;
#define DEFAULT_SCL SCL;
// Uncomment to enable printing out nice debug messages.
// #define PCF8574_DEBUG
@ -170,11 +167,27 @@ public:
private:
uint8_t _address;
#ifdef __STM32F1__
#ifndef SDA
#define DEFAULT_SDA PB7
#define DEFAULT_SCL PB6
#if !defined(DEFAULT_SDA)
# if defined(__STM32F1__)
# define DEFAULT_SDA PB7
# elif defined(ESP8266)
# define DEFAULT_SDA 4
# elif defined(SDA)
# define DEFAULT_SDA SDA
# else
# error "Error define DEFAULT_SDA, SDA not declared"
# endif
#endif
#if !defined(DEFAULT_SCL)
# if defined(__STM32F1__)
# define DEFAULT_SCL PB6
# elif defined(ESP8266)
# define DEFAULT_SCL 5
# elif defined(SDA)
# define DEFAULT_SCL SCL
# else
# error "Error define DEFAULT_SCL, SCL not declared"
# endif
#endif
uint8_t _sda = DEFAULT_SDA