mirror of https://github.com/ArduPilot/ardupilot
HAL_AVR: started I2C in high speed mode
this speeds up the compass a lot
This commit is contained in:
parent
75c1666302
commit
7f20f720e8
|
@ -78,6 +78,10 @@ void AVRI2CDriver::begin() {
|
|||
TWBR = ((CPU_FREQ / 100000) - 16) / 2;
|
||||
// enable twi module, acks, and twi interrupt
|
||||
TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA);
|
||||
|
||||
// start in high speed. When a driver gets an error it drops it to
|
||||
// low speed
|
||||
setHighSpeed(true);
|
||||
}
|
||||
|
||||
void AVRI2CDriver::end() {
|
||||
|
|
Loading…
Reference in New Issue