diff options
author | Paolo Paolucci <p.paolucci@tiscali.it> | 2016-03-07 18:40:09 +0100 |
---|---|---|
committer | Sandeep Mistry <s.mistry@arduino.cc> | 2016-03-09 15:47:55 -0500 |
commit | 7b2f6fc02881ec6a01a3b1d4ae248202232c4c6c (patch) | |
tree | 47af934bd7b435c2a1d7255b22eaa52ee15f1df5 /libraries/Wire/src/Wire.cpp | |
parent | aa710ab682fd73ed8ea166ebbf24d103673c5ca6 (diff) |
Fix Wire register
Move TWBR register from Wire.cpp to twi.c file.
Diffstat (limited to 'libraries/Wire/src/Wire.cpp')
-rw-r--r-- | libraries/Wire/src/Wire.cpp | 4 |
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) |