mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-25 11:06:48 +08:00
add fan_output to BSP
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
Submodule Firmware/Private updated: 8ce67c672c...cd00d9b0f3
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user