summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: