USB charging output control via LoadOutput class

- Introduce new CONFIG_HAS_USB_PWR_OUTPUT
- Improve charger.discharge_control function
- Add battery empty flag
This commit is contained in:
Martin Jäger
2020-03-02 11:55:38 +01:00
parent 1a9c290485
commit daf43fb967
23 changed files with 144 additions and 61 deletions
+7 -4
View File
@@ -19,22 +19,20 @@ config HAS_DCDC_CONVERTER
help
Board has a DC/DC converter.
if HAS_DCDC_CONVERTER
config DCDC_PWM_FREQUENCY_KHZ
depends on HAS_DCDC_CONVERTER
int
range 30 100
help
PWM frequency of DC/DC converter in kHz, range 30 to 100.
config DCDC_PWM_DEADTIME_NS
depends on HAS_DCDC_CONVERTER
int
range 100 300
help
Dead time for synchronous PWM generation in nanoseconds.
endif # HAS_DCDC_CONVERTER
config HAS_PWM_SWITCH
bool
help
@@ -45,6 +43,11 @@ config HAS_LOAD_OUTPUT
help
PCB has a load output.
config HAS_USB_PWR_OUTPUT
bool
help
PCB has a USB power output.
config NUM_LED_PINS
int
help
@@ -18,6 +18,9 @@ config DCDC_PWM_DEADTIME_NS
config HAS_LOAD_OUTPUT
default y
config HAS_USB_PWR_OUTPUT
default y
config NUM_LED_PINS
default 5
@@ -18,6 +18,9 @@ config DCDC_PWM_DEADTIME_NS
config HAS_LOAD_OUTPUT
default y
config HAS_USB_PWR_OUTPUT
default y
config NUM_LED_PINS
default 3
@@ -12,6 +12,9 @@ config HAS_PWM_SWITCH
config HAS_LOAD_OUTPUT
default y
config HAS_USB_PWR_OUTPUT
default y
config NUM_LED_PINS
default 3