Make cppcheck happy
This commit is contained in:
@@ -40,6 +40,7 @@ int i2c_close(const struct i2c_bb *i2c)
|
||||
return res;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
int i2c_read(const struct i2c_bb *i2c, uint8_t slave_addr, char *buffer, unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -59,6 +60,7 @@ int i2c_read(const struct i2c_bb *i2c, uint8_t slave_addr, char *buffer, unsigne
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
int i2c_write(const struct i2c_bb *i2c, uint8_t slave_addr, const char *buffer, unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -79,8 +81,6 @@ int i2c_write(const struct i2c_bb *i2c, uint8_t slave_addr, const char *buffer,
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
static void start_condition(const struct i2c_bb *i2c)
|
||||
{
|
||||
assert( NULL != i2c);
|
||||
@@ -94,7 +94,6 @@ static void start_condition(const struct i2c_bb *i2c)
|
||||
usleep(5);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
static void stop_condition(const struct i2c_bb *i2c)
|
||||
{
|
||||
assert( NULL != i2c);
|
||||
@@ -107,7 +106,6 @@ static void stop_condition(const struct i2c_bb *i2c)
|
||||
usleep(5);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
static bool write_byte(const struct i2c_bb *i2c, uint8_t byte)
|
||||
{
|
||||
uint8_t ack, i;
|
||||
@@ -124,7 +122,6 @@ static bool write_byte(const struct i2c_bb *i2c, uint8_t byte)
|
||||
return (bool)(ack & 0x01);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
static uint8_t read_byte(const struct i2c_bb *i2c, bool ack)
|
||||
{
|
||||
uint8_t res = 0, i;
|
||||
|
Reference in New Issue
Block a user