driver/ioexpander/pca9534.c: Format with clang-format
BRANCH=none
TEST=none
#include "i2c.h"
#include "pca9534.h"
-static int pca9534_pin_read(const int port, const uint16_t addr_flags,
- int reg, int pin, int *val)
+static int pca9534_pin_read(const int port, const uint16_t addr_flags, int reg,
+ int pin, int *val)
{
int ret;
ret = i2c_read8(port, addr_flags, reg, val);
@@ -17,8 +17,8 @@ static int pca9534_pin_read(const int port, const uint16_t addr_flags,
return ret;
}
-static int pca9534_pin_write(const int port, const uint16_t addr_flags,
- int reg, int pin, int val)
+static int pca9534_pin_write(const int port, const uint16_t addr_flags, int reg,
+ int pin, int val)
{
int ret, v;
ret = i2c_read8(port, addr_flags, reg, &v);
@@ -30,23 +30,23 @@ static int pca9534_pin_write(const int port, const uint16_t addr_flags,
return i2c_write8(port, addr_flags, reg, v);
}
-int pca9534_get_level(const int port, const uint16_t addr_flags,
- int pin, int *level)
+int pca9534_get_level(const int port, const uint16_t addr_flags, int pin,
+ int *level)
{
- return pca9534_pin_read(port, addr_flags,
- PCA9534_REG_INPUT, pin, level);
+ return pca9534_pin_read(port, addr_flags, PCA9534_REG_INPUT, pin,
+ level);
}
-int pca9534_set_level(const int port, const uint16_t addr_flags,
- int pin, int level)
+int pca9534_set_level(const int port, const uint16_t addr_flags, int pin,
+ int level)
{
- return pca9534_pin_write(port, addr_flags,
- PCA9534_REG_OUTPUT, pin, level);
+ return pca9534_pin_write(port, addr_flags, PCA9534_REG_OUTPUT, pin,
+ level);
}
-int pca9534_config_pin(const int port, const uint16_t addr_flags,
- int pin, int is_input)
+int pca9534_config_pin(const int port, const uint16_t addr_flags, int pin,
+ int is_input)
{
- return pca9534_pin_write(port, addr_flags,
- PCA9534_REG_CONFIG, pin, is_input);
+ return pca9534_pin_write(port, addr_flags, PCA9534_REG_CONFIG, pin,
+ is_input);
}
