mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 11:08:20 +00:00
Many multiboot fix
This commit is contained in:
1 parent
78f5b76a71
commit
c8b65bb9d8
3 files changed
+49
-23
No files matched your search
+15
-6
@@ -204,9 +204,11 @@ void ST7565_DrawLine(const unsigned int Column, const unsigned int Line, const u
|
||||
void ST7565_FillScreen(uint8_t value)
|
||||
{
|
||||
CS_Assert();
|
||||
for (unsigned i = 0; i < 8; i++) {
|
||||
// TODO: This is wrong
|
||||
DrawLine(0, i, NULL, value);
|
||||
for (uint8_t line = 0; line < 8u; line++) {
|
||||
ST7565_SelectColumnAndLine(4u, line);
|
||||
A0_Set();
|
||||
for (uint8_t column = 0; column < LCD_WIDTH; column++)
|
||||
SPI_WriteByte(value);
|
||||
}
|
||||
CS_Release();
|
||||
}
|
||||
@@ -333,6 +335,10 @@ void ST7565_Init(void)
|
||||
SPI_Init();
|
||||
ST7565_HardwareReset();
|
||||
CS_Assert();
|
||||
|
||||
/* Hide the controller RAM immediately. On K1 there is no usable hardware
|
||||
* reset pin, so its power-on contents can otherwise briefly reach the LCD. */
|
||||
ST7565_WriteByte(ST7565_CMD_DISPLAY_ON_OFF | 0);
|
||||
ST7565_WriteByte(ST7565_CMD_SOFTWARE_RESET); // software reset
|
||||
SYSTEM_DelayMs(120);
|
||||
|
||||
@@ -354,13 +360,16 @@ void ST7565_Init(void)
|
||||
ST7565_WriteByte(ST7565_CMD_POWER_CIRCUIT | 0b111); // VB=1 VR=1 VF=1
|
||||
|
||||
SYSTEM_DelayMs(40);
|
||||
|
||||
ST7565_WriteByte(ST7565_CMD_SET_START_LINE | 0); // line 0
|
||||
ST7565_WriteByte(ST7565_CMD_DISPLAY_ON_OFF | 1); // D=1
|
||||
|
||||
ST7565_WriteByte(ST7565_CMD_SET_START_LINE | 0); // line 0
|
||||
CS_Release();
|
||||
|
||||
/* Clear all eight LCD RAM pages while the display is still disabled. */
|
||||
ST7565_FillScreen(0x00);
|
||||
|
||||
CS_Assert();
|
||||
ST7565_WriteByte(ST7565_CMD_DISPLAY_ON_OFF | 1); // D=1
|
||||
CS_Release();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
|
||||
Reference in new issue
Block a user