diff --git a/openrtx/include/interfaces/display.h b/openrtx/include/interfaces/display.h index 311c88b0..66090042 100644 --- a/openrtx/include/interfaces/display.h +++ b/openrtx/include/interfaces/display.h @@ -44,13 +44,12 @@ */ /** - * This function initialises the display, configures backlight control and - * allocates framebuffer on the heap. After initialisation, backlight is set - * to zero. + * This function initialises the display and allocates framebuffer on the heap. + * * NOTE: framebuffer allocation is the first operation performed, if fails an * error message is printed on the virtual COM port and this function returns - * prematurely, without configuring the display and the backlight timer. Thus, a - * dark screen can be symptom of failed allocation. + * prematurely, without configuring the display. + * Thus, a dark screen can be symptom of failed allocation. */ void display_init(); @@ -70,7 +69,7 @@ void display_init(); void *display_getFrameBuffer(); /** - * When called, this function turns off backlight, shuts down backlight control + * When called, this function terminates the display driver * and deallocates the framebuffer. */ void display_terminate(); diff --git a/openrtx/include/interfaces/graphics.h b/openrtx/include/interfaces/graphics.h index c2380918..06985aa9 100644 --- a/openrtx/include/interfaces/graphics.h +++ b/openrtx/include/interfaces/graphics.h @@ -29,7 +29,7 @@ * This interface is based on the lower level interface display.h * Many methods of graphics.h are basically calls to methods in display.h. * - * On top of basic framebuffer and backlight control, graphics.h implements + * On top of basic framebuffer control, graphics.h implements * graphics primitives for drawing fonts and shapes * *********************** HOW TO MANAGE FRAMEBUFFER ***************************** @@ -88,13 +88,13 @@ typedef enum /** * This function calls the correspondent method of the low level interface display.h - * It initializes the display and sets the backlight to zero. + * It initializes the display. */ void gfx_init(); /** * This function calls the correspondent method of the low level interface display.h - * It turns off backlight, shuts down backlight control and deallocates the framebuffer. + * It terminates the display driver and deallocates the framebuffer. */ void gfx_terminate(); @@ -112,14 +112,6 @@ uint16_t gfx_screenWidth(); */ uint16_t gfx_screenHeight(); -/** - * This function calls the correspondent method of the low level interface display.h - * Set screen backlight to a given level. - * @param level: backlight level, from 0 (backlight off) to 255 (backlight at - * full brightness). - */ -void gfx_setBacklightLevel(uint8_t level); - /** * This function calls the correspondent method of the low level interface display.h * Copy a given section, between two given rows, of framebuffer content to the diff --git a/platform/drivers/display/HX83XX_md380.c b/platform/drivers/display/HX83XX_md380.c index 99955dd0..47e8f3f2 100644 --- a/platform/drivers/display/HX83XX_md380.c +++ b/platform/drivers/display/HX83XX_md380.c @@ -342,7 +342,7 @@ void display_init() void display_terminate() { - /* Shut off backlight, FSMC and deallocate framebuffer */ + /* Shut off FSMC and deallocate framebuffer */ gpio_setMode(GPIOC, 6, OUTPUT); gpio_clearPin(GPIOC, 6); RCC->AHB3ENR &= ~RCC_AHB3ENR_FSMCEN; diff --git a/platform/drivers/display/display_libSDL.c b/platform/drivers/display/display_libSDL.c index 788528af..b420a613 100644 --- a/platform/drivers/display/display_libSDL.c +++ b/platform/drivers/display/display_libSDL.c @@ -185,11 +185,6 @@ uint16_t display_screenHeight() return SCREEN_HEIGHT; } -void display_setBacklightLevel(uint8_t level) -{ - printf("Backlight level set to %d\n", level); -} - void display_renderRows(uint8_t startRow, uint8_t endRow) { Uint32 *pixels = (Uint32*)renderSurface->pixels;