diff --git a/source/Core/BSP/Sequre/BSP.cpp b/source/Core/BSP/Sequre/BSP.cpp index c1c02e48..c54a6678 100644 --- a/source/Core/BSP/Sequre/BSP.cpp +++ b/source/Core/BSP/Sequre/BSP.cpp @@ -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 getButtonB() { return HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ? 1 : 0; } diff --git a/source/Core/Drivers/FS2711.cpp b/source/Core/Drivers/FS2711.cpp index 246c0597..8332e465 100644 --- a/source/Core/Drivers/FS2711.cpp +++ b/source/Core/Drivers/FS2711.cpp @@ -19,9 +19,10 @@ extern int32_t powerSupplyWattageLimit; uint8_t I2C_PORT = 2; + 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) { I2CBB2::Mem_Write(FS2711_ADDR, addr, &data, 1); } else if (I2C_PORT == 1) { @@ -39,14 +40,14 @@ uint8_t i2c_read(uint8_t addr) { return data; } -bool i2c_probe(uint8_t addr) { +bool i2c_probe(uint8_t addr) { if (I2C_PORT == 2) { - I2CBB2::probe(addr); + I2CBB2::probe(addr); } else if (I2C_PORT == 1) { I2CBB1::probe(addr); } return false; - } +} uint8_t FS2711::detect_i2c_bus_num() { if (I2CBB2::probe(FS2711_ADDR)) {