HAL_EMPTY: prevent valgrind errors

zero I2C transfers
This commit is contained in:
Andrew Tridgell 2013-11-23 09:40:45 +11:00
parent 58b767b8e4
commit 8b254f2947
1 changed files with 14 additions and 4 deletions

View File

@ -18,11 +18,21 @@ uint8_t EmptyI2CDriver::writeRegisters(uint8_t addr, uint8_t reg,
{return 0;}
uint8_t EmptyI2CDriver::read(uint8_t addr, uint8_t len, uint8_t* data)
{return 0;}
{
memset(data, 0, len);
return 0;
}
uint8_t EmptyI2CDriver::readRegister(uint8_t addr, uint8_t reg, uint8_t* data)
{return 0;}
{
*data = 0;
return 0;
}
uint8_t EmptyI2CDriver::readRegisters(uint8_t addr, uint8_t reg,
uint8_t len, uint8_t* data)
{return 0;}
uint8_t len, uint8_t* data)
{
memset(data, 0, len);
return 0;
}
uint8_t EmptyI2CDriver::lockup_count() {return 0;}