mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-28 23:29:45 +01:00
drivers/vl6180x: fix compilation with clang
Some of the `static inline` functions are only used in some configurations, depending on the preprocessor. Explicitly disable the warning to allow compilation with clang.
This commit is contained in:
parent
510c6fd84e
commit
0337d08bcc
@ -857,6 +857,7 @@ inline static int _write_byte(const vl6180x_t *dev, uint16_t reg, uint8_t byte)
|
||||
return _write(dev, reg, &byte, 1);
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
inline static int _write_word(const vl6180x_t *dev, uint16_t reg, uint16_t data)
|
||||
{
|
||||
uint8_t bytes[2] = { (data >> 8) & 0xff, data & 0xff };
|
||||
@ -892,6 +893,7 @@ static int _read(const vl6180x_t *dev,
|
||||
return VL6180X_OK;
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
inline static int _read_word(const vl6180x_t *dev, uint16_t reg, uint16_t *word)
|
||||
{
|
||||
uint8_t bytes[2];
|
||||
@ -900,6 +902,7 @@ inline static int _read_word(const vl6180x_t *dev, uint16_t reg, uint16_t *word)
|
||||
return res;
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
inline static int _read_word_x(const vl6180x_t *dev, uint16_t reg, uint16_t *word)
|
||||
{
|
||||
uint8_t bytes[2];
|
||||
@ -913,6 +916,7 @@ inline static int _write_byte_x(const vl6180x_t *dev, uint16_t reg, uint8_t byte
|
||||
return vl6180x_reg_write(dev, reg, &byte, 1);
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
inline static int _write_word_x(const vl6180x_t *dev, uint16_t reg, uint16_t data)
|
||||
{
|
||||
uint8_t bytes[2] = { (data >> 8) & 0xff, data & 0xff };
|
||||
|
Loading…
Reference in New Issue
Block a user