fix 8x6 char display bug

This commit is contained in:
YXZhu
2022-08-09 21:09:10 +08:00
parent 2240710d39
commit d94167793e
22 changed files with 4091 additions and 4004 deletions
@@ -635,9 +635,16 @@ void epd_paint_showString(uint16_t x, uint16_t y, uint8_t *chr, uint16_t size1,
{ {
epd_paint_showChar(x, y, *chr, size1, color); epd_paint_showChar(x, y, *chr, size1, color);
chr++; chr++;
if (size1 == 8)
{
x += 6;
}
else
{
x += size1 / 2; x += size1 / 2;
} }
} }
}
// m^n // m^n
static uint32_t _Pow(uint16_t m, uint16_t n) static uint32_t _Pow(uint16_t m, uint16_t n)
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@ __initial_sp
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h> ; </h>
Heap_Size EQU 0x00002000 Heap_Size EQU 0x00000200
AREA HEAP, NOINIT, READWRITE, ALIGN=3 AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base __heap_base
@@ -162,11 +162,13 @@ void epd_read_data(uint8_t reg,uint8_t *data,uint8_t length)
{ {
epd_cs_reset(); epd_cs_reset();
spi_i2s_data_transmit(SPI2, reg); spi_i2s_data_transmit(SPI2, reg);
while (spi_i2s_flag_get(SPI2, SPI_I2S_BF_FLAG) != RESET); while (spi_i2s_flag_get(SPI2, SPI_I2S_BF_FLAG) != RESET)
;
for (uint32_t i = 0; i < length; i++) for (uint32_t i = 0; i < length; i++)
{ {
data[i] = spi_i2s_data_receive(SPI2); data[i] = spi_i2s_data_receive(SPI2);
while (spi_i2s_flag_get(SPI2, SPI_I2S_BF_FLAG) != RESET); while (spi_i2s_flag_get(SPI2, SPI_I2S_BF_FLAG) != RESET)
;
} }
epd_cs_set(); epd_cs_set();
} }
@@ -656,9 +658,16 @@ void epd_paint_showString(uint16_t x, uint16_t y, uint8_t *chr, uint16_t size1,
{ {
epd_paint_showChar(x, y, *chr, size1, color); epd_paint_showChar(x, y, *chr, size1, color);
chr++; chr++;
if (size1 == 8)
{
x += 6;
}
else
{
x += size1 / 2; x += size1 / 2;
} }
} }
}
// m^n // m^n
static uint32_t _Pow(uint16_t m, uint16_t n) static uint32_t _Pow(uint16_t m, uint16_t n)
@@ -228,7 +228,7 @@
<Group> <Group>
<GroupName>App</GroupName> <GroupName>App</GroupName>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
File diff suppressed because it is too large Load Diff
@@ -634,9 +634,16 @@ void epd_paint_showString(uint16_t x, uint16_t y, uint8_t *chr, uint16_t size1,
{ {
epd_paint_showChar(x, y, *chr, size1, color); epd_paint_showChar(x, y, *chr, size1, color);
chr++; chr++;
if (size1 == 8)
{
x += 6;
}
else
{
x += size1 / 2; x += size1 / 2;
} }
} }
}
// m^n // m^n
static uint32_t _Pow(uint16_t m, uint16_t n) static uint32_t _Pow(uint16_t m, uint16_t n)
@@ -0,0 +1,14 @@
Toolchain=
Series=
Description=
Address=0x08000000
Target Path=obj\EpaperModuleTest_CH32V103.hex
Erase All=true
Program=true
Verify=true
Reset=true
Vendor=WCH
MCU=CH32V103C8T6
Mcu Type=CH32V10x
Link=WCH-Link
@@ -634,9 +634,16 @@ void epd_paint_showString(uint16_t x, uint16_t y, uint8_t *chr, uint16_t size1,
{ {
epd_paint_showChar(x, y, *chr, size1, color); epd_paint_showChar(x, y, *chr, size1, color);
chr++; chr++;
if (size1 == 8)
{
x += 6;
}
else
{
x += size1 / 2; x += size1 / 2;
} }
} }
}
// m^n // m^n
static uint32_t _Pow(uint16_t m, uint16_t n) static uint32_t _Pow(uint16_t m, uint16_t n)
@@ -624,9 +624,16 @@ void epd_paint_showString(uint16_t x, uint16_t y, uint8_t *chr, uint16_t size1,
{ {
epd_paint_showChar(x, y, *chr, size1, color); epd_paint_showChar(x, y, *chr, size1, color);
chr++; chr++;
if (size1 == 8)
{
x += 6;
}
else
{
x += size1 / 2; x += size1 / 2;
} }
} }
}
// m^n // m^n
static uint32_t _Pow(uint16_t m, uint16_t n) static uint32_t _Pow(uint16_t m, uint16_t n)
File diff suppressed because it is too large Load Diff
@@ -624,9 +624,16 @@ void epd_paint_showString(uint16_t x, uint16_t y, uint8_t *chr, uint16_t size1,
{ {
epd_paint_showChar(x, y, *chr, size1, color); epd_paint_showChar(x, y, *chr, size1, color);
chr++; chr++;
if (size1 == 8)
{
x += 6;
}
else
{
x += size1 / 2; x += size1 / 2;
} }
} }
}
// m^n // m^n
static uint32_t _Pow(uint16_t m, uint16_t n) static uint32_t _Pow(uint16_t m, uint16_t n)
@@ -75,7 +75,7 @@
<OPTFL> <OPTFL>
<tvExp>1</tvExp> <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget> <IsCurrentTarget>0</IsCurrentTarget>
</OPTFL> </OPTFL>
<CpuCode>255</CpuCode> <CpuCode>255</CpuCode>
<DebugOpt> <DebugOpt>
@@ -275,7 +275,7 @@
<OPTFL> <OPTFL>
<tvExp>1</tvExp> <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget> <IsCurrentTarget>1</IsCurrentTarget>
</OPTFL> </OPTFL>
<CpuCode>255</CpuCode> <CpuCode>255</CpuCode>
<DebugOpt> <DebugOpt>
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
del *.bak /s
del *.ddk /s
del *.edk /s
del *.lst /s
del *.lnp /s
del *.mpf /s
del *.mpj /s
del *.obj /s
del *.omf /s
::del *.opt /s ::不允许删除JLINK的设置
del *.plg /s
del *.rpt /s
del *.tmp /s
del *.__i /s
del *.crf /s
del *.o /s
del *.d /s
::del *.axf /s
del *.tra /s
del *.dep /s
del JLinkLog.txt /s
del *.iex /s
del *.htm /s
del *.sct /s
del *.map /s
del *.mxproject /s
exit