add fan_output to BSP

This commit is contained in:
Samuel Sadok
2021-02-15 19:30:40 +01:00
parent efa8b24cc3
commit 938a05001e
5 changed files with 15 additions and 5 deletions
+3
View File
@@ -376,6 +376,9 @@ std::array<Axis, AXIS_COUNT> axes{{
Stm32BasicPwmOutput<TIM_APB1_PERIOD_CLOCKS, TIM_APB1_DEADTIME_CLOCKS> brake_resistor_output_impl{TIM2->CCR3, TIM2->CCR4};
PwmOutputGroup<1>& brake_resistor_output = brake_resistor_output_impl;
template<> PwmOutputGroup<1>* BoardSupportPackage::fan_output = nullptr;
/* Misc Variables ------------------------------------------------------------*/
volatile uint32_t& board_control_loop_counter = TIM13->CNT;
@@ -1,5 +1,5 @@
#ifndef __STM32_BASIC_PWM_OUTPUT_HPP
#define __STM32_BASIC_PWM_OUTPUT_HPP
#ifndef __STM32_ADVANCED_PWM_OUTPUT_HPP
#define __STM32_ADVANCED_PWM_OUTPUT_HPP
#include <interfaces/pwm_output_group.hpp>
@@ -156,4 +156,4 @@ public:
on_stopped_cb_t on_stopped_;
};
#endif // __STM32_BASIC_PWM_OUTPUT_HPP
#endif // __STM32_ADVANCED_PWM_OUTPUT_HPP
@@ -55,6 +55,13 @@ struct BoardSupportPackageBase {
*/
static File& nvm;
/**
* @brief PWM output to control the FAN speed.
*
* null on
*/
static PwmOutputGroup<1>* fan_output;
/**
* @brief Continuously updated measurement of the DC link voltage in Volts.
*
+1 -1
View File
@@ -57,7 +57,7 @@ struct PwmOutputGroup {
* stopped operating.
*/
virtual void start(on_update_cb_t on_update,
fibre::Callback<void> on_stopped) = 0;
on_stopped_cb_t on_stopped) = 0;
/**
* @brief Stops the PWM output asynchronously.