Battery config updated and started with Doxygen added

This commit is contained in:
Martin Jaeger
2019-03-10 18:34:05 +01:00
parent e9c45702c8
commit e4a20fba85
26 changed files with 3234 additions and 1020 deletions
+20 -18
View File
@@ -1,5 +1,5 @@
/* mbed library for half bridge driver PWM generation
* Copyright (c) 2016-2017 Martin Jäger (www.libre.solar)
/* LibreSolar charge controller firmware
* Copyright (c) 2016-2019 Martin Jäger (www.libre.solar)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,22 +14,27 @@
* limitations under the License.
*/
#ifndef __HALF_BRIDGE_H_
#define __HALF_BRIDGE_H_
#ifndef HALF_BRIDGE_H
#define HALF_BRIDGE_H
/** @file
*
* @brief PWM timer functions for half bridge of DC/DC converter
*/
/** Initiatializes the registers to generate the PWM signal and sets duty
* cycle limits
*
* @param freq Switching frequency in kHz
* @param deadtime Deadtime in ns between switching the two FETs on/off
* @param min_duty Minimum duty cycle (e.g. 0.5 for limiting input voltage)
* @param max_duty Maximum duty cycle (e.g. 0.97 for charge pump)
* @param freq_kHz Switching frequency in kHz
* @param deadtime_ns Deadtime in ns between switching the two FETs on/off
* @param min_duty Minimum duty cycle (e.g. 0.5 for limiting input voltage)
* @param max_duty Maximum duty cycle (e.g. 0.97 for charge pump)
*/
void half_bridge_init(int freq_kHz, int deadtime_ns, float min_duty, float max_duty);
/** Start the PWM generation
*
* @param pwm_duty Duty cycle between 0.0 and 1.0
* @param pwm_duty Duty cycle between 0.0 and 1.0
*/
void half_bridge_start(float pwm_duty);
@@ -39,29 +44,26 @@ void half_bridge_stop();
/** Get status of the PWM output
*
* @returns
* True if PWM output enabled
* @returns True if PWM output enabled
*/
bool half_bridge_enabled();
/** Set the duty cycle of the PWM signal between 0.0 and 1.0
/** Set the duty cycle of the PWM signal
*
* @param duty Duty cycle between 0.0 and 1.0
* @param duty Duty cycle between 0.0 and 1.0
*/
void half_bridge_set_duty_cycle(float duty);
/** Adjust the duty cycle with minimum step size
*
* @param delta Number of steps (positive or negative)
* @param delta Number of steps (positive or negative)
*/
void half_bridge_duty_cycle_step(int delta);
/** Read the currently set duty cycle
*
* @returns
* Duty cycle between 0.0 and 1.0
* @returns Duty cycle between 0.0 and 1.0
*/
float half_bridge_get_duty_cycle();
#endif // HALFB_RIDGE_H
#endif /* HALF_BRIDGE_H */