diff --git a/meson.build b/meson.build index 66b3bdd0..a6492e94 100644 --- a/meson.build +++ b/meson.build @@ -389,6 +389,7 @@ md9600_src = ['platform/targets/MD-9600/platform.c', 'platform/targets/MD-9600/hwconfig.c', 'platform/drivers/display/ST7567_MD9600.c', 'platform/drivers/keyboard/keyboard_MD9600.c', + 'platform/drivers/backlight/backlight_MDx.c', 'platform/drivers/chSelector/chSelector_MD9600.c', 'platform/drivers/baseband/radio_MD9600.cpp', 'platform/drivers/CPS/cps_io_native_MD9600.c'] diff --git a/platform/drivers/display/ST7567_MD9600.c b/platform/drivers/display/ST7567_MD9600.c index 178ca40f..8fe91823 100644 --- a/platform/drivers/display/ST7567_MD9600.c +++ b/platform/drivers/display/ST7567_MD9600.c @@ -143,7 +143,8 @@ void display_setContrast(uint8_t contrast) spi_release(&spi2); } -void display_setBacklightLevel(uint8_t level) -{ - (void) level; -} +/* + * Function implemented in backlight_MDx driver + * + * void display_setBacklightLevel(uint8_t level) + */ diff --git a/platform/targets/MD-9600/hwconfig.h b/platform/targets/MD-9600/hwconfig.h index 34b20d68..520b2d4f 100644 --- a/platform/targets/MD-9600/hwconfig.h +++ b/platform/targets/MD-9600/hwconfig.h @@ -57,6 +57,9 @@ extern const struct Adc adc1; #define CONFIG_SCREEN_CONTRAST #define CONFIG_DEFAULT_CONTRAST 91 +/* Screen has adjustable brightness */ +#define CONFIG_SCREEN_BRIGHTNESS + /* Screen pixel format */ #define CONFIG_PIX_FMT_BW diff --git a/platform/targets/MD-9600/platform.c b/platform/targets/MD-9600/platform.c index 1fc2dd37..f1025e4a 100644 --- a/platform/targets/MD-9600/platform.c +++ b/platform/targets/MD-9600/platform.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -75,6 +76,7 @@ void platform_init() nvm_init(); /* Initialise non volatile memory manager */ toneGen_init(); /* Initialise tone generator */ rtc_init(); /* Initialise RTC */ + backlight_init(); /* Initialize Backlight */ chSelector_init(); /* Initialise channel selector handler */ audio_init(); /* Initialise audio management module */ }