Commit 8b5652d6 authored by Iulian Gheorghiu's avatar Iulian Gheorghiu

Fix the clear of the HDMI display avoiding flicker.

Reduce the I2C speed from 1Mb/s to 400Kb/s on RISC-V FPGA platform because use the very weak pull up's from the FPGA device.
parent a2742381
......@@ -457,6 +457,8 @@ if(lcd_fpga_0)/* This display driver is used like an external device (non regist
lcd_fpga_0->clear(Color::Black);
}
#endif
bool state_hbtn_0 = false;
bool state_hbtn_0_old = true;
while(1)
{
//GI::Sys::Clock::sleep();
......@@ -609,7 +611,6 @@ _continue:
}
}
#if defined (__Xmega_FPGA__) || defined (RiscV_FPGA)
bool state_hbtn_0;
GI::IO::read((char *)"hbtn-0", &state_hbtn_0);
#endif
#ifdef _USE_HIH613x
......@@ -1141,6 +1142,14 @@ _continue:
#endif
)
{
#if defined (__Xmega_FPGA__) || defined (RiscV_FPGA)
if(state_hbtn_0_old != state_hbtn_0)
{
state_hbtn_0_old = state_hbtn_0;
if(dev.SCREEN[0])
dev.SCREEN[0]->clear(Color::Black);
}
#endif
#ifdef _USE_SSD1306
ssd1306_0->clear(Color::Black);
#endif
......@@ -1398,6 +1407,14 @@ _continue:
#endif
)
{
#if defined (__Xmega_FPGA__) || defined (RiscV_FPGA)
if(state_hbtn_0_old != state_hbtn_0)
{
state_hbtn_0_old = state_hbtn_0;
if(dev.SCREEN[0])
dev.SCREEN[0]->clear(Color::Black);
}
#endif
float lps25hb_Temp = 0.0;
if(!lps25hb_0.readTemp(&lps25hb_Temp))
{
......
......@@ -44,7 +44,7 @@ ioSetCfgGpio(ug2832_vdd, "oled-vdd", pin_mux_convert_to_pin(IOG, 3),CfgGpio::
ioSetCfgUart(uart_0, "uart-0", pin_mux_convert_to_pin(IOA, 0) , pin_mux_convert_to_pin(IOA, 0) , 115200 , CfgUart::WORD_LEN_8 , CfgUart::STOP_BITS_ONE , CfgUart::PAR_NONE , CfgUart::MODE_ASYNC);
ioSetCfgI2c(i2c_0, "i2c-0", pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), 1000000);
ioSetCfgI2c(i2c_0, "i2c-0", pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), 400000);
ioSetCfgSpi(spi_0_0, "spi-0.0", pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), CfgSpi::spiMode0, 15000000, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment