aboutsummaryrefslogtreecommitdiff
path: root/libraries/Wire/src/Wire.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/Wire/src/Wire.cpp')
-rw-r--r--libraries/Wire/src/Wire.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp
index 86696e9..d2146f7 100644
--- a/libraries/Wire/src/Wire.cpp
+++ b/libraries/Wire/src/Wire.cpp
@@ -80,9 +80,9 @@ void TwoWire::end(void)
twi_disable();
}
-void TwoWire::setClock(uint32_t frequency)
+void TwoWire::setClock(uint32_t clock)
{
- TWBR = ((F_CPU / frequency) - 16) / 2;
+ twi_setFrequency(clock);
}
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint32_t iaddress, uint8_t isize, uint8_t sendStop)