From f1b82d704786418f0b07add0733d12fca16978eb Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 17 Sep 2023 16:17:55 +0800 Subject: [PATCH] update --- components/dwin/var_icon.cpp | 2 ++ components/dwin/var_icon.hpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/components/dwin/var_icon.cpp b/components/dwin/var_icon.cpp index 6ca3144..5d85d58 100644 --- a/components/dwin/var_icon.cpp +++ b/components/dwin/var_icon.cpp @@ -69,6 +69,8 @@ void VarIcon::setpos(uint16_t posx, uint16_t posy) { flushcfg(); } + + void VarIcon::dumpinfo() { readcfg(); printf("m_VP = %04x\n", m_descript.m_VP); diff --git a/components/dwin/var_icon.hpp b/components/dwin/var_icon.hpp index 5392ddd..ee159ac 100644 --- a/components/dwin/var_icon.hpp +++ b/components/dwin/var_icon.hpp @@ -45,6 +45,15 @@ class VarIcon { void initcfg(uint16_t valpointerAdd, uint16_t initval, uint16_t posx, uint16_t posy, uint16_t iconlib, uint16_t iconmin, uint16_t iconmax); void setpos(uint16_t posx, uint16_t posy); + void setpos_x(uint16_t posx) { + m_descript.m_PosX = posx; + flushcfg(); + } + + void setpos_y(uint16_t posy) { + m_descript.m_PosY = posy; + flushcfg(); + } /** * @brief