We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 668345c commit 742f59aCopy full SHA for 742f59a
hardware/sam/libraries/Wire/Wire.cpp
@@ -89,13 +89,21 @@ TwoWire::TwoWire(Twi *_twi, void(*_beginCb)(void)) :
89
void TwoWire::begin(void) {
90
if (onBeginCallback)
91
onBeginCallback();
92
+
93
+ // Disable PDC channel
94
+ twi->TWI_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS;
95
96
TWI_ConfigureMaster(twi, TWI_CLOCK, VARIANT_MCK);
97
status = MASTER_IDLE;
98
}
99
100
void TwoWire::begin(uint8_t address) {
101
102
103
104
105
106
107
TWI_ConfigureSlave(twi, address);
108
status = SLAVE_IDLE;
109
TWI_EnableIt(twi, TWI_IER_SVACC);
0 commit comments