184 static uint8_t state = 1;
void EnableU2(void)
Enables the user function 2 LED.
void EnableU3(void)
Enables the user function 3 LED.
void EnableU1(void)
Enables the user function 1 LED.
void DisableFaultLEDs(void)
Disables all LEDs.
void EnableOverCurrentLED(void)
Enables the over current fault LED.
void SweepLEDsBlocking(void)
Sweeps through all LEDs individually with a delay.
void EnableNoHallConnectionsLED(void)
Enables the no hall connection fault LED.
void EnableMotorStoppedLED(void)
Enables the motor stopped fault LED.
void faultSequentialStateMachine(volatile faultflags_t *faultFlags, volatile motorflags_t *motorFlags)
Sequential State Machine for Handling Fault Flags.
void EnableReverseRotationLED(void)
Enables the reverse rotation fault LED.
#define FAULT_PIN_2
Fault Pin 2.
struct motorflags motorflags_t
Collection of all motor control flags.
#define TRUE
TRUE constant value, defined to be compatible with comparisons.
#define FALSE
FALSE constant value.
#define FAULT_PIN_3
Fault Pin 3.
struct faultflags faultflags_t
Collection of all fault flags.
#define FAULT_PIN_1
Fault Pin 1.
uint8_t userFlag2
Is user flag 2 set?
uint8_t motorStopped
Is motor stopped?
uint8_t userFlag3
Is user flag 3 set?
uint8_t noHallConnections
Is there no hall connections?
uint8_t overCurrent
Has it tripped the over current limit?
uint8_t reverseDirection
Is motor spinning in an unexpected direction?
uint8_t userFlag1
Is user flag 1 set?
uint8_t enable
Is the motor enabled?