Moved cortex header to translation unit, added stopMotors
This commit is contained in:
parent
134616ed32
commit
1ddfd9817d
|
@ -30,6 +30,8 @@
|
|||
#include "drivers/nvic.h"
|
||||
#include "drivers/system.h"
|
||||
|
||||
#include "stm32f7xx_ll_cortex.h"
|
||||
|
||||
|
||||
#define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000)
|
||||
void SystemClock_Config(void);
|
||||
|
|
|
@ -36,6 +36,12 @@ void MemManage_Handler(void)
|
|||
{
|
||||
LED2_ON;
|
||||
|
||||
// fall out of the sky
|
||||
uint8_t requiredStateForMotors = SYSTEM_STATE_CONFIG_LOADED | SYSTEM_STATE_MOTORS_READY;
|
||||
if ((systemState & requiredStateForMotors) == requiredStateForMotors) {
|
||||
stopMotors();
|
||||
}
|
||||
|
||||
#ifdef USE_TRANSPONDER
|
||||
// prevent IR LEDs from burning out.
|
||||
uint8_t requiredStateForTransponder = SYSTEM_STATE_CONFIG_LOADED | SYSTEM_STATE_TRANSPONDER_ENABLED;
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "stm32f7xx_hal.h"
|
||||
#include "system_stm32f7xx.h"
|
||||
|
||||
#include "stm32f7xx_ll_cortex.h"
|
||||
#include "stm32f7xx_ll_spi.h"
|
||||
#include "stm32f7xx_ll_gpio.h"
|
||||
#include "stm32f7xx_ll_dma.h"
|
||||
|
|
Loading…
Reference in New Issue