Make cppcheck happy

This commit is contained in:
Thomas Klaehn
2019-07-23 15:42:56 +02:00
parent 501991058c
commit 2a528c0976
2 changed files with 6 additions and 7 deletions

View File

@@ -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;