Motor Evaluation Kit
NEVC-MCTRL-100-t01-1.0.0
Firmware for NEVB-MCTRL-100-01 for trapezoidal control of BLDC motors using Hall-effect sensors
Loading...
Searching...
No Matches
fault.h
Go to the documentation of this file.
1
/* This file has been prepared for Doxygen automatic documentation generation.*/
22
#ifndef _FAULT_H_
23
#define _FAULT_H_
24
26
#define __AVR_ATmega32U4__ 1
27
28
// Include AVR input/output definitions for low-level hardware control
29
#include <avr/io.h>
30
31
// Include utility functions for delays
32
#include <util/delay.h>
33
34
// Include standard integer type definitions
35
#include "stdint.h"
36
37
// Include motor header
38
#include "
main.h
"
39
40
// Function prototypes
41
void
EnableOverCurrentLED
(
void
);
42
void
EnableMotorStoppedLED
(
void
);
43
void
EnableReverseRotationLED
(
void
);
44
void
EnableU3
(
void
);
45
void
EnableU2
(
void
);
46
void
EnableU1
(
void
);
47
void
EnableNoHallConnectionsLED
(
void
);
48
void
DisableFaultLEDs
(
void
);
49
void
SweepLEDsBlocking
(
void
);
50
void
faultSequentialStateMachine
(
volatile
faultflags_t
*
faultFlags
,
volatile
motorflags_t
*
motorFlags
);
51
52
#endif
/* _FAULT_H_ */
EnableU2
void EnableU2(void)
Enables the user function 2 LED.
Definition
fault.cpp:91
EnableU3
void EnableU3(void)
Enables the user function 3 LED.
Definition
fault.cpp:76
EnableU1
void EnableU1(void)
Enables the user function 1 LED.
Definition
fault.cpp:106
DisableFaultLEDs
void DisableFaultLEDs(void)
Disables all LEDs.
Definition
fault.cpp:132
EnableOverCurrentLED
void EnableOverCurrentLED(void)
Enables the over current fault LED.
Definition
fault.cpp:32
SweepLEDsBlocking
void SweepLEDsBlocking(void)
Sweeps through all LEDs individually with a delay.
Definition
fault.cpp:144
EnableNoHallConnectionsLED
void EnableNoHallConnectionsLED(void)
Enables the no hall connection fault LED.
Definition
fault.cpp:120
EnableMotorStoppedLED
void EnableMotorStoppedLED(void)
Enables the motor stopped fault LED.
Definition
fault.cpp:46
faultSequentialStateMachine
void faultSequentialStateMachine(volatile faultflags_t *faultFlags, volatile motorflags_t *motorFlags)
Sequential State Machine for Handling Fault Flags.
Definition
fault.cpp:181
EnableReverseRotationLED
void EnableReverseRotationLED(void)
Enables the reverse rotation fault LED.
Definition
fault.cpp:61
main.h
Motor control header file.
motorFlags
volatile motorflags_t motorFlags
Motor control flags placed in I/O space for fast access.
Definition
main.ino:76
faultFlags
volatile faultflags_t faultFlags
Fault flags placed in I/O space for fast access.
Definition
main.ino:84
faultflags
Collection of all fault flags.
Definition
main.h:999
motorflags
Collection of all motor control flags.
Definition
main.h:979
fault.h
Generated by
1.10.0