@@ -398,12 +398,9 @@ static void Wire_Deinit(void) {
398398
399399pmc_disable_periph_clk (WIRE_INTERFACE_ID);
400400
401- // disable pull ups
402- pinMode (PIN_WIRE_SDA, OUTPUT);
403- pinMode (PIN_WIRE_SCL, OUTPUT);
404-
405- digitalWrite (PIN_WIRE_SDA, LOW);
406- digitalWrite (PIN_WIRE_SCL, LOW);
401+ // no need to undo PIO_Configure,
402+ // as Peripheral A was enable by default before,
403+ // and pullups were not enabled
407404}
408405
409406TwoWire Wire = TwoWire(WIRE_INTERFACE, Wire_Init, Wire_Deinit);
@@ -439,12 +436,9 @@ static void Wire1_Deinit(void) {
439436
440437pmc_disable_periph_clk (WIRE1_INTERFACE_ID);
441438
442- // disable pull ups
443- pinMode (PIN_WIRE1_SDA, OUTPUT);
444- pinMode (PIN_WIRE1_SCL, OUTPUT);
445-
446- digitalWrite (PIN_WIRE1_SDA, LOW);
447- digitalWrite (PIN_WIRE1_SCL, LOW);
439+ // no need to undo PIO_Configure,
440+ // as Peripheral A was enable by default before,
441+ // and pullups were not enabled
448442}
449443
450444TwoWire Wire1 = TwoWire(WIRE1_INTERFACE, Wire1_Init, Wire1_Deinit);
0 commit comments