diff --git a/src/main/drivers/max7456.c b/src/main/drivers/max7456.c index 2e43433404..5530de1fc9 100644 --- a/src/main/drivers/max7456.c +++ b/src/main/drivers/max7456.c @@ -349,9 +349,7 @@ uint8_t max7456GetRowsCount(void) void max7456ReInit(void) { - uint8_t maxScreenRows; uint8_t srdata = 0; - uint16_t x; static bool firstInit = true; ENABLE_MAX7456; @@ -381,17 +379,14 @@ void max7456ReInit(void) if (videoSignalReg & VIDEO_MODE_PAL) { //PAL maxScreenSize = VIDEO_BUFFER_CHARS_PAL; - maxScreenRows = VIDEO_LINES_PAL; } else { // NTSC maxScreenSize = VIDEO_BUFFER_CHARS_NTSC; - maxScreenRows = VIDEO_LINES_NTSC; } - // Set all rows to same charactor black/white level. - - for (x = 0; x < maxScreenRows; x++) { - max7456Send(MAX7456ADD_RB0 + x, BWBRIGHTNESS); - } + /* Set all rows to same charactor black/white level. */ + max7456Brightness(0, 2); + /* Re-enable MAX7456 (last function call disables it) */ + ENABLE_MAX7456; // Make sure the Max7456 is enabled max7456Send(MAX7456ADD_VM0, videoSignalReg); @@ -402,7 +397,6 @@ void max7456ReInit(void) DISABLE_MAX7456; // Clear shadow to force redraw all screen in non-dma mode. - memset(shadowBuffer, 0, maxScreenSize); if (firstInit) { diff --git a/src/main/drivers/max7456.h b/src/main/drivers/max7456.h index 63cf0e15ff..b3a7b82966 100755 --- a/src/main/drivers/max7456.h +++ b/src/main/drivers/max7456.h @@ -17,15 +17,6 @@ #pragma once -#ifndef WHITEBRIGHTNESS - #define WHITEBRIGHTNESS 0x01 -#endif -#ifndef BLACKBRIGHTNESS - #define BLACKBRIGHTNESS 0x00 -#endif - -#define BWBRIGHTNESS ((BLACKBRIGHTNESS << 2) | WHITEBRIGHTNESS) - /** PAL or NTSC, value is number of chars total */ #define VIDEO_BUFFER_CHARS_NTSC 390 #define VIDEO_BUFFER_CHARS_PAL 480