mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
ACM: use new I2C library
This commit is contained in:
parent
cd3729d993
commit
03a16c6e45
@ -54,7 +54,7 @@ http://code.google.com/p/ardupilot-mega/downloads/list
|
||||
#include <Arduino_Mega_ISR_Registry.h>
|
||||
#include <APM_RC.h> // ArduPilot Mega RC Library
|
||||
#include <AP_GPS.h> // ArduPilot GPS library
|
||||
#include <Wire.h> // Arduino I2C lib
|
||||
#include <I2C.h> // Arduino I2C lib
|
||||
#include <SPI.h> // Arduino SPI lib
|
||||
#include <DataFlash.h> // ArduPilot Mega Flash Memory Library
|
||||
#include <AP_ADC.h> // ArduPilot Mega Analog to Digital Converter Library
|
||||
|
@ -107,7 +107,8 @@ static void init_ardupilot()
|
||||
// Initialize Wire and SPI libraries
|
||||
//
|
||||
#ifndef DESKTOP_BUILD
|
||||
Wire.begin();
|
||||
I2c.begin();
|
||||
I2c.timeOut(20);
|
||||
#endif
|
||||
SPI.begin();
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV16); // 1MHZ SPI rate
|
||||
|
Loading…
Reference in New Issue
Block a user