kopia lustrzana https://github.com/OpenRTX/OpenRTX
Remove backlight control from anywhere except platform.c and platform.h
rodzic
c77ff5b339
commit
c3ef0ca036
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue