Add electrical specs to motor structs.
More #defines for PWM settings.
This commit is contained in:
		@@ -10,13 +10,24 @@ typedef struct {
 | 
			
		||||
    uint32_t                U_Phase_TIM_Channel;
 | 
			
		||||
    uint32_t                V_Phase_TIM_Channel;
 | 
			
		||||
    uint32_t                W_Phase_TIM_Channel;
 | 
			
		||||
}Cont_Mot_Interface_TypeDef;
 | 
			
		||||
} Cont_Mot_PWMInterface_TypeDef;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Cont_Mot_Interface_TypeDef Motor_Interface;
 | 
			
		||||
    uint32_t                rpm_rated_speed;
 | 
			
		||||
    uint32_t                mA_rated_current;
 | 
			
		||||
    uint8_t                 num_poles;
 | 
			
		||||
    uint16_t                v_rated_voltage;
 | 
			
		||||
    uint16_t                w_rated_power;
 | 
			
		||||
    float                   vkrpm_bemf_constant;
 | 
			
		||||
    uint32_t                Nmm_rated_torque;
 | 
			
		||||
} Electrical_Specs_TypeDef;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Cont_Mot_PWMInterface_TypeDef   PWM_Interface;
 | 
			
		||||
    Electrical_Specs_TypeDef        Electrical_Specs;
 | 
			
		||||
} Motor_TypeDef;
 | 
			
		||||
 | 
			
		||||
void BLDC_Init(Cont_Mot_Interface_TypeDef Interface);
 | 
			
		||||
void BLDC_PWM_Init(Cont_Mot_PWMInterface_TypeDef* PWM_Interface);
 | 
			
		||||
void BLDC_Loop();
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
		Reference in New Issue
	
	Block a user