3.3.1 Functions
void MC_Initialize (void)
Initializes the AVR® MCU Motor Control Library.
void MC_DelayMs (uint32_t delayMs)
Performs a delay using a timer in the background.
void MC_ReferenceSet (uint16_t reference)
Sets the reference point. When the speed regulator is enabled, it sets the reference for the speed control loop. When the speed regulator is disabled, it sets the drive amplitude, and the speed will vary depending on the power supply voltage and mechanical load.
uint8_t MC_PotentiometerRead (void)
Returns the potentiometer value in percentage.
uint16_t MC_FastPotentiometerRead (void)
Returns the potentiometer value in uint16_t format.
uint16_t MC_VoltageBusRead (void)
Returns the bus voltage.
uint8_t MC_TemperatureRead (void)
Returns the temperature of the MOSFETs in degrees Celsius.
int16_t MC_CurrentRead (void)
Returns the mean current value in milliamperes (mA).
mc_speed_t MC_SpeedGet (void)
Returns the motor's the rotational speed.
void MC_PeriodicHandlerRegister (mc_status_handler_t pHandler)
Registers a user's function as a callback. The user's function must have the prototype:
void function(void)
.mc_status_t MC_StatusGet (void)
Returns the status of the motor.
void MC_StartStop (mc_direction_t direction)
Starts or stops the motor when a start or stop event is received.
mc_hall_error_t MC_HallError_Get (void)
Returns the current error code of the Hall sensor.