summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2016-10-13 11:07:02 +0200
committerNicolas Schodet2019-10-09 23:05:51 +0200
commit54971d4b01b927a8b29a16a13c2708730bc209f9 (patch)
tree2cc97064da8c7c489158acb9dbb64b048cd2bc0c
parent3cd4ff12c71290c8dce32a9b82045eefc19c8036 (diff)
ucoo/hal/frame_buffer: add refresh without waiting HSYNC
This is needed when screen is OFF.
-rw-r--r--ucoo/hal/frame_buffer/dsi.stm32f4.cc7
-rw-r--r--ucoo/hal/frame_buffer/dsi.stm32f4.hh2
2 files changed, 6 insertions, 3 deletions
diff --git a/ucoo/hal/frame_buffer/dsi.stm32f4.cc b/ucoo/hal/frame_buffer/dsi.stm32f4.cc
index 8e13982..e344c81 100644
--- a/ucoo/hal/frame_buffer/dsi.stm32f4.cc
+++ b/ucoo/hal/frame_buffer/dsi.stm32f4.cc
@@ -180,10 +180,13 @@ Dsi::layer_setup (int layer, const Surface &surface, int x, int y)
}
void
-Dsi::refresh ()
+Dsi::refresh (bool wait_hsync)
{
refreshing_ = true;
- ucoo::Dsi::write_command ({ DCS_SET_TEAR_ON, 0x00 });
+ if (wait_hsync)
+ ucoo::Dsi::write_command ({ DCS_SET_TEAR_ON, 0x00 });
+ else
+ ucoo::reg::DSI->WCR |= DSI_WCR_LTDCEN;
while (refreshing_)
ucoo::barrier ();
}
diff --git a/ucoo/hal/frame_buffer/dsi.stm32f4.hh b/ucoo/hal/frame_buffer/dsi.stm32f4.hh
index 5f785aa..6842f19 100644
--- a/ucoo/hal/frame_buffer/dsi.stm32f4.hh
+++ b/ucoo/hal/frame_buffer/dsi.stm32f4.hh
@@ -44,7 +44,7 @@ class Dsi : public Ltdc
/// Setup a layer.
void layer_setup (int layer, const Surface &surface, int x, int y);
/// Refresh screen.
- static void refresh ();
+ static void refresh (bool wait_hsync);
/// Write a command to display.
static void write_command (std::initializer_list<uint8_t> data);
private: