mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Moved cortex header to translation unit, added stopMotors
This commit is contained in:
parent
134616ed32
commit
1ddfd9817d
3 changed files with 8 additions and 1 deletions
|
@ -30,6 +30,8 @@
|
||||||
#include "drivers/nvic.h"
|
#include "drivers/nvic.h"
|
||||||
#include "drivers/system.h"
|
#include "drivers/system.h"
|
||||||
|
|
||||||
|
#include "stm32f7xx_ll_cortex.h"
|
||||||
|
|
||||||
|
|
||||||
#define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000)
|
#define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000)
|
||||||
void SystemClock_Config(void);
|
void SystemClock_Config(void);
|
||||||
|
|
|
@ -36,6 +36,12 @@ void MemManage_Handler(void)
|
||||||
{
|
{
|
||||||
LED2_ON;
|
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
|
#ifdef USE_TRANSPONDER
|
||||||
// prevent IR LEDs from burning out.
|
// prevent IR LEDs from burning out.
|
||||||
uint8_t requiredStateForTransponder = SYSTEM_STATE_CONFIG_LOADED | SYSTEM_STATE_TRANSPONDER_ENABLED;
|
uint8_t requiredStateForTransponder = SYSTEM_STATE_CONFIG_LOADED | SYSTEM_STATE_TRANSPONDER_ENABLED;
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include "stm32f7xx_hal.h"
|
#include "stm32f7xx_hal.h"
|
||||||
#include "system_stm32f7xx.h"
|
#include "system_stm32f7xx.h"
|
||||||
|
|
||||||
#include "stm32f7xx_ll_cortex.h"
|
|
||||||
#include "stm32f7xx_ll_spi.h"
|
#include "stm32f7xx_ll_spi.h"
|
||||||
#include "stm32f7xx_ll_gpio.h"
|
#include "stm32f7xx_ll_gpio.h"
|
||||||
#include "stm32f7xx_ll_dma.h"
|
#include "stm32f7xx_ll_dma.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue