File tree Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,6 @@ static const uint8_t MASTER_ADDRESS = 0x01;
3333
3434// Constructors ////////////////////////////////////////////////////////////////
3535
36- TwoWire::TwoWire ()
37- {
38- memset ((void *)&_i2c, 0 , sizeof (_i2c));
39- _i2c.sda = digitalPinToPinName (SDA);
40- _i2c.scl = digitalPinToPinName (SCL);
41-
42- txBuffer = nullptr ;
43- txBufferAllocated = 0 ;
44- rxBuffer = nullptr ;
45- rxBufferAllocated = 0 ;
46- }
47-
4836TwoWire::TwoWire (uint32_t sda, uint32_t scl)
4937{
5038 memset ((void *)&_i2c, 0 , sizeof (_i2c));
Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ class TwoWire : public Stream {
7676 void recoverBus (void );
7777
7878 public:
79- TwoWire ();
80- TwoWire (uint32_t sda, uint32_t scl);
79+ TwoWire (uint32_t sda = SDA, uint32_t scl = SCL);
8180 ~TwoWire ();
8281 // setSCL/SDA have to be called before begin()
8382 void setSCL (uint32_t scl)
You can’t perform that action at this time.
0 commit comments