/* * bldc.h * * Created: 10/03/2021 14:38:14 * Author: Nick-XMG */ #ifndef BLDC_H_ #define BLDC_H_ // ---------------------------------------------------------------------- // header files // ---------------------------------------------------------------------- //#include "arm_math.h" #include "atmel_start.h" #include "control.h" #include "motor_params.h" /* if the Hall sensor reads 0x0 or 0x7 that means either one of the hall sensor is damaged or disconnected*/ #define INVALID_HALL_0 (0U) #define INVALID_HALL_7 (7U) // ---------------------------------------------------------------------- // ADC Parameters // ---------------------------------------------------------------------- #define ADC_VOLTAGE_REFERENCE (3.3f) #define ADC_RESOLUTION (12) #define ADC_MAX_COUNTS (1<