mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 08:45:36 +03:00
Make display support configurable per-target, enabled by default for
NAZE and EUSTM32F103RC.
This commit is contained in:
parent
f29168a998
commit
2e959dfd04
6 changed files with 11 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -212,6 +212,7 @@ NAZE_SRC = startup_stm32f10x_md_gcc.S \
|
|||
drivers/bus_spi.c \
|
||||
drivers/bus_i2c_stm32f10x.c \
|
||||
drivers/compass_hmc5883l.c \
|
||||
drivers/display_ug2864hsweg01.h \
|
||||
drivers/gpio_stm32f10x.c \
|
||||
drivers/inverter.c \
|
||||
drivers/light_led_stm32f10x.c \
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "build_config.h"
|
||||
|
||||
#ifdef DISPLAY
|
||||
|
||||
#include "drivers/system.h"
|
||||
#include "drivers/display_ug2864hsweg01.h"
|
||||
|
||||
|
@ -70,3 +72,5 @@ void displayInit(void)
|
|||
delay(20);
|
||||
ug2864hsweg01InitI2C();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -139,7 +139,9 @@ void init(void)
|
|||
|
||||
initBoardAlignment(&masterConfig.boardAlignment);
|
||||
|
||||
#ifdef DISPLAY
|
||||
displayInit();
|
||||
#endif
|
||||
|
||||
// We have these sensors; SENSORS_SET defined in board.h depending on hardware platform
|
||||
sensorsSet(SENSORS_SET);
|
||||
|
|
|
@ -432,9 +432,11 @@ void executePeriodicTasks(void)
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef DISPLAY
|
||||
case UPDATE_DISPLAY_TASK:
|
||||
updateDisplay();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (periodicTaskIndex >= PERIODIC_TASK_COUNT) {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define GYRO
|
||||
#define MAG
|
||||
#define SONAR
|
||||
#define DISPLAY
|
||||
|
||||
#define USE_USART1
|
||||
#define USE_USART2
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#define LED0
|
||||
#define LED1
|
||||
#define INVERTER
|
||||
#define DISPLAY
|
||||
|
||||
#define USE_USART1
|
||||
#define USE_USART2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue