Set Wire to use the pins defined in pins_arduino.h
thanks @ladyada
This commit is contained in:
parent
2cc1a6a1da
commit
b5e0ebfc89
@ -47,7 +47,7 @@ void TwoWire::begin(int sdaPin, int sclPin, uint32_t frequency)
|
||||
{
|
||||
if(sdaPin < 0) {
|
||||
if(num == 0) {
|
||||
sdaPin = I2C0_DEFAULT_SDA_PIN;
|
||||
sdaPin = SDA;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@ -55,7 +55,7 @@ void TwoWire::begin(int sdaPin, int sclPin, uint32_t frequency)
|
||||
|
||||
if(sclPin < 0) {
|
||||
if(num == 0) {
|
||||
sclPin = I2C0_DEFAULT_SCL_PIN;
|
||||
sclPin = SCL;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@ -29,8 +29,6 @@
|
||||
#include "freertos/queue.h"
|
||||
|
||||
#define I2C_BUFFER_LENGTH 128
|
||||
#define I2C0_DEFAULT_SDA_PIN 21
|
||||
#define I2C0_DEFAULT_SCL_PIN 22
|
||||
|
||||
class TwoWire
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user