diff --git a/app/src/pwm_switch.h b/app/src/pwm_switch.h index fbbf726..fa496b1 100644 --- a/app/src/pwm_switch.h +++ b/app/src/pwm_switch.h @@ -113,13 +113,59 @@ public: extern "C" { #endif +/** + * Read the currently set duty cycle + * + * @returns Duty cycle between 0.0 and 1.0 + */ float pwm_signal_get_duty_cycle(); + +/** + * Set the duty cycle of the PWM signal + * + * @param duty Duty cycle between 0.0 and 1.0 + */ void pwm_signal_set_duty_cycle(float duty); + +/** + * Change raw timer capture/compare register by defined step + * + * @param delta Steps to be added/substracted from current CCR value + */ void pwm_signal_duty_cycle_step(int delta); + +/** + * Initiatializes the registers to generate the PWM signal and sets duty + * cycle limits + * + * @param freq_Hz Switching frequency in Hz +*/ void pwm_signal_init_registers(int freq_Hz); + +/** + * Start the PWM generation + * + * @param duty Duty cycle between 0.0 and 1.0 + */ void pwm_signal_start(float pwm_duty); + +/** + * Stop the PWM generation + */ void pwm_signal_stop(); + +/** + * Check if the PWM pin voltage level is high (on-state) + * + * @returns true if pin is high, false if pin is low + */ bool pwm_signal_high(); + +/** + * Check if the PWM generation is active + * + * @returns true if PWM signal generation is active + */ bool pwm_active(); #ifdef __cplusplus diff --git a/docs/src/overview/features.rst b/docs/src/overview/features.rst index 45351d0..146ea3b 100644 --- a/docs/src/overview/features.rst +++ b/docs/src/overview/features.rst @@ -1,2 +1,25 @@ Features ======== + +- Running on `Zephyr RTOS`_ + +- STM32F0, STM32L0 and STM32G4 series MCUs + +- Different battery types supported (lead-acid, Li-ion, LiFePO4) + +- Maximum power point tracking (MPPT) algorithm based on Perturb and Observe (P&O) + +- PWM solar input (for certain hardware) + +- Load output with deep-discharge protection + +- Monitoring and configuration using the `ThingSet`_ protocol (mapping to MQTT, CoAP and HTTP + possible) + + - Serial interface + - CAN bus + +- OLED display support + +.. _Zephyr RTOS: https://docs.zephyrproject.org +.. _ThingSet: https://thingset.io