Fix clang-format issues

This commit is contained in:
jonasius
2024-06-25 19:13:30 +02:00
parent e9117269ef
commit 51e08f3992
2 changed files with 6 additions and 7 deletions

View File

@@ -121,9 +121,7 @@ void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) {
} }
} }
void unstick_I2C() { void unstick_I2C() {}
}
uint8_t getButtonA() { return HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ? 1 : 0; } uint8_t getButtonA() { return HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ? 1 : 0; }
uint8_t getButtonB() { return HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ? 1 : 0; } uint8_t getButtonB() { return HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ? 1 : 0; }

View File

@@ -19,9 +19,10 @@
extern int32_t powerSupplyWattageLimit; extern int32_t powerSupplyWattageLimit;
uint8_t I2C_PORT = 2; uint8_t I2C_PORT = 2;
fs2711_state_t FS2711::state; fs2711_state_t FS2711::state;
void i2c_write(uint8_t addr, uint8_t data) { void i2c_write(uint8_t addr, uint8_t data) {
if (I2C_PORT == 2) { if (I2C_PORT == 2) {
I2CBB2::Mem_Write(FS2711_ADDR, addr, &data, 1); I2CBB2::Mem_Write(FS2711_ADDR, addr, &data, 1);
} else if (I2C_PORT == 1) { } else if (I2C_PORT == 1) {
@@ -39,14 +40,14 @@ uint8_t i2c_read(uint8_t addr) {
return data; return data;
} }
bool i2c_probe(uint8_t addr) { bool i2c_probe(uint8_t addr) {
if (I2C_PORT == 2) { if (I2C_PORT == 2) {
I2CBB2::probe(addr); I2CBB2::probe(addr);
} else if (I2C_PORT == 1) { } else if (I2C_PORT == 1) {
I2CBB1::probe(addr); I2CBB1::probe(addr);
} }
return false; return false;
} }
uint8_t FS2711::detect_i2c_bus_num() { uint8_t FS2711::detect_i2c_bus_num() {
if (I2CBB2::probe(FS2711_ADDR)) { if (I2CBB2::probe(FS2711_ADDR)) {