ardupilot/libraries/AP_HAL_Empty/I2CDriver.cpp
Gustavo Jose de Sousa 0bf865f7f0 AP_HAL_Empty: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-19 20:42:37 +09:00

39 lines
1009 B
C++

#include <AP_HAL/AP_HAL.h>
#include "I2CDriver.h"
using namespace Empty;
void EmptyI2CDriver::begin() {}
void EmptyI2CDriver::end() {}
void EmptyI2CDriver::setTimeout(uint16_t ms) {}
void EmptyI2CDriver::setHighSpeed(bool active) {}
uint8_t EmptyI2CDriver::write(uint8_t addr, uint8_t len, uint8_t* data)
{return 1;}
uint8_t EmptyI2CDriver::writeRegister(uint8_t addr, uint8_t reg, uint8_t val)
{return 1;}
uint8_t EmptyI2CDriver::writeRegisters(uint8_t addr, uint8_t reg,
uint8_t len, uint8_t* data)
{return 1;}
uint8_t EmptyI2CDriver::read(uint8_t addr, uint8_t len, uint8_t* data)
{
memset(data, 0, len);
return 0;
}
uint8_t EmptyI2CDriver::readRegister(uint8_t addr, uint8_t reg, uint8_t* data)
{
*data = 0;
return 1;
}
uint8_t EmptyI2CDriver::readRegisters(uint8_t addr, uint8_t reg,
uint8_t len, uint8_t* data)
{
memset(data, 0, len);
return 1;
}
uint8_t EmptyI2CDriver::lockup_count() {return 0;}