1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

Make display support configurable per-target, enabled by default for

NAZE and EUSTM32F103RC.
This commit is contained in:
Dominic Clifton 2014-09-09 02:11:38 +01:00
parent f29168a998
commit 2e959dfd04
6 changed files with 11 additions and 0 deletions

View file

@ -212,6 +212,7 @@ NAZE_SRC = startup_stm32f10x_md_gcc.S \
drivers/bus_spi.c \ drivers/bus_spi.c \
drivers/bus_i2c_stm32f10x.c \ drivers/bus_i2c_stm32f10x.c \
drivers/compass_hmc5883l.c \ drivers/compass_hmc5883l.c \
drivers/display_ug2864hsweg01.h \
drivers/gpio_stm32f10x.c \ drivers/gpio_stm32f10x.c \
drivers/inverter.c \ drivers/inverter.c \
drivers/light_led_stm32f10x.c \ drivers/light_led_stm32f10x.c \

View file

@ -22,6 +22,8 @@
#include "build_config.h" #include "build_config.h"
#ifdef DISPLAY
#include "drivers/system.h" #include "drivers/system.h"
#include "drivers/display_ug2864hsweg01.h" #include "drivers/display_ug2864hsweg01.h"
@ -70,3 +72,5 @@ void displayInit(void)
delay(20); delay(20);
ug2864hsweg01InitI2C(); ug2864hsweg01InitI2C();
} }
#endif

View file

@ -139,7 +139,9 @@ void init(void)
initBoardAlignment(&masterConfig.boardAlignment); initBoardAlignment(&masterConfig.boardAlignment);
#ifdef DISPLAY
displayInit(); displayInit();
#endif
// We have these sensors; SENSORS_SET defined in board.h depending on hardware platform // We have these sensors; SENSORS_SET defined in board.h depending on hardware platform
sensorsSet(SENSORS_SET); sensorsSet(SENSORS_SET);

View file

@ -432,9 +432,11 @@ void executePeriodicTasks(void)
} }
break; break;
#endif #endif
#ifdef DISPLAY
case UPDATE_DISPLAY_TASK: case UPDATE_DISPLAY_TASK:
updateDisplay(); updateDisplay();
break; break;
#endif
} }
if (periodicTaskIndex >= PERIODIC_TASK_COUNT) { if (periodicTaskIndex >= PERIODIC_TASK_COUNT) {

View file

@ -22,6 +22,7 @@
#define GYRO #define GYRO
#define MAG #define MAG
#define SONAR #define SONAR
#define DISPLAY
#define USE_USART1 #define USE_USART1
#define USE_USART2 #define USE_USART2

View file

@ -46,6 +46,7 @@
#define LED0 #define LED0
#define LED1 #define LED1
#define INVERTER #define INVERTER
#define DISPLAY
#define USE_USART1 #define USE_USART1
#define USE_USART2 #define USE_USART2