Merge pull request #28 from etmatrix/master

some little correction in SSD1289 driver
ugfx_release_2.6
Tectu 2012-12-17 13:42:57 -08:00
commit e2b9c5cfce
1 changed files with 13 additions and 11 deletions

View File

@ -292,8 +292,8 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
void GDISP_LLD(clear)(color_t color) { void GDISP_LLD(clear)(color_t color) {
unsigned i; unsigned i;
reset_viewport();
acquire_bus(); acquire_bus();
reset_viewport();
set_cursor(0, 0); set_cursor(0, 0);
stream_start(); stream_start();
for(i = 0; i < GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT; i++) for(i = 0; i < GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT; i++)
@ -499,6 +499,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
* @notapi * @notapi
*/ */
void GDISP_LLD(control)(unsigned what, void *value) { void GDISP_LLD(control)(unsigned what, void *value) {
acquire_bus();
switch(what) { switch(what) {
case GDISP_CONTROL_POWER: case GDISP_CONTROL_POWER:
if (GDISP.Powermode == (gdisp_powermode_t)value) if (GDISP.Powermode == (gdisp_powermode_t)value)
@ -571,6 +572,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
case GDISP_CONTROL_CONTRAST: case GDISP_CONTROL_CONTRAST:
*/ */
} }
release_bus();
} }
#endif #endif