comparison Small_CPU/Src/batteryCharger.c @ 644:ebe3fc302ab8

Compile with ENABLE_CHARGER_STATUS_V2
author heinrichs weikamp
date Tue, 30 Mar 2021 10:34:12 +0200
parents 5149cd644fbc
children e58f81cb25a7
comparison
equal deleted inserted replaced
643:5149cd644fbc 644:ebe3fc302ab8
15 The bq5105x provides one status output, CHG. This output is an open-drain NMOS device that is rated to 20 V. 15 The bq5105x provides one status output, CHG. This output is an open-drain NMOS device that is rated to 20 V.
16 The open-drain FET connected to the CHG pin will be turned on whenever the output (BAT) of the charger is 16 The open-drain FET connected to the CHG pin will be turned on whenever the output (BAT) of the charger is
17 enabled. As a note, the output of the charger supply will not be enabled if the VRECT-REG does not converge to the 17 enabled. As a note, the output of the charger supply will not be enabled if the VRECT-REG does not converge to the
18 no-load target voltage. 18 no-load target voltage.
19 19
20 CHG F4 7 O Open-drain output – active when BAT is enabled. Float if not used. 20 CHG F4 7 O Open-drain output � active when BAT is enabled. Float if not used.
21 21
22 @endverbatim 22 @endverbatim
23 ****************************************************************************** 23 ******************************************************************************
24 * @attention 24 * @attention
25 * 25 *
33 #include "stm32f4xx_hal.h" 33 #include "stm32f4xx_hal.h"
34 #include "scheduler.h" 34 #include "scheduler.h"
35 35
36 36
37 /* Use This compile switch to select the new charger status control implementation */ 37 /* Use This compile switch to select the new charger status control implementation */
38 /* #define ENABLE_CHARGER_STATUS_V2 */ 38 #define ENABLE_CHARGER_STATUS_V2
39 39
40 #define CHARGE_IN_PIN GPIO_PIN_2 40 #define CHARGE_IN_PIN GPIO_PIN_2
41 #define CHARGE_IN_GPIO_PORT GPIOC 41 #define CHARGE_IN_GPIO_PORT GPIOC
42 #define CHARGE_IN_GPIO_ENABLE() __GPIOC_CLK_ENABLE() 42 #define CHARGE_IN_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
43 43