stickbreaker / arduino-esp32

Arduino core for the ESP32
38 stars 23 forks source link

Create Destructor for Wire Class. #27

Closed stickbreaker closed 6 years ago

stickbreaker commented 6 years ago

This destructor allows reassigning either hardware peripheral to the default Wire() object. sequence:

Wire.~TwoWire();
Wire = TwoWire(peripheral); // peripheral is either 0 or 1
Wire.begin(sda,scl); // sda, scl are the pins to use, when using peripheral 1,
  // YOU MUST specifiy the pins, there ARE NO DEFAULT VALUES for peripheral 1.