Moved cortex header to translation unit, added stopMotors

This commit is contained in:
Andrey Mironov 2018-07-25 11:37:27 +03:00
parent 134616ed32
commit 1ddfd9817d
3 changed files with 8 additions and 1 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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"