mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 14:06:31 +01:00
Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2c2963b3b | ||
|
|
a5d7282958 | ||
|
|
f233d90b86 | ||
|
|
739625f1c8 | ||
|
|
b527d3e57d | ||
|
|
ba82ab8628 | ||
|
|
085a642ed2 | ||
|
|
e2870825cf | ||
|
|
a4bdb4acab | ||
|
|
058016d208 | ||
|
|
b14cd3909c | ||
|
|
cd09a53e02 | ||
|
|
6bdf99a8e7 | ||
|
|
1b256c3fba | ||
|
|
ec217a94d0 | ||
|
|
2b99ce7139 | ||
|
|
f6a8fa3d4d | ||
|
|
294ed5bd28 | ||
|
|
92c5d60cf8 | ||
|
|
7ca5461c33 | ||
|
|
aebbb22cde | ||
|
|
14e96c72f7 | ||
|
|
ebd1adc0d5 | ||
|
|
f4cb642142 | ||
|
|
9b2d76a6b6 | ||
|
|
ac979a3c52 | ||
|
|
a606c4c1aa | ||
|
|
c22fe0d91b | ||
|
|
b29907a725 | ||
|
|
8da475901d | ||
|
|
e4ed0b13db | ||
|
|
0ffd0fbf0e | ||
|
|
1cba70b9cc | ||
|
|
6b67f6df2b | ||
|
|
b9fe72de5c | ||
|
|
c458c6b29c | ||
|
|
d3b9abf56a | ||
|
|
d2b17b7a97 | ||
|
|
7e3e73a064 | ||
|
|
9ca9007a1c | ||
|
|
b03ad07179 | ||
|
|
56537e46be | ||
|
|
bc06ea74e8 | ||
|
|
9137c5acb1 | ||
|
|
c0e59dadb4 | ||
|
|
0dd3a8459b | ||
|
|
ebd6b5289c | ||
|
|
65558360ef | ||
|
|
dd69fa029a | ||
|
|
9bbd30b783 | ||
|
|
691b688f46 | ||
|
|
3d125c415f | ||
|
|
f2dc16953d | ||
|
|
f38e121c94 | ||
|
|
f83667bcce | ||
|
|
bee51a23b6 | ||
|
|
a787ac6ddf | ||
|
|
5561f82bf6 | ||
|
|
b07eeb31ce | ||
|
|
57748d825b | ||
|
|
d7f6fee31f | ||
|
|
1cb948e0b6 | ||
|
|
aca1dfc7a3 | ||
|
|
edb874029e | ||
|
|
a1eba95ce2 | ||
|
|
4f1252d839 | ||
|
|
b4836e81f3 | ||
|
|
472f148b0c | ||
|
|
107c85e3cf | ||
|
|
1835b1cda7 | ||
|
|
b71844eac0 | ||
|
|
72c1b7bf40 | ||
|
|
1c7d45865d | ||
|
|
7fd04d1ae3 | ||
|
|
6292e73135 | ||
|
|
8c4627007f | ||
|
|
e563358370 | ||
|
|
c2ab7d6057 | ||
|
|
5e62b2de1b | ||
|
|
62b87da8c2 | ||
|
|
9608c6e417 | ||
|
|
86a68cbba4 | ||
|
|
80298ed4a1 | ||
|
|
d6b1cc0eca | ||
|
|
90284d0a81 | ||
|
|
f88c05b279 | ||
|
|
d435d12c30 | ||
|
|
af3b6c53c8 | ||
|
|
6af250efbf | ||
|
|
83bd0ec177 | ||
|
|
fd13cccdd9 | ||
|
|
abc84e18ff | ||
|
|
4edba16674 | ||
|
|
7703f6ce6c | ||
|
|
f00761db94 | ||
|
|
2655d6d065 | ||
|
|
e734052697 | ||
|
|
f7b13d3dcb | ||
|
|
69a40e47aa | ||
|
|
b737eb60ed | ||
|
|
1d0186fed0 | ||
|
|
d01825a323 | ||
|
|
5abbead90b | ||
|
|
3b294be08a | ||
|
|
59d08ea21e |
23
.github/workflows/build-test.yml
vendored
23
.github/workflows/build-test.yml
vendored
@@ -23,16 +23,11 @@ jobs:
|
||||
- name: Install intelhex
|
||||
run: pip install --upgrade intelhex
|
||||
|
||||
- name: Build NRF firmware
|
||||
run: |
|
||||
cd ARM_Tag_FW/Newton_M3_nRF52811
|
||||
pio run --environment Newton_M3_Universal
|
||||
|
||||
- name: Build Simple_AP
|
||||
run: |
|
||||
cd ESP32_AP-Flasher
|
||||
pio run --environment Simple_AP
|
||||
pio run --target buildfs --environment Simple_AP
|
||||
# - name: Build Simple_AP
|
||||
# run: |
|
||||
# cd ESP32_AP-Flasher
|
||||
# pio run --environment Simple_AP
|
||||
# pio run --target buildfs --environment Simple_AP
|
||||
|
||||
- name: Build OpenEPaperLink_Mini_AP
|
||||
run: |
|
||||
@@ -46,8 +41,14 @@ jobs:
|
||||
pio run --environment OpenEPaperLink_AP_and_Flasher
|
||||
pio run --target buildfs --environment OpenEPaperLink_AP_and_Flasher
|
||||
|
||||
- name: Build ESP32_S3_16_8_YELLOW_AP]
|
||||
- name: Build ESP32_S3_16_8_YELLOW_AP
|
||||
run: |
|
||||
cd ESP32_AP-Flasher
|
||||
pio run --environment ESP32_S3_16_8_YELLOW_AP
|
||||
pio run --target buildfs --environment ESP32_S3_16_8_YELLOW_AP
|
||||
|
||||
- name: OpenEPaperLink_Mini_AP_v4
|
||||
run: |
|
||||
cd ESP32_AP-Flasher
|
||||
pio run --environment OpenEPaperLink_Mini_AP_v4
|
||||
pio run --target buildfs --environment OpenEPaperLink_Mini_AP_v4
|
||||
|
||||
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
@@ -46,24 +46,6 @@ jobs:
|
||||
# cd /home/runner/work/OpenEPaperLink/OpenEPaperLink/ESP32_AP-Flasher
|
||||
# python gzip_wwwfiles.py
|
||||
|
||||
- name: Build firmware for Simple_AP
|
||||
run: |
|
||||
cd ESP32_AP-Flasher
|
||||
export PLATFORMIO_BUILD_FLAGS="-D BUILD_VERSION=${{ github.ref_name }} -D SHA=$GITHUB_SHA"
|
||||
pio run --environment Simple_AP
|
||||
pio run --target buildfs --environment Simple_AP
|
||||
mkdir /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP
|
||||
cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP/boot_app0.bin
|
||||
cp .pio/build/Simple_AP/firmware.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP/firmware.bin
|
||||
cp .pio/build/Simple_AP/bootloader.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP/bootloader.bin
|
||||
cp .pio/build/Simple_AP/partitions.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP/partitions.bin
|
||||
cp .pio/build/Simple_AP/littlefs.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP/littlefs.bin
|
||||
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink/Simple_AP
|
||||
esptool.py --chip esp32 merge_bin -o merged-firmware.bin --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 bootloader.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware.bin 0x290000 littlefs.bin
|
||||
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink
|
||||
cp Simple_AP/firmware.bin espbinaries/Simple_AP.bin
|
||||
cp Simple_AP/merged-firmware.bin espbinaries/Simple_AP_full.bin
|
||||
|
||||
- name: Build firmware for OpenEPaperLink_Mini_AP
|
||||
run: |
|
||||
cd ESP32_AP-Flasher
|
||||
@@ -176,6 +158,24 @@ jobs:
|
||||
cp OpenEPaperLink_PoE_AP/firmware.bin espbinaries/OpenEPaperLink_PoE_AP.bin
|
||||
cp OpenEPaperLink_PoE_AP/merged-firmware.bin espbinaries/OpenEPaperLink_PoE_AP_full.bin
|
||||
|
||||
- name: Build firmware for OpenEPaperLink_Mini_AP_v4
|
||||
run: |
|
||||
cd ESP32_AP-Flasher
|
||||
export PLATFORMIO_BUILD_FLAGS="-D BUILD_VERSION=${{ github.ref_name }} -D SHA=$GITHUB_SHA"
|
||||
pio run --environment OpenEPaperLink_Mini_AP_v4
|
||||
pio run --target buildfs --environment OpenEPaperLink_Mini_AP_v4
|
||||
mkdir /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4
|
||||
cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4/boot_app0.bin
|
||||
cp .pio/build/OpenEPaperLink_Mini_AP_v4/firmware.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4/firmware.bin
|
||||
cp .pio/build/OpenEPaperLink_Mini_AP_v4/bootloader.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4/bootloader.bin
|
||||
cp .pio/build/OpenEPaperLink_Mini_AP_v4/partitions.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4/partitions.bin
|
||||
cp .pio/build/OpenEPaperLink_Mini_AP_v4/littlefs.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4/littlefs.bin
|
||||
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_Mini_AP_v4
|
||||
esptool.py --chip esp32-s3 merge_bin -o merged-firmware.bin --flash_mode dio --flash_freq 80m --flash_size 16MB 0x0000 bootloader.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware.bin 0x00910000 littlefs.bin
|
||||
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink
|
||||
cp OpenEPaperLink_Mini_AP_v4/firmware.bin espbinaries/OpenEPaperLink_Mini_AP_v4.bin
|
||||
cp OpenEPaperLink_Mini_AP_v4/merged-firmware.bin espbinaries/OpenEPaperLink_Mini_AP_v4_full.bin
|
||||
|
||||
- name: generate release json file
|
||||
run: |
|
||||
mkdir jsonfiles
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,3 +26,4 @@
|
||||
sdcc/sdcc
|
||||
|
||||
ESP32_AP-Flasher/.vscode/extensions.json
|
||||
ARM_Tag_FW\Newton_M3_nRF52811\$PROJECT_DIR
|
||||
|
||||
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "ARM_Tag_FW/common/uzlib"]
|
||||
path = ARM_Tag_FW/common/uzlib
|
||||
url = https://github.com/pfalcon/uzlib.git
|
||||
[submodule "ARM_Tag_FW/common/QRCode"]
|
||||
path = ARM_Tag_FW/common/QRCode
|
||||
url = https://github.com/ricmoo/QRCode
|
||||
@@ -1,4 +1,4 @@
|
||||
build
|
||||
*.axf
|
||||
# Allow
|
||||
!*.bin
|
||||
#!*.bin
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
const char font[256][40]={
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
|
||||
{0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x21
|
||||
{0x00,0x00,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x22
|
||||
{0x00,0x00,0x00,0x00,0x00,0x22,0x00,0x22,0x00,0x11,0x00,0x11,0x00,0x11,0xE0,0xFF,0x80,0x08,0x80,0x08,0x80,0x08,0xE0,0x7F,0x40,0x04,0x40,0x04,0x20,0x02,0x20,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x23
|
||||
{0x00,0x00,0x00,0x04,0x00,0x1F,0x80,0x3F,0xC0,0x24,0xC0,0x04,0xC0,0x04,0x80,0x07,0x00,0x07,0x00,0x1C,0x00,0x1C,0x00,0x34,0x00,0x34,0x40,0x34,0xC0,0x1F,0x80,0x0F,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x24
|
||||
{0x00,0x00,0x00,0x00,0xE0,0x81,0x30,0x43,0x30,0x23,0x30,0x13,0x30,0x0B,0x30,0x0B,0xE0,0x05,0x00,0x7A,0x00,0xCD,0x00,0xCD,0x80,0xCC,0x40,0xCC,0x20,0xCC,0x10,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x25
|
||||
{0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x1F,0x80,0x19,0x80,0x19,0x80,0x0D,0x00,0x07,0xC0,0x03,0x60,0xC6,0x30,0xCE,0x30,0xCC,0x30,0x78,0x70,0x78,0xE0,0x7F,0xC0,0xEF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x26
|
||||
{0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x27
|
||||
{0x00,0x00,0x00,0x30,0x00,0x3C,0x00,0x0E,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x0E,0x00,0x3C,0x00,0x30,0x00,0x00}, // 0x28
|
||||
{0x00,0x00,0xC0,0x00,0xC0,0x03,0x00,0x07,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x07,0xC0,0x03,0xC0,0x00,0x00,0x00}, // 0x29
|
||||
{0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x60,0x33,0xE0,0x3C,0x00,0x00,0x80,0x0D,0xC0,0x19,0x80,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2A
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xE0,0x7F,0xE0,0x7F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2B
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x02,0x00,0x03,0x00,0x00}, // 0x2C
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x3F,0xC0,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2E
|
||||
{0x00,0x00,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x00,0x00}, // 0x2F
|
||||
{0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x1F,0xC0,0x30,0xC0,0x30,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x30,0x80,0x1F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x30
|
||||
{0x00,0x00,0x00,0x00,0x00,0x06,0xC0,0x07,0x60,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x31
|
||||
{0x00,0x00,0x00,0x00,0x80,0x0F,0xC0,0x1F,0x40,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0xC0,0x3F,0xC0,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x32
|
||||
{0x00,0x00,0x00,0x00,0x80,0x0F,0xC0,0x3F,0x40,0x30,0x00,0x30,0x00,0x18,0x80,0x0F,0x80,0x0F,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x30,0x40,0x38,0xC0,0x1F,0xC0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x33
|
||||
{0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x1C,0x00,0x1E,0x00,0x1A,0x00,0x19,0x80,0x19,0xC0,0x18,0x40,0x18,0xE0,0x7F,0xE0,0x7F,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x34
|
||||
{0x00,0x00,0x00,0x00,0x80,0x3F,0x80,0x3F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x0F,0x80,0x1F,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x38,0x80,0x1F,0x80,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x35
|
||||
{0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x1F,0xC0,0x11,0xC0,0x00,0x60,0x00,0x60,0x0E,0x60,0x1F,0xE0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0xC0,0x38,0xC0,0x1F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x36
|
||||
{0x00,0x00,0x00,0x00,0xC0,0x7F,0xC0,0x7F,0x00,0x60,0x00,0x30,0x00,0x10,0x00,0x18,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x02,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x37
|
||||
{0x00,0x00,0x00,0x00,0x00,0x0F,0xC0,0x1F,0xC0,0x18,0xC0,0x18,0xC0,0x19,0x80,0x0F,0x00,0x07,0xC0,0x1E,0x60,0x38,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x1F,0x80,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x38
|
||||
{0x00,0x00,0x00,0x00,0x80,0x07,0xC0,0x1F,0xE0,0x18,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x37,0x80,0x33,0x00,0x30,0x00,0x18,0x40,0x1C,0xC0,0x0F,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x39
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3A
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x02,0x00,0x03,0x00,0x00}, // 0x3B
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x70,0x00,0x3C,0x00,0x0E,0x80,0x03,0xE0,0x00,0x80,0x03,0x00,0x0E,0x00,0x3C,0x00,0x70,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3C
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xE0,0x00,0xC0,0x03,0x00,0x07,0x00,0x1C,0x00,0x70,0x00,0x1C,0x00,0x07,0xC0,0x03,0xE0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3E
|
||||
{0x00,0x00,0x00,0x00,0xE0,0x0F,0xE0,0x3F,0x20,0x38,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3F
|
||||
{0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x31,0xC0,0x60,0x60,0x7C,0x30,0x66,0x30,0x63,0x30,0x63,0x30,0x73,0x30,0x73,0x30,0x6F,0x60,0xE6,0x60,0x00,0xC0,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x40
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0F,0x00,0x0F,0x00,0x0D,0x80,0x19,0x80,0x19,0xC0,0x38,0xC0,0x30,0xC0,0x3F,0xE0,0x7F,0x60,0x60,0x60,0x60,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x41
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xE0,0x1F,0x60,0x18,0x60,0x18,0x60,0x0C,0xE0,0x07,0xE0,0x0F,0x60,0x18,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x42
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x80,0x7F,0xC0,0x41,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,0x43,0x80,0x7F,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x43
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xE0,0x1F,0x60,0x38,0x60,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x30,0x60,0x38,0xE0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x44
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x7F,0xC0,0x7F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x3F,0xC0,0x3F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x7F,0xC0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x45
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x7F,0xC0,0x7F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x3F,0xC0,0x3F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x46
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x80,0x7F,0xC0,0x41,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x78,0x60,0x78,0x60,0x60,0xC0,0x60,0xC0,0x61,0x80,0x7F,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x47
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x3F,0xE0,0x3F,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x48
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x1F,0xE0,0x1F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0xE0,0x1F,0xE0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x49
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0x80,0x1F,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x1C,0xC0,0x0F,0xC0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4A
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x70,0x60,0x38,0x60,0x1C,0x60,0x0E,0x60,0x06,0x60,0x03,0xE0,0x03,0x60,0x07,0x60,0x0E,0x60,0x1C,0x60,0x38,0x60,0x70,0x60,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4B
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x7F,0xC0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4C
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x70,0x70,0xF0,0x78,0xB0,0x68,0xB0,0x68,0xB0,0x6D,0x30,0x65,0x30,0x65,0x30,0x67,0x30,0x62,0x30,0x60,0x30,0x60,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x60,0xE0,0x60,0xE0,0x61,0xE0,0x61,0x60,0x63,0x60,0x67,0x60,0x66,0x60,0x6E,0x60,0x6C,0x60,0x78,0x60,0x78,0x60,0x70,0x60,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4E
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0F,0xC0,0x1F,0xE0,0x38,0x70,0x70,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x70,0x70,0xE0,0x38,0xC0,0x1F,0x80,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4F
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xC0,0x3F,0xC0,0x70,0xC0,0x60,0xC0,0x60,0xC0,0x70,0xC0,0x3F,0xC0,0x0F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x50
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0F,0xC0,0x1F,0xE0,0x38,0x70,0x70,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x60,0x30,0xE0,0x38,0xC0,0x1F,0x80,0x0F,0x00,0x38,0x00,0xF0,0x00,0x40,0x00,0x00}, // 0x51
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xE0,0x1F,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0x1C,0xE0,0x0F,0xE0,0x07,0x60,0x0E,0x60,0x1C,0x60,0x38,0x60,0x70,0x60,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x52
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0F,0xC0,0x1F,0x60,0x10,0x60,0x00,0xE0,0x00,0xC0,0x03,0x80,0x0F,0x00,0x3C,0x00,0x30,0x00,0x30,0x60,0x38,0xE0,0x1F,0xC0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x53
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0xF0,0xFF,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x54
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x1F,0x80,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x55
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xC0,0x60,0x60,0x60,0x60,0xE0,0x60,0xC0,0x30,0xC0,0x30,0xC0,0x31,0x80,0x19,0x80,0x1B,0x00,0x0B,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x56
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xC0,0x30,0xC0,0x30,0xC0,0x20,0x46,0x20,0x46,0x20,0x6E,0x60,0x6F,0x60,0x69,0x60,0x69,0x60,0x39,0xC0,0x39,0xC0,0x39,0xC0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x57
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xE0,0xE0,0x60,0xC0,0x30,0x80,0x19,0x80,0x0F,0x00,0x0F,0x00,0x06,0x00,0x0F,0x80,0x1D,0x80,0x19,0xC0,0x30,0x60,0x70,0x30,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x58
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xC0,0x60,0x60,0xC0,0x30,0xC0,0x31,0x80,0x19,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x59
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x5A
|
||||
{0x00,0x00,0x00,0x3F,0x00,0x3F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x3F,0x00,0x3F,0x00,0x00}, // 0x5B
|
||||
{0x00,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x00}, // 0x5C
|
||||
{0x00,0x00,0xC0,0x0F,0xC0,0x0F,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0xC0,0x0F,0xC0,0x0F,0x00,0x00}, // 0x5D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x0E,0x00,0x0A,0x00,0x0B,0x00,0x1B,0x80,0x11,0x80,0x31,0xC0,0x30,0xC0,0x20,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x5E
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0xF0,0xFF,0x00,0x00,0x00,0x00}, // 0x5F
|
||||
{0x00,0x06,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x60
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0xC0,0x3F,0x40,0x30,0x00,0x30,0x00,0x30,0x80,0x3F,0xC0,0x30,0x60,0x30,0x60,0x38,0xE0,0xFF,0xC0,0xE7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x61
|
||||
{0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x0E,0x60,0x1F,0xE0,0x39,0xE0,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x18,0xE0,0x1F,0x60,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x62
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xC0,0x3F,0xC0,0x21,0xE0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xC0,0x01,0xC0,0x3F,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x63
|
||||
{0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x80,0x37,0xC0,0x3F,0xC0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x3F,0x80,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x64
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xC0,0x1F,0xC0,0x38,0x60,0x30,0xE0,0x3F,0xE0,0x3F,0x60,0x00,0x60,0x00,0xC0,0x20,0xC0,0x3F,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x65
|
||||
{0x00,0x00,0x00,0x7E,0x00,0x7F,0x00,0x03,0x00,0x03,0xE0,0x7F,0xE0,0x7F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x66
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x37,0xC0,0x3F,0xC0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x3F,0x80,0x37,0x00,0x30,0x40,0x38,0xC0,0x1F,0x80,0x0F}, // 0x67
|
||||
{0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x1E,0x60,0x3F,0xE0,0x31,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x68
|
||||
{0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0xC0,0x0F,0xC0,0x0F,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x69
|
||||
{0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x80,0x1F,0x80,0x1F,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x1C,0xC0,0x0F,0xC0,0x07}, // 0x6A
|
||||
{0x00,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x70,0xC0,0x38,0xC0,0x1C,0xC0,0x0E,0xC0,0x06,0xC0,0x07,0xC0,0x0E,0xC0,0x1C,0xC0,0x38,0xC0,0x70,0xC0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6B
|
||||
{0x00,0x00,0xC0,0x0F,0xC0,0x0F,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6C
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0x39,0xF0,0x7F,0x70,0x67,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x1E,0x60,0x3F,0xE0,0x31,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6E
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xC0,0x3F,0xC0,0x30,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x3F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6F
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0F,0xE0,0x1F,0xE0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x18,0xE0,0x1F,0x60,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00}, // 0x70
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x37,0xC0,0x3F,0xC0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0xE0,0x38,0xC0,0x37,0x80,0x33,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30}, // 0x71
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x3C,0xC0,0x3E,0xC0,0x23,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x72
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0xC0,0x1F,0xC0,0x00,0xC0,0x00,0xC0,0x03,0x00,0x1F,0x00,0x38,0x00,0x30,0x40,0x30,0xC0,0x1F,0x80,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x73
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0xE0,0x7F,0xE0,0x7F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x7F,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x74
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x3C,0xE0,0x37,0xC0,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x75
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0xC0,0x20,0xC0,0x30,0xC0,0x30,0x80,0x11,0x80,0x19,0x80,0x19,0x00,0x0B,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x76
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xC0,0x30,0xC6,0x30,0xC6,0x20,0x4E,0x60,0x4F,0x60,0x49,0x60,0x69,0x60,0x79,0xC0,0x39,0xC0,0x30,0xC0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x77
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x70,0xC0,0x30,0x80,0x19,0x80,0x0B,0x00,0x0F,0x00,0x06,0x00,0x0F,0x80,0x1D,0x80,0x19,0xC0,0x30,0x60,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x78
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0xC0,0x20,0xC0,0x30,0xC0,0x31,0x80,0x19,0x80,0x19,0x00,0x0B,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x02,0x00,0x03,0xC0,0x03,0xC0,0x01}, // 0x79
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x3F,0xE0,0x3F,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x3F,0xE0,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x7A
|
||||
{0x00,0x00,0x00,0x3C,0x00,0x3E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xC0,0x03,0xC0,0x03,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x3E,0x00,0x3C,0x00,0x00}, // 0x7B
|
||||
{0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00}, // 0x7C
|
||||
{0x00,0x00,0xC0,0x03,0xC0,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x3C,0x00,0x3C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xC0,0x07,0xC0,0x03,0x00,0x00}, // 0x7D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x43,0xE0,0x7F,0x20,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x7E
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x3F,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0xC0,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0x7F
|
||||
};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,19 +3,23 @@ MZ_FLASHER=python ../88MZ100_Flasher/88MZ100_Uart_flasher.py
|
||||
|
||||
ARMGCC=/usr/bin/
|
||||
CC=$(ARMGCC)arm-none-eabi-gcc
|
||||
GPLUSPLUS=$(ARMGCC)arm-none-eabi-g++
|
||||
AS=$(ARMGCC)arm-none-eabi-as
|
||||
OBJCOPY=$(ARMGCC)arm-none-eabi-objcopy
|
||||
|
||||
#-Wall
|
||||
#-Wall
|
||||
CC_WARNING_FLAGS=-Wall -Wformat=0 -Wattributes -Wstrict-aliasing=0
|
||||
CC_FlAGS=-mcpu=cortex-m3 -g -O0 -mthumb -fdata-sections -ffunction-sections -std=c99
|
||||
CC_END_FLAGS=-lc -lnosys -L. -T mz100.ld -fPIE --specs=nosys.specs -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -O0 -flto -ffunction-sections -fdata-sections -DARM_GNU
|
||||
CPP_FLAGS=-lstdc++ -mcpu=cortex-m3 -g -O3 -mthumb -fdata-sections -ffunction-sections -std=c++98 -std=gnu++0x
|
||||
CPP0_FLAGS=-lstdc++ -mcpu=cortex-m3 -g -O0 -mthumb -fdata-sections -ffunction-sections -std=c++98 -std=gnu++0x
|
||||
CC_FLAGS=-mcpu=cortex-m3 -g -O0 -mthumb -fdata-sections -ffunction-sections -std=c99
|
||||
CC3_FLAGS=-mcpu=cortex-m3 -g -O3 -mthumb -fdata-sections -ffunction-sections -std=c99
|
||||
CC_END_FLAGS=-lstdc++ -lc -lnosys -L. -T mz100/mz100.ld -fPIE --specs=nosys.specs -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -O0 -flto -ffunction-sections -fdata-sections -DARM_GNU
|
||||
|
||||
C_SOURCES :=$(wildcard *.c)
|
||||
C_EXECUTABLE :=$(C_SOURCES:.c=)
|
||||
|
||||
COMPORT = COM12
|
||||
|
||||
|
||||
|
||||
build: compile
|
||||
only: clean compile create_ota_img
|
||||
@@ -27,44 +31,84 @@ uart: clean compile flash_uart
|
||||
|
||||
|
||||
compile:
|
||||
@mkdir -p build
|
||||
@$(AS) -mcpu=cortex-m3 --gdwarf-2 -mthumb-interwork -o build/startup.o startup.S
|
||||
# @mkdir -p build
|
||||
@$(AS) -mcpu=cortex-m3 --gdwarf-2 -mthumb-interwork -o build/startup.o startup.S
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/core_cm3.c -o build/core_cm3.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_ssp.c -o build/mz100_ssp.o
|
||||
@$(CC) $(CC_FLAGS) -c mz100/mz100_wdt.c -o build/mz100_wdt.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_gpio.c -o build/mz100_gpio.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_driver.c -o build/mz100_driver.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_adc.c -o build/mz100_adc.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_flash.c -o build/mz100_flash.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_clock.c -o build/mz100_clock.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_rtc.c -o build/mz100_rtc.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_pinmux.c -o build/mz100_pinmux.o
|
||||
@$(CC) $(CC_FLAGS) -c mz100/mz100_pmu.c -o build/mz100_pmu.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_qspi.c -o build/mz100_qspi.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_aes.c -o build/mz100_aes.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_gpt.c -o build/mz100_gpt.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_sleep.c -o build/mz100_sleep.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_uart.c -o build/mz100_uart.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/mz100_aon_ram.c -o build/mz100_aon_ram.o
|
||||
@$(CC) $(CC3_FLAGS) -c mz100/printf.c -o build/printf.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c zigbee.c -o build/zigbee.o
|
||||
# @$(CC) $(CC_FLAGS) $(CC_WARNING_FLAGS) -c ccm.c -o build/ccm.o
|
||||
|
||||
@$(CC) $(CC_FlAGS) -c core_cm3.c -o build/core_cm3.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_ssp.c -o build/mz100_ssp.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_wdt.c -o build/mz100_wdt.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_gpio.c -o build/mz100_gpio.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_driver.c -o build/mz100_driver.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_adc.c -o build/mz100_adc.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_flash.c -o build/mz100_flash.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_clock.c -o build/mz100_clock.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_rtc.c -o build/mz100_rtc.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_pinmux.c -o build/mz100_pinmux.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_pmu.c -o build/mz100_pmu.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_qspi.c -o build/mz100_qspi.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_aes.c -o build/mz100_aes.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_gpt.c -o build/mz100_gpt.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_sleep.c -o build/mz100_sleep.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_uart.c -o build/mz100_uart.o
|
||||
@$(CC) $(CC_FlAGS) -c mz100_aon_ram.c -o build/mz100_aon_ram.o
|
||||
@$(CC) $(CC_FlAGS) -c printf.c -o build/printf.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c zigbee.c -o build/zigbee.o
|
||||
# @$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c ccm.c -o build/ccm.o
|
||||
# @$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c chars.c -o build/chars.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c drawing.c -o build/drawing.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c powermgt.c -o build/powermgt.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c syncedproto.c -o build/syncedproto.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c comms.c -o build/comms.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c settings.c -o build/settings.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c timer.c -o build/timer.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c util.c -o build/util.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c gpio.c -o build/gpio.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c epd.c -o build/epd.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c userinterface.c -o build/userinterface.o
|
||||
@$(CC) $(CC_FlAGS) $(CC_WARNING_FLAGS) -c main.c -o build/main.o
|
||||
@$(CC) $(CC_END_FLAGS) $(CC_WARNING_FLAGS) build/main.o build/userinterface.o build/printf.o build/mz100_aon_ram.o build/zigbee.o build/drawing.o build/powermgt.o build/syncedproto.o build/comms.o build/settings.o build/timer.o build/util.o build/gpio.o build/epd.o build/mz100_sleep.o build/core_cm3.o build/mz100_ssp.o build/mz100_wdt.o build/mz100_gpio.o build/mz100_driver.o build/mz100_adc.o build/mz100_flash.o build/mz100_clock.o build/mz100_rtc.o build/mz100_pinmux.o build/mz100_pmu.o build/mz100_qspi.o build/mz100_aes.o build/mz100_gpt.o build/mz100_uart.o build/startup.o -o main.axf
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/adler32.c -o build/uz-adler32.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/crc32.c -o build/uz-crc32.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/defl_static.c -o build/uz-defl_static.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/genlz77.c -o build/uz-genlz77.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/tinfgzip.c -o build/uz-tinfgzip.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/tinflate.c -o build/uz-tinflate.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/uzlib/src/tinfzlib.c -o build/uz-tinfzlib.o
|
||||
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -Wno-unknown-pragmas -c ../common/QRCode/src/qrcode.c -o build/qrcode.o
|
||||
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c compression.cpp -o build/compression.o
|
||||
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c drawing.cpp -o build/drawing.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c epd_interface.cpp -o build/epd_interface.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c powermgt.cpp -o build/powermgt.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLASGS) -c oepl-protocol.cpp -o build/oepl-protocol.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c comms.c -o build/comms.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c ../common/md5.c -o build/md5.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c settings.cpp -o build/settings.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c mz100/timer.c -o build/timer.o
|
||||
@$(CC) $(CC3_FLAGS) $(CC_WARNING_FLAGS) -c mz100/util.c -o build/util.o
|
||||
@$(CC) $(CC_FLAGS) $(CC_WARNING_FLAGS) -c mz100/gpio.c -o build/gpio.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c uc8159-var-m2.cpp -o build/uc8159-var-m2.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c uc8176-var-m2.cpp -o build/uc8176-var-m2.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c userinterface.cpp -o build/userinterface.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c main.cpp -o build/main.o
|
||||
@$(GPLUSPLUS) $(CPP_FLAGS) $(CC_WARNING_FLAGS) -c oepl_fs.cpp -o build/oepl_fs.o
|
||||
@$(GPLUSPLUS) $(CC_END_FLAGS) $(CC_WARNING_FLAGS) \
|
||||
build/main.o \
|
||||
build/epd_interface.o \
|
||||
build/oepl_fs.o\
|
||||
build/userinterface.o \
|
||||
build/printf.o \
|
||||
build/mz100_aon_ram.o \
|
||||
build/zigbee.o \
|
||||
build/compression.o \
|
||||
build/drawing.o \
|
||||
build/powermgt.o \
|
||||
build/oepl-protocol.o \
|
||||
build/comms.o \
|
||||
build/settings.o \
|
||||
build/timer.o \
|
||||
build/util.o \
|
||||
build/md5.o \
|
||||
build/gpio.o \
|
||||
build/uc8176-var-m2.o \
|
||||
build/uc8159-var-m2.o \
|
||||
build/mz100_sleep.o \
|
||||
build/core_cm3.o \
|
||||
build/qrcode.o \
|
||||
build/uz-adler32.o build/uz-crc32.o build/uz-defl_static.o build/uz-genlz77.o build/uz-tinfgzip.o build/uz-tinflate.o build/uz-tinfzlib.o \
|
||||
build/mz100_ssp.o build/mz100_wdt.o build/mz100_gpio.o build/mz100_driver.o build/mz100_adc.o build/mz100_flash.o build/mz100_clock.o build/mz100_rtc.o build/mz100_pinmux.o build/mz100_pmu.o build/mz100_qspi.o build/mz100_aes.o build/mz100_gpt.o build/mz100_uart.o \
|
||||
build/startup.o -o main.axf
|
||||
@$(OBJCOPY) -v -O binary main.axf main.bin
|
||||
|
||||
@cat build/fs.img >> main.bin
|
||||
clean:
|
||||
@rm -rf build/*
|
||||
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
#ifndef _BITMAPS_H_
|
||||
#define _BITMAPS_H_
|
||||
|
||||
// images generated by https://lvgl.io/tools/imageconverter, prepended with width, height. "CF_INDEXED_1_BIT"-mode, little-endian
|
||||
#include <stdint.h>
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
const uint8_t norf[] = {
|
||||
24,
|
||||
24,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x70,
|
||||
0xe0,
|
||||
0x00,
|
||||
0x79,
|
||||
0xe0,
|
||||
0x00,
|
||||
0x7f,
|
||||
0xe0,
|
||||
0x00,
|
||||
0x3f,
|
||||
0xc0,
|
||||
0x00,
|
||||
0x1f,
|
||||
0x80,
|
||||
0x00,
|
||||
0x1f,
|
||||
0x80,
|
||||
0x00,
|
||||
0x3f,
|
||||
0xc0,
|
||||
0x00,
|
||||
0x7f,
|
||||
0xe0,
|
||||
0x0e,
|
||||
0x79,
|
||||
0xe0,
|
||||
0x0a,
|
||||
0x70,
|
||||
0xe0,
|
||||
0x0a,
|
||||
0x00,
|
||||
0x00,
|
||||
0xea,
|
||||
0x00,
|
||||
0x00,
|
||||
0xaa,
|
||||
0x00,
|
||||
0x00,
|
||||
0xaa,
|
||||
0x00,
|
||||
0x0e,
|
||||
0xaa,
|
||||
0x00,
|
||||
0x0a,
|
||||
0xaa,
|
||||
0x00,
|
||||
0x0a,
|
||||
0xaa,
|
||||
0x00,
|
||||
0xea,
|
||||
0xaa,
|
||||
0x00,
|
||||
0xaa,
|
||||
0xaa,
|
||||
0x00,
|
||||
0xaa,
|
||||
0xaa,
|
||||
0x0e,
|
||||
0xaa,
|
||||
0xaa,
|
||||
0x0a,
|
||||
0xaa,
|
||||
0xaa,
|
||||
0x0e,
|
||||
0xee,
|
||||
0xee,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
static const uint8_t batlow[] = {
|
||||
24,17,
|
||||
0x00, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xf8,
|
||||
0x40, 0x00, 0x08,
|
||||
0x40, 0x00, 0x08,
|
||||
0x40, 0x00, 0x0e,
|
||||
0x40, 0x00, 0x0a,
|
||||
0x48, 0x00, 0x0a,
|
||||
0x48, 0x00, 0x0a,
|
||||
0x48, 0x64, 0x4a,
|
||||
0x48, 0x94, 0x4a,
|
||||
0x48, 0x95, 0x4a,
|
||||
0x4e, 0x62, 0x8a,
|
||||
0x40, 0x00, 0x0e,
|
||||
0x40, 0x00, 0x08,
|
||||
0x40, 0x00, 0x08,
|
||||
0x7f, 0xff, 0xf8,
|
||||
0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include "proto.h"
|
||||
#include "main.h"
|
||||
#include "gpio.h"
|
||||
#include "mz100/gpio.h"
|
||||
|
||||
#define eepromByte spiByte
|
||||
#define eepromPrvSelect() do { /*digitalWrite(FLASH_CS,LOW);*/ } while(0)
|
||||
|
||||
@@ -18,12 +18,12 @@ int8_t commsGetLastPacketRSSI(void) {
|
||||
return mLastRSSI;
|
||||
}
|
||||
|
||||
static inline void __attribute__((always_inline)) macCopy(uint8_t *restrict dst, const uint8_t *restrict src) {
|
||||
static inline void __attribute__((always_inline)) macCopy(uint8_t* dst, const uint8_t* src) {
|
||||
((uint32_t *)dst)[0] = ((const uint32_t *)src)[0];
|
||||
((uint32_t *)dst)[1] = ((const uint32_t *)src)[1];
|
||||
}
|
||||
|
||||
static inline bool __attribute__((always_inline)) macIsEq(const uint8_t *restrict dst, const uint8_t *restrict src) {
|
||||
static inline bool __attribute__((always_inline)) macIsEq(const uint8_t* dst, const uint8_t* src) {
|
||||
return ((uint32_t *)dst)[0] == ((const uint32_t *)src)[0] && ((uint32_t *)dst)[1] == ((const uint32_t *)src)[1];
|
||||
}
|
||||
|
||||
|
||||
38
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/compression.cpp
Normal file
38
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/compression.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "drawing.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
#include "epd_interface.h"
|
||||
|
||||
#include "mz100/printf.h"
|
||||
|
||||
#include "mz100/eeprom.h"
|
||||
|
||||
#include "oepl_fs.h"
|
||||
|
||||
#include "compression.h"
|
||||
|
||||
#include "../../oepl-definitions.h"
|
||||
#include "../../oepl-proto.h"
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
extern "C" {
|
||||
extern void dump(const uint8_t *a, const uint16_t l);
|
||||
#include "mz100/util.h"
|
||||
#include "mz100/mz100_flash.h"
|
||||
#include "../common/uzlib/src/uzlib.h"
|
||||
}
|
||||
|
||||
#define MAX_WINDOW_SIZE 8192
|
||||
#define ZLIB_CACHE_SIZE 512
|
||||
|
||||
uint32_t __attribute__((always_inline)) inline HAL_flashRead(uint32_t address, uint8_t *buffer, uint32_t num){
|
||||
return FLASH_Read(FLASH_FAST_READ_QUAD_OUT, address, buffer, num);
|
||||
}
|
||||
|
||||
#include "../common/compression.cpp"
|
||||
9
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/compression.h
Normal file
9
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/compression.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#define ENABLE_OEPLFS
|
||||
|
||||
#ifdef ENABLE_OEPLFS
|
||||
#include "oepl_fs.h"
|
||||
#endif
|
||||
|
||||
#include "../common/compression.h"
|
||||
@@ -1,68 +0,0 @@
|
||||
#include "drawing.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "eeprom.h"
|
||||
#include "epd.h"
|
||||
#include "printf.h"
|
||||
#include "proto.h"
|
||||
#include "screen.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
|
||||
struct BitmapClutEntry {
|
||||
uint8_t b, g, r, x;
|
||||
};
|
||||
|
||||
uint8_t mPassNo = 0;
|
||||
|
||||
static uint8_t mClutMap[256];
|
||||
static uint8_t mClutMapRed[256];
|
||||
|
||||
void drawImageAtAddress(uint32_t addr, uint8_t lut) {
|
||||
struct EepromImageHeader *eih = (struct EepromImageHeader *)mClutMap;
|
||||
eepromRead(addr, mClutMap, sizeof(struct EepromImageHeader));
|
||||
switch (eih->dataType) {
|
||||
case DATATYPE_IMG_RAW_1BPP:
|
||||
printf("Doing raw 1bpp\n");
|
||||
|
||||
init_epd();
|
||||
display_send_start(1);
|
||||
for (uint32_t c = 0; c < (SCREEN_HEIGHT * (SCREEN_WIDTH / 8)); c++) {
|
||||
if (c % 256 == 0) {
|
||||
eepromRead(addr + sizeof(struct EepromImageHeader) + c, mClutMap, 256);
|
||||
}
|
||||
|
||||
uint8_t curr_byte = mClutMap[c % 256]; // this one holds 8 pixel, we will translate them to 4 sendings
|
||||
|
||||
interleaveColor(curr_byte, 0x00);
|
||||
}
|
||||
display_send_stop();
|
||||
epd_refresh_and_sleep(lut);
|
||||
break;
|
||||
case DATATYPE_IMG_RAW_2BPP:
|
||||
printf("Doing raw 2bpp\n");
|
||||
init_epd();
|
||||
display_send_start(1);
|
||||
for (uint32_t c = 0; c < (SCREEN_HEIGHT * (SCREEN_WIDTH / 8)); c++) {
|
||||
if (c % 256 == 0) {
|
||||
eepromRead(addr + sizeof(struct EepromImageHeader) + c, mClutMap, 256);
|
||||
eepromRead(addr + sizeof(struct EepromImageHeader) + (SCREEN_HEIGHT * (SCREEN_WIDTH / 8)) + c, mClutMapRed, 256);
|
||||
}
|
||||
|
||||
uint8_t curr_byte = mClutMap[c % 256]; // this one holds 8 pixel, we will translate them to 4 sendings
|
||||
uint8_t curr_byteRed = mClutMapRed[c % 256]; // this one holds 8 pixel, we will translate them to 4 sendings
|
||||
|
||||
interleaveColor(curr_byte, curr_byteRed);
|
||||
}
|
||||
display_send_stop();
|
||||
epd_refresh_and_sleep(lut);
|
||||
break;
|
||||
default: // prevent drawing from an unknown file image type
|
||||
printf("Image with type 0x%02X was requested, but we don't know what to do with that currently...\n", eih->dataType);
|
||||
return;
|
||||
}
|
||||
// addOverlay();
|
||||
// drawWithSleep();
|
||||
}
|
||||
40
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/drawing.cpp
Normal file
40
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/drawing.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
// #pragma pack(1)
|
||||
|
||||
#include "drawing.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "epd_interface.h"
|
||||
|
||||
#include "mz100/printf.h"
|
||||
|
||||
#include "mz100/eeprom.h"
|
||||
|
||||
#include "compression.h"
|
||||
#include "oepl_fs.h"
|
||||
|
||||
#include "../common/QRCode/src/qrcode.h"
|
||||
|
||||
#include "../../oepl-definitions.h"
|
||||
#include "../../oepl-proto.h"
|
||||
|
||||
extern "C" {
|
||||
extern void dump(const uint8_t *a, const uint16_t l);
|
||||
#include "mz100/util.h"
|
||||
#include "mz100/mz100_flash.h"
|
||||
#include "../common/QRCode/src/qrcode.h"
|
||||
|
||||
}
|
||||
|
||||
#include "userinterface.h"
|
||||
|
||||
#include "epd_interface.h"
|
||||
|
||||
uint32_t __attribute__((always_inline)) inline HAL_flashRead(uint32_t address, uint8_t *buffer, uint32_t num){
|
||||
return FLASH_Read(FLASH_FAST_READ_QUAD_OUT, address, buffer, num);
|
||||
}
|
||||
|
||||
#include "../common/drawing.cpp"
|
||||
@@ -2,12 +2,13 @@
|
||||
#define _DRAWING_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define DRAWING_MIN_BITMAP_SIZE (128) //minimum size we'll consider
|
||||
|
||||
void set_offline(bool state);
|
||||
void drawImageAtAddress(uint32_t addr, uint8_t lut);
|
||||
void drawImageFromBuffer(uint8_t* buffer, const uint8_t lut);
|
||||
#define ENABLE_OEPLFS
|
||||
|
||||
#ifdef ENABLE_OEPLFS
|
||||
#include "oepl_fs.h"
|
||||
#endif
|
||||
|
||||
#include "../common/drawing.h"
|
||||
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
#ifndef _EEPROM_H_
|
||||
#define _EEPROM_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define EEPROM_WRITE_PAGE_SZ 256 //max write size & alignment
|
||||
#define EEPROM_ERZ_SECTOR_SZ 4096 //erase size and alignment
|
||||
//pages are 4K in size
|
||||
//an update can be stored in any 2 image slots
|
||||
|
||||
#define EEPROM_PAGE_SIZE (0x01000UL)
|
||||
|
||||
#define EEPROM_OS_START (0x00000UL)
|
||||
#define EEPROM_OS_LEN (0x13FFFUL) //0xE820 of image, rounded up to 4K
|
||||
|
||||
#define EEPROM_IMG_START (0x17000UL)
|
||||
#define EEPROM_IMG_EACH (0x1F000UL)
|
||||
#define EEPROM_IMG_LEN (EEPROM_IMG_START + 0x13FFFUL)
|
||||
|
||||
#define EEPROM_UPDATE_START (0x17000UL) //same header as images
|
||||
#define EEPROM_UPDATE_LEN (0x13FFFUL)
|
||||
|
||||
#define EEPROM_SETTINGS_AREA_START (0x14000UL)
|
||||
#define EEPROM_SETTINGS_AREA_LEN (0x03000UL)
|
||||
|
||||
#define EEPROM_MAC_INFO_START (0x6c000UL) //not same as stock
|
||||
#define EEPROM_MAC_INFO_LEN (0x01000UL)
|
||||
|
||||
|
||||
#define EEPROM_IMG_INPROGRESS (0x7fffffff)
|
||||
#define EEPROM_IMG_VALID (0x494d4721)
|
||||
|
||||
|
||||
//#define EEPROM_PIECE_SZ (88)
|
||||
|
||||
struct EepromImageHeader { //each image space is 0x17000 bytes, we have space for ten of them
|
||||
uint64_t version;
|
||||
uint32_t validMarker;
|
||||
uint32_t size;
|
||||
uint8_t dataType;
|
||||
uint32_t id;
|
||||
|
||||
//image data here
|
||||
//we pre-erase so progress can be calculated by finding the first non-0xff byte
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,818 +0,0 @@
|
||||
#include "epd.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
// #include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "12x20_horizontal_LSB_1.h"
|
||||
#include "core_cm3.h"
|
||||
#include "gpio.h"
|
||||
#include "main.h"
|
||||
#include "mz100_clock.h"
|
||||
#include "mz100_gpio.h"
|
||||
#include "mz100_pinmux.h"
|
||||
#include "mz100_ssp.h"
|
||||
#include "mz100_wdt.h"
|
||||
#include "printf.h"
|
||||
#include "stdarg.h"
|
||||
#include "util.h"
|
||||
|
||||
#define EPD_PANEL_SETTING 0x00
|
||||
#define EPD_POWER_SETTING 0x01
|
||||
#define EPD_POWER_OFF 0x02
|
||||
#define EPD_POWER_OFF_SEQUENCE 0x03
|
||||
#define EPD_POWER_ON 0x04
|
||||
#define EPD_BOOSTER_SOFT_START 0x06
|
||||
#define EPD_DEEP_SLEEP 0x07
|
||||
#define EPD_START_DATA 0x10
|
||||
#define EPD_DATA_STOP 0x11
|
||||
#define EPD_REFRESH 0x12
|
||||
#define EPD_IMAGE_PROCESS 0x13
|
||||
#define EPD_LUT_VCOM 0x20
|
||||
#define EPD_LUT_B 0x21
|
||||
#define EPD_LUT_W 0x22
|
||||
#define EPD_LUT_G1 0x23
|
||||
#define EPD_LUT_G2 0x24
|
||||
#define EPD_LUT_R0 0x25
|
||||
#define EPD_LUT_R1 0x26
|
||||
#define EPD_LUT_R2 0x27
|
||||
#define EPD_LUT_R3 0x28
|
||||
#define EPD_LUT_XON 0x29
|
||||
#define EPD_PLL_CONTROL 0x30
|
||||
#define EPD_TEMP_CALIB 0x40
|
||||
#define EPD_TEMP_SELECT 0x41
|
||||
#define EPD_TEMP_WRITE 0x42
|
||||
#define EPD_TEMP_READ 0x43
|
||||
#define EPD_VCOM_DATA_INTERVAL 0x50
|
||||
#define EPD_LPD 0x51
|
||||
#define EPD_TCON_SET 0x60
|
||||
#define EPD_TRES 0x61
|
||||
#define EPD_SPI_FLASH_CONTROL 0x65
|
||||
#define EPD_REVISION 0x70
|
||||
#define EPD_GET_STATUS 0x71
|
||||
#define EPD_AUTOMEASURE_VCOM 0x80
|
||||
#define EPD_READ_VCOM 0x81
|
||||
#define EPD_VCOM_DC_SET 0x82
|
||||
#define EPD_SET_WINDOW 0x90
|
||||
|
||||
#define EPD_WAKE_EEPROM 0xAB
|
||||
#define EPD_EEPROM_SLEEP 0xB9
|
||||
#define EPD_UNKNOWN_1 0xE5
|
||||
|
||||
static uint8_t EPDtempBracket = 0;
|
||||
|
||||
#define CHAR_WIDTH_BYTES 2
|
||||
#define CHAR_HEIGHT 20
|
||||
#define CHAR_WIDTH 12
|
||||
#define SCREEN_WIDTH 640
|
||||
|
||||
uint8_t buffer[CHAR_HEIGHT][640 / 8];
|
||||
uint8_t charbuffer[CHAR_HEIGHT][CHAR_WIDTH_BYTES + 1];
|
||||
|
||||
#define CHAR_SPACING 1
|
||||
#define EMPTY_SPACING 3
|
||||
|
||||
struct epd_colorlutpart {
|
||||
uint8_t repeat;
|
||||
uint8_t lvl0 : 4;
|
||||
uint8_t lvl1 : 4;
|
||||
uint8_t lvl2 : 4;
|
||||
uint8_t lvl3 : 4;
|
||||
uint8_t lvl4 : 4;
|
||||
uint8_t lvl5 : 4;
|
||||
uint8_t lvl6 : 4;
|
||||
uint8_t lvl7 : 4;
|
||||
uint8_t length[8];
|
||||
} __packed;
|
||||
|
||||
struct epd_colorlut {
|
||||
struct epd_colorlutpart part[20];
|
||||
} __packed;
|
||||
|
||||
struct epd_vcomlutpart {
|
||||
uint8_t repeat;
|
||||
uint8_t lvl0 : 2;
|
||||
uint8_t lvl1 : 2;
|
||||
uint8_t lvl2 : 2;
|
||||
uint8_t lvl3 : 2;
|
||||
uint8_t lvl4 : 2;
|
||||
uint8_t lvl5 : 2;
|
||||
uint8_t lvl6 : 2;
|
||||
uint8_t lvl7 : 2;
|
||||
uint8_t length[8];
|
||||
} __packed;
|
||||
|
||||
struct epd_vcomlut {
|
||||
struct epd_vcomlutpart part[20];
|
||||
} __packed;
|
||||
|
||||
struct epd_xonlutpart {
|
||||
uint8_t repeat;
|
||||
uint8_t lvl0 : 1;
|
||||
uint8_t lvl1 : 1;
|
||||
uint8_t lvl2 : 1;
|
||||
uint8_t lvl3 : 1;
|
||||
uint8_t lvl4 : 1;
|
||||
uint8_t lvl5 : 1;
|
||||
uint8_t lvl6 : 1;
|
||||
uint8_t lvl7 : 1;
|
||||
uint8_t length[8];
|
||||
} __packed;
|
||||
|
||||
struct epd_xonlut {
|
||||
struct epd_xonlutpart part[20];
|
||||
} __packed;
|
||||
|
||||
void interleaveBW(uint8_t b) {
|
||||
b ^= 0xFF;
|
||||
uint8_t b_out = 0;
|
||||
for (uint8_t shift = 0; shift < 4; shift++) {
|
||||
b_out = 0;
|
||||
if ((b >> 2 * shift) & 0x01) b_out |= 0x30; // 0x30
|
||||
if ((b >> 2 * shift) & 0x02) b_out |= 0x03; // 0x03
|
||||
display_tx_byte(b_out);
|
||||
}
|
||||
}
|
||||
|
||||
void interleaveColor(uint8_t b, uint8_t r) {
|
||||
b ^= 0xFF;
|
||||
uint8_t b_out = 0;
|
||||
for (int8_t shift = 3; shift >= 0; shift--) {
|
||||
b_out = 0;
|
||||
if (((b >> 2 * shift) & 0x01) && ((r >> 2 * shift) & 0x01)) {
|
||||
b_out |= 0x04; // 0x30
|
||||
} else if ((b >> 2 * shift) & 0x01) {
|
||||
b_out |= 0x03; // 0x30
|
||||
} else if ((r >> 2 * shift) & 0x01) { // 4 or 5
|
||||
b_out |= 0x04; // 0x30
|
||||
} else {
|
||||
}
|
||||
|
||||
if (((b >> 2 * shift) & 0x02) && ((r >> 2 * shift) & 0x02)) {
|
||||
b_out |= 0x40; // 0x30
|
||||
} else if ((b >> 2 * shift) & 0x02) {
|
||||
b_out |= 0x30; // 0x30
|
||||
} else if ((r >> 2 * shift) & 0x02) {
|
||||
b_out |= 0x40; // 0x30
|
||||
} else {
|
||||
}
|
||||
display_tx_byte(b_out);
|
||||
}
|
||||
}
|
||||
|
||||
void epdWrite(uint8_t reg, uint8_t len, ...) {
|
||||
va_list valist;
|
||||
va_start(valist, len);
|
||||
epd_pin_enable(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_LOW);
|
||||
SSP_SendData(SSP2_ID, reg);
|
||||
for (int i = 0; i < 0xF; ++i)
|
||||
__ISB();
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
for (uint8_t i = 0; i < len; i++) {
|
||||
SSP_SendData(SSP2_ID, va_arg(valist, int));
|
||||
}
|
||||
|
||||
for (int j = 0; j < 0xF; ++j)
|
||||
__ISB();
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
epd_pin_enable(0);
|
||||
va_end(valist);
|
||||
}
|
||||
|
||||
void epd_reset() {
|
||||
uint8_t v0 = 5;
|
||||
printf("Resetting...");
|
||||
while (1) {
|
||||
GPIO_WritePinOutput(EPD_RESET, GPIO_IO_HIGH);
|
||||
delay(100);
|
||||
GPIO_WritePinOutput(EPD_RESET, GPIO_IO_LOW);
|
||||
delay(3000);
|
||||
GPIO_WritePinOutput(EPD_RESET, GPIO_IO_HIGH);
|
||||
delay(3000);
|
||||
if (GPIO_ReadPinLevel(EPD_BUSY))
|
||||
break;
|
||||
v0--;
|
||||
if (!v0) {
|
||||
printf("EPD reset failure\r\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
delay(5000);
|
||||
printf(" Reset complete\n");
|
||||
}
|
||||
|
||||
void EPD_cmd(char a1) {
|
||||
epd_pin_enable(1);
|
||||
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_LOW);
|
||||
SSP_SendData(SSP2_ID, a1);
|
||||
for (int i = 0; i < 0xF; ++i)
|
||||
__ISB();
|
||||
|
||||
epd_pin_enable(0);
|
||||
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
}
|
||||
|
||||
void EPD_data(char a1) {
|
||||
epd_pin_enable(1);
|
||||
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
SSP_SendData(SSP2_ID, a1);
|
||||
for (int i = 0; i < 0xF; ++i)
|
||||
__ISB();
|
||||
|
||||
epd_pin_enable(0);
|
||||
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
}
|
||||
|
||||
void spi_soft_send_byte(char a1) {
|
||||
uint8_t v2 = 0;
|
||||
do {
|
||||
if ((a1 & 0x80) != 0)
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_HIGH);
|
||||
else
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
a1 *= 2;
|
||||
v2++;
|
||||
} while (v2 < 8);
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
void BUSY_wait(unsigned int a1) {
|
||||
unsigned int v2 = 0;
|
||||
while (GPIO_ReadPinLevel(EPD_BUSY) == GPIO_IO_LOW) {
|
||||
delay(10000);
|
||||
v2++;
|
||||
if (v2 > a1)
|
||||
break;
|
||||
if (((v2 % 1000) / 10) == 0)
|
||||
WDT_RestartCounter();
|
||||
}
|
||||
}
|
||||
|
||||
void spi_soft_read_buffer(char a1, uint16_t readaddress, uint8_t *target, uint16_t length) {
|
||||
char v9;
|
||||
unsigned int v10;
|
||||
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_LOW);
|
||||
spi_soft_send_byte(3);
|
||||
spi_soft_send_byte(a1);
|
||||
spi_soft_send_byte(readaddress >> 8);
|
||||
spi_soft_send_byte(readaddress);
|
||||
delay_us(5);
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
v9 = 0;
|
||||
v10 = 0;
|
||||
do {
|
||||
v9 *= 2;
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
if (GPIO_ReadPinLevel(EPD_MISO))
|
||||
v9 |= 1u;
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
v10++;
|
||||
} while (v10 < 8);
|
||||
delay_us(1);
|
||||
*target++ = v9;
|
||||
}
|
||||
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_HIGH);
|
||||
}
|
||||
|
||||
int spi_soft_read_byte() {
|
||||
int v0;
|
||||
unsigned int v1;
|
||||
|
||||
v0 = 0;
|
||||
GPIO_WritePinOutput(EPD_BS, GPIO_IO_HIGH);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_HIGH);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_INPUT);
|
||||
GPIO_PinMuxFun(EPD_MOSI, 0);
|
||||
delay_us(3);
|
||||
v1 = 0;
|
||||
do {
|
||||
v0 = (uint8_t)(2 * v0);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
if (GPIO_ReadPinLevel(EPD_MOSI))
|
||||
v0 |= 1u;
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
v1++;
|
||||
} while (v1 < 8);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_MOSI, 0);
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_BS, GPIO_IO_LOW);
|
||||
return v0;
|
||||
}
|
||||
|
||||
uint8_t getTempBracket() {
|
||||
uint8_t v0;
|
||||
uint8_t v1;
|
||||
uint8_t temptable[40];
|
||||
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(1);
|
||||
delay_us(1000);
|
||||
spi_soft_read_buffer(0, 25002, temptable, 10);
|
||||
delay_us(1000);
|
||||
delay_us(1000);
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(0);
|
||||
|
||||
EPD_cmd(EPD_TEMP_CALIB);
|
||||
BUSY_wait(0xAu);
|
||||
v0 = spi_soft_read_byte();
|
||||
v1 = (uint8_t)(2 * v0) + ((uint8_t)spi_soft_read_byte() >> 7);
|
||||
|
||||
uint8_t bracket = 0;
|
||||
for (int i = 0; i < 9; i++) {
|
||||
if ((((char)v1 - (uint8_t)temptable[i]) & 0x80) != 0) {
|
||||
bracket = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return bracket;
|
||||
}
|
||||
|
||||
void loadFrameRatePLL(uint8_t bracket) {
|
||||
uint8_t pllvalue;
|
||||
uint8_t plltable[12];
|
||||
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(1);
|
||||
delay_us(1000);
|
||||
spi_soft_read_buffer(0, 25039, plltable, 10);
|
||||
delay_us(1000);
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(0);
|
||||
|
||||
pllvalue = plltable[bracket];
|
||||
|
||||
EPD_cmd(EPD_PLL_CONTROL);
|
||||
EPD_data(pllvalue);
|
||||
}
|
||||
|
||||
extern void dump(const uint8_t *a, const uint16_t l);
|
||||
|
||||
void loadTempVCOMDC(uint8_t bracket) {
|
||||
uint8_t vcomvalue;
|
||||
uint8_t vcomtable[12];
|
||||
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(1);
|
||||
delay_us(1000);
|
||||
spi_soft_read_buffer(0, 25049, vcomtable, 10);
|
||||
delay_us(1000);
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(0);
|
||||
|
||||
vcomvalue = vcomtable[bracket];
|
||||
|
||||
EPD_cmd(EPD_VCOM_DC_SET);
|
||||
EPD_data(vcomvalue);
|
||||
}
|
||||
|
||||
uint8_t *loadLUT(uint8_t index, uint8_t bracket) {
|
||||
uint16_t adr = 0;
|
||||
uint16_t len = 0;
|
||||
uint8_t *lutBuffer;
|
||||
switch (index) {
|
||||
case EPD_LUT_VCOM:
|
||||
// VCOM LUT
|
||||
adr = 20800 + (220 * bracket);
|
||||
len = 220;
|
||||
break;
|
||||
case EPD_LUT_B:
|
||||
case EPD_LUT_W:
|
||||
case EPD_LUT_G1:
|
||||
case EPD_LUT_G2:
|
||||
case EPD_LUT_R0:
|
||||
case EPD_LUT_R1:
|
||||
case EPD_LUT_R2:
|
||||
case EPD_LUT_R3:
|
||||
adr = (bracket * 2080);
|
||||
adr += (index - 0x21) * 260;
|
||||
len = 260;
|
||||
break;
|
||||
case EPD_LUT_XON:
|
||||
// XON LUT
|
||||
adr = 23000 + (200 * bracket);
|
||||
len = 200;
|
||||
break;
|
||||
}
|
||||
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(1);
|
||||
delay_us(1000);
|
||||
lutBuffer = malloc(len);
|
||||
if (lutBuffer) spi_soft_read_buffer(0, adr, lutBuffer, len);
|
||||
delay_us(1000);
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(0);
|
||||
return lutBuffer;
|
||||
}
|
||||
|
||||
void shiftRightByX(uint8_t *data, int X, int N) {
|
||||
if (X < 0 || X >= 8) {
|
||||
// Invalid shift value, X should be between 0 and 7 (inclusive)
|
||||
return;
|
||||
}
|
||||
|
||||
// Perform the shift operation on each byte in the range
|
||||
for (int i = 0; i < N; i++) {
|
||||
data[i] = (data[i] >> X) | ((data[i + 1] & ((1 << X) - 1)) << (8 - X));
|
||||
}
|
||||
}
|
||||
void shiftLeftByX(uint8_t *data, int X, int N) {
|
||||
if (X < 0 || X >= 8) {
|
||||
// Invalid shift value, X should be between 0 and 7 (inclusive)
|
||||
return;
|
||||
}
|
||||
|
||||
// Perform the shift operation on each byte in the range
|
||||
for (int i = N - 1; i >= 0; i--) {
|
||||
data[i] = (data[i] << X) | ((data[i - 1] >> (8 - X)) & ((1 << X) - 1));
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t loadCharacter(uint8_t currentChar, uint16_t curX, bool first) {
|
||||
currentChar -= 0x20;
|
||||
|
||||
memset(charbuffer, 0, sizeof(charbuffer));
|
||||
for (uint8_t d = 0; d < CHAR_HEIGHT; d++) {
|
||||
for (uint8_t c = 0; c < CHAR_WIDTH_BYTES; c++) {
|
||||
charbuffer[d][c] = font[currentChar][c + (2 * d)];
|
||||
}
|
||||
}
|
||||
|
||||
// find amount of left whitespace and compensate
|
||||
uint8_t leftShift = 0;
|
||||
for (uint8_t left = 0; left < CHAR_WIDTH; left++) {
|
||||
bool leftAdjusted = false;
|
||||
for (uint8_t height = 0; height < CHAR_HEIGHT; height++) {
|
||||
if (charbuffer[height][0] & 0x01) {
|
||||
leftAdjusted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (leftAdjusted) {
|
||||
break;
|
||||
} else {
|
||||
for (uint8_t height = 0; height < CHAR_HEIGHT; height++) {
|
||||
shiftRightByX(&(charbuffer[height][0]), 1, CHAR_WIDTH_BYTES);
|
||||
}
|
||||
leftShift++;
|
||||
}
|
||||
}
|
||||
|
||||
// find width for character
|
||||
uint8_t width = 0;
|
||||
for (int8_t curBit = CHAR_WIDTH + 1; curBit > 0; curBit--) {
|
||||
bool widthFound = false;
|
||||
for (uint8_t height = 0; height < CHAR_HEIGHT; height++) {
|
||||
if (charbuffer[height][curBit / 8] & (1 << (curBit % 8))) {
|
||||
widthFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (widthFound) {
|
||||
width = curBit + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!first) {
|
||||
curX += CHAR_SPACING;
|
||||
}
|
||||
|
||||
for (uint8_t height = 0; height < CHAR_HEIGHT; height++) {
|
||||
shiftLeftByX(&(charbuffer[height][0]), curX % 8, CHAR_WIDTH_BYTES + 1);
|
||||
}
|
||||
|
||||
for (uint8_t d = 0; d < CHAR_HEIGHT; d++) {
|
||||
for (uint8_t c = 0; c < CHAR_WIDTH_BYTES + 1; c++) {
|
||||
buffer[d][(curX / 8) + c] |= charbuffer[d][c];
|
||||
}
|
||||
}
|
||||
if (width == 0) width = EMPTY_SPACING;
|
||||
curX += width;
|
||||
return curX;
|
||||
}
|
||||
|
||||
void dumpBuffer(uint16_t xloc, uint16_t yloc, uint16_t width) {
|
||||
xloc = SCREEN_WIDTH - xloc;
|
||||
|
||||
setDisplayWindow(xloc - width, yloc, xloc, yloc + CHAR_HEIGHT);
|
||||
display_send_start(0);
|
||||
for (uint8_t curY = 0; curY < CHAR_HEIGHT; curY++) {
|
||||
for (uint16_t curX = 0; curX < width; curX += 8) {
|
||||
interleaveBW(buffer[curY][curX / 8]);
|
||||
}
|
||||
}
|
||||
display_send_stop();
|
||||
}
|
||||
|
||||
void loadLUTSfromEEPROM(uint8_t bracket) {
|
||||
for (uint8_t c = EPD_LUT_B; c <= EPD_LUT_R3; c++) {
|
||||
struct epd_colorlut *colorlut = (struct epd_colorlut *)loadLUT(c, bracket);
|
||||
|
||||
for (uint8_t d = 0; d < 8; d++) {
|
||||
colorlut->part[1].length[d] = 1;
|
||||
colorlut->part[0].length[d] = 1;
|
||||
}
|
||||
|
||||
for (uint8_t part = 0; part < 4; part++) {
|
||||
if (colorlut->part[part].repeat) colorlut->part[part].repeat = 1;
|
||||
}
|
||||
|
||||
for (uint8_t part = 4; part < 20; part++) {
|
||||
if (colorlut->part[part].repeat) colorlut->part[part].repeat = 0;
|
||||
}
|
||||
|
||||
lutBeginTX(c);
|
||||
for (uint16_t d = 0; d < 260; d++) {
|
||||
display_tx_byte(((uint8_t *)colorlut)[d]);
|
||||
}
|
||||
lutEndTX();
|
||||
if (colorlut) free(colorlut);
|
||||
}
|
||||
|
||||
struct epd_vcomlut *vcomlut = (struct epd_vcomlut *)loadLUT(EPD_LUT_VCOM, bracket);
|
||||
|
||||
for (uint8_t part = 0; part < 20; part++) {
|
||||
if (vcomlut->part[part].repeat) vcomlut->part[part].repeat = 0;
|
||||
}
|
||||
lutBeginTX(EPD_LUT_VCOM);
|
||||
for (uint16_t d = 0; d < 220; d++) {
|
||||
display_tx_byte(((uint8_t *)vcomlut)[d]);
|
||||
}
|
||||
lutEndTX();
|
||||
if (vcomlut) free(vcomlut);
|
||||
|
||||
struct epd_xonlut *xonlut = (struct epd_xonlut *)loadLUT(EPD_LUT_XON, bracket);
|
||||
|
||||
// memset(&(xonlut->part[0].repeat), 0x00, sizeof(struct epd_xonlutpart));
|
||||
// memset(&(xonlut->part[1].repeat), 0x00, sizeof(struct epd_xonlutpart));
|
||||
|
||||
for (uint8_t part = 0; part < 20; part++) {
|
||||
if (xonlut->part[part].repeat) xonlut->part[part].repeat = 0;
|
||||
}
|
||||
lutBeginTX(EPD_LUT_XON);
|
||||
for (uint16_t d = 0; d < 200; d++) {
|
||||
display_tx_byte(((uint8_t *)xonlut)[d]);
|
||||
}
|
||||
lutEndTX();
|
||||
if (xonlut) free(xonlut);
|
||||
}
|
||||
|
||||
void init_GPIO_EPD() {
|
||||
SSP_CFG_Type v0;
|
||||
SPI_Param_Type spiParaStruct;
|
||||
GPIO_PinMuxFun(EPD_MOSI, 0);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_CLK, 0);
|
||||
GPIO_SetPinDir(EPD_CLK, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_CS, 0);
|
||||
GPIO_SetPinDir(EPD_CS, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_BUSY, 0);
|
||||
GPIO_SetPinDir(EPD_BUSY, GPIO_INPUT);
|
||||
GPIO_PinModeConfig(EPD_BUSY, PINMODE_PULLUP);
|
||||
GPIO_PinMuxFun(EPD_RESET, 0);
|
||||
GPIO_SetPinDir(EPD_RESET, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_RESET, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_DC, 0);
|
||||
GPIO_SetPinDir(EPD_DC, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_BS, 0);
|
||||
GPIO_SetPinDir(EPD_BS, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_BS, GPIO_IO_LOW);
|
||||
GPIO_PinMuxFun(EPD_HLT_CTRL, 0);
|
||||
GPIO_SetPinDir(EPD_HLT_CTRL, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_MISO, 0);
|
||||
GPIO_SetPinDir(EPD_MISO, GPIO_INPUT);
|
||||
GPIO_PinModeConfig(EPD_MISO, PINMODE_DEFAULT);
|
||||
memset(&v0, 0, 9);
|
||||
v0.timeOutVal = 0;
|
||||
SSP_Init(SSP2_ID, &v0);
|
||||
spiParaStruct.spiClkPhase = SPI_SCPHA_1;
|
||||
spiParaStruct.spiClkPolarity = SPI_SCPOL_LOW;
|
||||
SPI_Config(SSP2_ID, &spiParaStruct);
|
||||
CLK_I2SClkSrc(CLK_I2S_XTAL32M);
|
||||
CLK_SSPClkSrc(CLK_SSP_ID_2, CLK_SSP_I2S);
|
||||
CLK_I2SClkDivider(1, 1);
|
||||
}
|
||||
|
||||
void fillWindow(uint16_t x, uint16_t y, uint16_t xe, uint16_t ye, uint8_t color) {
|
||||
setDisplayWindow(x, y, xe, ye);
|
||||
display_send_start(0);
|
||||
|
||||
for (uint32_t c = 0; c < (xe - x) * (ye - y) / 8; c++) {
|
||||
interleaveBW(0x00);
|
||||
}
|
||||
|
||||
display_send_stop();
|
||||
}
|
||||
|
||||
void epd_refresh_and_sleep(uint8_t lut) {
|
||||
if (lut) {
|
||||
epdWrite(EPD_PANEL_SETTING, 2, 0xC3, 0x88); // 0xC3-0x88 // lut from register
|
||||
loadLUTSfromEEPROM(EPDtempBracket);
|
||||
} else {
|
||||
epdWrite(EPD_PANEL_SETTING, 2, 0xC3, 0x08); // 0xC3-0x88 // lut from EEPROM
|
||||
epdWrite(EPD_UNKNOWN_1, 1, 0x03); // load lut, probably
|
||||
}
|
||||
|
||||
// epdPrintf(50,100,false,"Blaat! Dit is een test %d", 6);
|
||||
|
||||
EPD_cmd(EPD_REFRESH);
|
||||
|
||||
unsigned int v2 = 0;
|
||||
while (GPIO_ReadPinLevel(EPD_BUSY) == GPIO_IO_HIGH) {
|
||||
WDT_RestartCounter();
|
||||
delay(10000);
|
||||
v2++;
|
||||
if (v2 > 10)
|
||||
break;
|
||||
}
|
||||
do_sleeped_epd_refresh();
|
||||
init_GPIO_EPD();
|
||||
epd_reset();
|
||||
// epd_reset();
|
||||
EPD_cmd(EPD_POWER_SETTING);
|
||||
EPD_data(2);
|
||||
EPD_data(0);
|
||||
EPD_data(0);
|
||||
EPD_data(0);
|
||||
delay_us(50000);
|
||||
EPD_cmd(EPD_POWER_OFF);
|
||||
delay_us(100000);
|
||||
BUSY_wait(0x32u);
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(1);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_LOW);
|
||||
spi_soft_send_byte(EPD_EEPROM_SLEEP);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_HIGH);
|
||||
EPD_cmd(EPD_SPI_FLASH_CONTROL);
|
||||
EPD_data(0);
|
||||
EPD_cmd(EPD_DEEP_SLEEP);
|
||||
EPD_data(0xA5);
|
||||
}
|
||||
|
||||
void epd_pin_enable(int a1) {
|
||||
if (a1) {
|
||||
GPIO_PinMuxFun(EPD_CLK, GPIO22_SSP2_SCK);
|
||||
GPIO_PinMuxFun(EPD_MOSI, GPIO12_SSP2_TXD);
|
||||
GPIO_PinMuxFun(EPD_MISO, GPIO13_SSP2_RXD);
|
||||
SSP_Enable(SSP2_ID);
|
||||
} else {
|
||||
SSP_Disable(SSP2_ID);
|
||||
GPIO_PinMuxFun(EPD_MOSI, 0);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_CLK, 0);
|
||||
GPIO_SetPinDir(EPD_CLK, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_MISO, 0);
|
||||
GPIO_SetPinDir(EPD_MISO, GPIO_INPUT);
|
||||
GPIO_PinModeConfig(EPD_MISO, PINMODE_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
void lutBeginTX(uint8_t reg) {
|
||||
EPD_cmd(reg);
|
||||
epd_pin_enable(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
}
|
||||
|
||||
void lutEndTX() {
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
epd_pin_enable(0);
|
||||
}
|
||||
|
||||
void setDisplayWindow(uint16_t x, uint16_t y, uint16_t xe, uint16_t ye) {
|
||||
x &= 0xFFF8; // byte boundary
|
||||
xe = (xe - 1) | 0x0007; // byte boundary - 1
|
||||
EPD_cmd(0x91);
|
||||
epdWrite(0x90, 9, x / 256, x % 256, xe / 256, xe % 256, y / 256, y % 256, ye / 256, ye % 256, 0x01);
|
||||
}
|
||||
|
||||
void display_tx_byte(uint8_t data) {
|
||||
SSP_SendData(SSP2_ID, data);
|
||||
}
|
||||
|
||||
void display_send_start(uint8_t inverted) {
|
||||
EPD_cmd(EPD_START_DATA);
|
||||
epd_pin_enable(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
}
|
||||
|
||||
void display_send_stop() {
|
||||
for (int i = 0; i < 0xF; ++i)
|
||||
__ISB();
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
epd_pin_enable(0);
|
||||
}
|
||||
|
||||
void init_epd(void) {
|
||||
printf("EPD Powerup begin\n");
|
||||
init_GPIO_EPD();
|
||||
epd_reset();
|
||||
|
||||
EPD_cmd(EPD_POWER_ON);
|
||||
BUSY_wait(0x32u);
|
||||
|
||||
// wake the eeprom
|
||||
epdWrite(EPD_SPI_FLASH_CONTROL, 1, 0x01);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_LOW);
|
||||
epdWrite(EPD_WAKE_EEPROM, 0x00);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_HIGH);
|
||||
epdWrite(EPD_SPI_FLASH_CONTROL, 1, 0x00);
|
||||
|
||||
epdWrite(EPD_POWER_SETTING, 4, 0x37, 0x00, 0x05, 0x05); // 0x37 - 00- 05 05
|
||||
// epdWrite(EPD_POWER_SETTING, 4, 0x07, 0x00, 0x05, 0x05); // 0x37 - 00- 05 05
|
||||
|
||||
epdWrite(EPD_PANEL_SETTING, 2, 0xC3, 0x08); // 0xC3-0x88 // lut from EEPROM
|
||||
|
||||
epdWrite(EPD_POWER_OFF_SEQUENCE, 1, 0x00);
|
||||
epdWrite(EPD_BOOSTER_SOFT_START, 0x03, 199, 204, 45);
|
||||
|
||||
epdWrite(EPD_PLL_CONTROL, 0x01, 60);
|
||||
epdWrite(EPD_TEMP_SELECT, 0x01, 0x00);
|
||||
epdWrite(EPD_VCOM_DATA_INTERVAL, 0x01, 119);
|
||||
epdWrite(EPD_TCON_SET, 0x01, 34);
|
||||
epdWrite(EPD_TRES, 0x04, 2, 128, 1, 128);
|
||||
|
||||
EPDtempBracket = getTempBracket();
|
||||
loadFrameRatePLL(EPDtempBracket);
|
||||
loadTempVCOMDC(EPDtempBracket);
|
||||
}
|
||||
|
||||
void epdPrintf(uint16_t x, uint16_t y, bool color, const char *c, ...) {
|
||||
// Render the text
|
||||
char out_buffer[96];
|
||||
|
||||
uint16_t curX = 0;
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
memset(charbuffer, 0, sizeof(charbuffer));
|
||||
va_list lst;
|
||||
va_start(lst, c);
|
||||
vsnprintf(out_buffer, 256, c, lst);
|
||||
va_end(lst);
|
||||
|
||||
curX = x % 8;
|
||||
|
||||
char *text = (char *)out_buffer;
|
||||
memset(charbuffer, 0, sizeof(charbuffer));
|
||||
curX = loadCharacter(*text, curX, true);
|
||||
text++;
|
||||
|
||||
while (*text != '\0') {
|
||||
memset(charbuffer, 0, sizeof(charbuffer));
|
||||
curX = loadCharacter(*text, curX, false);
|
||||
text++;
|
||||
}
|
||||
|
||||
x /= 8;
|
||||
x *= 8;
|
||||
dumpBuffer(x, y, curX);
|
||||
}
|
||||
|
||||
void drawImg(uint16_t x, uint16_t y, const uint8_t *img) {
|
||||
uint16_t width = img[0];
|
||||
uint16_t height = img[1];
|
||||
img += 2;
|
||||
setDisplayWindow(x, y, x + width, y + height);
|
||||
display_send_start(0);
|
||||
for (uint8_t curY = 0; curY < height; curY++) {
|
||||
for (uint16_t curX = 0; curX < width; curX += 8) {
|
||||
interleaveColor(*(img++), 0x00);
|
||||
}
|
||||
}
|
||||
display_send_stop();
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
#pragma once
|
||||
//#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define DISPLAY_WIDTH (640)
|
||||
#define DISPLAY_HEIGHT (384)
|
||||
#define DISPLAY_WIDTH_MM (164)
|
||||
#define DISPLAY_HEIGHT_MM (97)
|
||||
|
||||
#define MAGNIFY1 3
|
||||
#define MAGNIFY2 2
|
||||
#define MAGNIFY3 1
|
||||
#define BACK_COLOR 3
|
||||
#define FORE_COLOR_1 0
|
||||
#define FORE_COLOR_2 4
|
||||
#define FORE_COLOR_3 0
|
||||
|
||||
#define EPD_LUT_DEFAULT 0
|
||||
#define EPD_LUT_NO_REPEATS 1
|
||||
#define EPD_LUT_FAST_NO_REDS 2
|
||||
#define EPD_LUT_FAST 3
|
||||
|
||||
#define EPD_DIRECTION_X false
|
||||
#define EPD_DIRECTION_Y true
|
||||
#define EPD_SIZE_SINGLE false
|
||||
#define EPD_SIZE_DOUBLE true
|
||||
#define EPD_COLOR_RED true
|
||||
#define EPD_COLOR_BLACK false
|
||||
|
||||
void init_GPIO_EPD();
|
||||
void display_send_buffer();
|
||||
|
||||
void epd_refresh_and_sleep(uint8_t lut);
|
||||
|
||||
void display_tx_byte(uint8_t data);
|
||||
void display_send_start(uint8_t inverted);
|
||||
void display_send_stop();
|
||||
|
||||
void setDisplayWindow(uint16_t x, uint16_t y, uint16_t xe, uint16_t ye);
|
||||
|
||||
void init_epd();
|
||||
void refresh_epd();
|
||||
|
||||
void lutBeginTX(uint8_t reg);
|
||||
void lutEndTX();
|
||||
|
||||
void epd_pin_enable(int a1);
|
||||
|
||||
|
||||
void fillWindow(uint16_t x, uint16_t y, uint16_t xe, uint16_t ye, uint8_t color);
|
||||
void epdPrintf(uint16_t x, uint16_t y, bool color, const char* c, ...);
|
||||
|
||||
void interleaveColor(uint8_t b, uint8_t r);
|
||||
void interleaveBW(uint8_t);
|
||||
|
||||
void drawImg(uint16_t x, uint16_t y, const uint8_t *img);
|
||||
278
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/epd_interface.cpp
Normal file
278
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/epd_interface.cpp
Normal file
@@ -0,0 +1,278 @@
|
||||
#include "drawing.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "epd_interface.h"
|
||||
#include "uc8159-var-m2.h"
|
||||
#include "uc8176-var-m2.h"
|
||||
|
||||
#include "mz100/printf.h"
|
||||
#include "mz100/eeprom.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
extern "C" {
|
||||
#include "mz100/mz100_clock.h"
|
||||
|
||||
#include "mz100/mz100_gpio.h"
|
||||
#include "mz100/mz100_pinmux.h"
|
||||
#include "mz100/mz100_ssp.h"
|
||||
#include "mz100/mz100_wdt.h"
|
||||
#include "mz100/util.h"
|
||||
}
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include "../../oepl-definitions.h"
|
||||
#include "../../oepl-proto.h"
|
||||
|
||||
__attribute__((section(".aonshadow"))) epdInterface *epd;
|
||||
__attribute__((section(".aonshadow"))) tagSpecs tag;
|
||||
epdInterface::~epdInterface() {
|
||||
}
|
||||
|
||||
void epdSetup() {
|
||||
switch (tagProfile.controllerType) {
|
||||
case 0:
|
||||
epd = new uc8159;
|
||||
break;
|
||||
case 1:
|
||||
epd = new uc8176;
|
||||
break;
|
||||
}
|
||||
|
||||
epd->effectiveXRes = tagProfile.xRes;
|
||||
epd->effectiveYRes = tagProfile.yRes;
|
||||
epd->Xres = tagProfile.xRes;
|
||||
epd->Yres = tagProfile.yRes;
|
||||
epd->bpp = tagProfile.bpp;
|
||||
epd->epdSetup();
|
||||
}
|
||||
|
||||
void epdEnterSleep() {
|
||||
epd->epdEnterSleep();
|
||||
delete epd;
|
||||
}
|
||||
void draw() {
|
||||
epd->draw();
|
||||
}
|
||||
void drawNoWait() {
|
||||
epd->drawNoWait();
|
||||
}
|
||||
|
||||
void epdWaitRdy() {
|
||||
epd->epdWaitRdy();
|
||||
}
|
||||
|
||||
void selectLUT(uint8_t sel) {
|
||||
epd->selectLUT(sel);
|
||||
}
|
||||
|
||||
static void busyWaitUntilHigh(uint32_t timeout) {
|
||||
uint32_t v2 = 0;
|
||||
while (GPIO_ReadPinLevel(EPD_BUSY) == GPIO_IO_LOW) {
|
||||
delay(50);
|
||||
v2++;
|
||||
if (v2 > timeout)
|
||||
break;
|
||||
if (((v2 % 1000) / 10) == 0)
|
||||
WDT_RestartCounter();
|
||||
}
|
||||
}
|
||||
|
||||
static void busyWaitUntilLow(uint32_t timeout) {
|
||||
uint32_t v2 = 0;
|
||||
while (GPIO_ReadPinLevel(EPD_BUSY) == GPIO_IO_HIGH) {
|
||||
delay(50);
|
||||
v2++;
|
||||
if (v2 > timeout)
|
||||
break;
|
||||
if (((v2 % 1000) / 10) == 0)
|
||||
WDT_RestartCounter();
|
||||
}
|
||||
}
|
||||
|
||||
void busyWaitUntil(bool high, uint32_t timeout) {
|
||||
if (high)
|
||||
busyWaitUntilHigh(timeout);
|
||||
else
|
||||
busyWaitUntilLow(timeout);
|
||||
}
|
||||
|
||||
void softSPIWriteByte(char byteOut) {
|
||||
uint8_t loopCount = 0;
|
||||
do {
|
||||
if ((byteOut & 0x80) != 0)
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_HIGH);
|
||||
else
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
byteOut *= 2;
|
||||
loopCount++;
|
||||
delay_us(1);
|
||||
} while (loopCount < 8);
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
uint8_t softSPIReadByte() {
|
||||
uint8_t readByte = 0;
|
||||
uint8_t loopCount = 0;
|
||||
GPIO_WritePinOutput(EPD_BS, GPIO_IO_HIGH);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_HIGH);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_INPUT);
|
||||
GPIO_PinMuxFun(EPD_MOSI, PINMUX_FUNCTION_0);
|
||||
delay_us(3);
|
||||
do {
|
||||
readByte *= 2;
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_HIGH);
|
||||
if (GPIO_ReadPinLevel(EPD_MOSI))
|
||||
readByte |= 1u;
|
||||
GPIO_WritePinOutput(EPD_CLK, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
// delay(1);
|
||||
loopCount++;
|
||||
} while (loopCount < 8);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_MOSI, PINMUX_FUNCTION_0);
|
||||
GPIO_WritePinOutput(EPD_MOSI, GPIO_IO_LOW);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_BS, GPIO_IO_LOW);
|
||||
// delay(1);
|
||||
delay_us(1);
|
||||
|
||||
return readByte;
|
||||
}
|
||||
|
||||
void enableHardSPI(bool enable) {
|
||||
if (enable) {
|
||||
GPIO_PinMuxFun(EPD_CLK, GPIO22_SSP2_SCK);
|
||||
GPIO_PinMuxFun(EPD_MOSI, GPIO12_SSP2_TXD);
|
||||
GPIO_PinMuxFun(EPD_MISO, GPIO13_SSP2_RXD);
|
||||
SSP_Enable(SSP2_ID);
|
||||
} else {
|
||||
SSP_Disable(SSP2_ID);
|
||||
GPIO_PinMuxFun(EPD_MOSI, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_CLK, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_CLK, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_MISO, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_MISO, GPIO_INPUT);
|
||||
GPIO_PinModeConfig(EPD_MISO, PINMODE_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
void initEPDGPIO() {
|
||||
SSP_CFG_Type v0;
|
||||
SPI_Param_Type spiParaStruct;
|
||||
GPIO_PinMuxFun(EPD_MOSI, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_MOSI, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_CLK, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_CLK, GPIO_OUTPUT);
|
||||
GPIO_PinMuxFun(EPD_CS, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_CS, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_BUSY, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_BUSY, GPIO_INPUT);
|
||||
GPIO_PinModeConfig(EPD_BUSY, PINMODE_PULLUP);
|
||||
GPIO_PinMuxFun(EPD_RESET, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_RESET, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_RESET, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_DC, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_DC, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_BS, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_BS, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_BS, GPIO_IO_LOW);
|
||||
GPIO_PinMuxFun(EPD_HLT_CTRL, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_HLT_CTRL, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(EPD_HLT_CTRL, GPIO_IO_HIGH);
|
||||
GPIO_PinMuxFun(EPD_MISO, PINMUX_FUNCTION_0);
|
||||
GPIO_SetPinDir(EPD_MISO, GPIO_INPUT);
|
||||
GPIO_PinModeConfig(EPD_MISO, PINMODE_DEFAULT);
|
||||
memset(&v0, 0, 9);
|
||||
v0.timeOutVal = 0;
|
||||
SSP_Init(SSP2_ID, &v0);
|
||||
spiParaStruct.spiClkPhase = SPI_SCPHA_1;
|
||||
spiParaStruct.spiClkPolarity = SPI_SCPOL_LOW;
|
||||
SPI_Config(SSP2_ID, &spiParaStruct);
|
||||
CLK_I2SClkSrc(CLK_I2S_XTAL32M);
|
||||
CLK_SSPClkSrc(CLK_SSP_ID_2, CLK_SSP_I2S);
|
||||
CLK_I2SClkDivider(1, 1);
|
||||
}
|
||||
|
||||
void epdWrite(uint8_t reg, uint8_t len, ...) {
|
||||
va_list valist;
|
||||
va_start(valist, len);
|
||||
enableHardSPI(true);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_LOW);
|
||||
|
||||
SSP_SendData(SSP2_ID, reg);
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID))
|
||||
;
|
||||
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
|
||||
for (uint8_t i = 0; i < len; i++) {
|
||||
SSP_SendData(SSP2_ID, va_arg(valist, int));
|
||||
}
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID))
|
||||
;
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
enableHardSPI(false);
|
||||
va_end(valist);
|
||||
}
|
||||
void epdBlockWrite(uint8_t reg, uint8_t *buffer, uint16_t len) {
|
||||
enableHardSPI(true);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_LOW);
|
||||
|
||||
SSP_SendData(SSP2_ID, reg);
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID))
|
||||
;
|
||||
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
|
||||
for (uint16_t i = 0; i < len; i++) {
|
||||
SSP_SendData(SSP2_ID, buffer[i]);
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID) > 8)
|
||||
;
|
||||
}
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID))
|
||||
;
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
enableHardSPI(false);
|
||||
}
|
||||
void epdBlockWrite(uint8_t *buffer, uint16_t len) {
|
||||
enableHardSPI(true);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_LOW);
|
||||
GPIO_WritePinOutput(EPD_DC, GPIO_IO_HIGH);
|
||||
|
||||
for (uint16_t i = 0; i < len; i++) {
|
||||
SSP_SendData(SSP2_ID, buffer[i]);
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID) > 8)
|
||||
;
|
||||
}
|
||||
while (SSP_GetTxFifoLevel(SSP2_ID))
|
||||
;
|
||||
delay_us(1);
|
||||
GPIO_WritePinOutput(EPD_CS, GPIO_IO_HIGH);
|
||||
enableHardSPI(false);
|
||||
}
|
||||
68
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/epd_interface.h
Normal file
68
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/epd_interface.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
// #include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
class epdInterface {
|
||||
public:
|
||||
virtual ~epdInterface() = 0;
|
||||
virtual void epdSetup() = 0;
|
||||
virtual void epdEnterSleep() = 0;
|
||||
virtual void draw() = 0;
|
||||
virtual void drawNoWait() = 0;
|
||||
virtual void epdWaitRdy() = 0;
|
||||
virtual void selectLUT(uint8_t lut) = 0;
|
||||
uint8_t controllerType = 0;
|
||||
uint16_t Xres;
|
||||
uint16_t Yres;
|
||||
uint16_t effectiveXRes;
|
||||
uint16_t effectiveYRes;
|
||||
uint16_t XOffset = 0;
|
||||
uint16_t YOffset = 0;
|
||||
uint8_t bpp = 0;
|
||||
bool drawDirectionRight = false;
|
||||
bool epdMirrorV = false;
|
||||
bool epdMirrorH = false;
|
||||
};
|
||||
|
||||
struct tagSpecs {
|
||||
uint8_t buttonCount = 0;
|
||||
bool hasNFC = false;
|
||||
bool hasLED = false;
|
||||
uint16_t macSuffix = 0x0000;
|
||||
uint8_t OEPLtype = 0;
|
||||
uint8_t solumType = 0;
|
||||
uint32_t imageSize = 0;
|
||||
} __attribute__((packed));
|
||||
|
||||
extern __attribute__((section(".aonshadow"))) tagSpecs tag;
|
||||
|
||||
//__attribute__((section(".aonshadow")))
|
||||
extern epdInterface *epd;
|
||||
|
||||
void epdSetup();
|
||||
void epdEnterSleep();
|
||||
|
||||
void draw();
|
||||
void drawNoWait();
|
||||
void drawWithSleep();
|
||||
void epdWaitRdy();
|
||||
|
||||
#define EPD_LUT_DEFAULT 0
|
||||
#define EPD_LUT_NO_REPEATS 1
|
||||
#define EPD_LUT_FAST_NO_REDS 2
|
||||
#define EPD_LUT_FAST 3
|
||||
|
||||
void selectLUT(uint8_t lut);
|
||||
|
||||
void initEPDGPIO();
|
||||
|
||||
void busyWaitUntil(bool high, uint32_t timeout);
|
||||
void softSPIWriteByte(char byteOut);
|
||||
uint8_t softSPIReadByte();
|
||||
|
||||
void enableHardSPI(bool enable);
|
||||
void epdWrite(uint8_t reg, uint8_t len, ...);
|
||||
void epdBlockWrite(uint8_t reg, uint8_t *buffer, uint16_t len);
|
||||
void epdBlockWrite(uint8_t *buffer, uint16_t len);
|
||||
@@ -1,260 +0,0 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
static const uint8_t font[256][20]={ // https://raw.githubusercontent.com/basti79/LCD-fonts/master/10x16_vertikal_MSB_1.h
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
|
||||
{0xE0,0x01,0x30,0x03,0x50,0x02,0x28,0x05,0x28,0x04,0x28,0x04,0x28,0x05,0x50,0x02,0x30,0x03,0xE0,0x01}, // 0x01
|
||||
{0xE0,0x01,0xF0,0x03,0xB0,0x03,0xD8,0x06,0xD8,0x07,0xD8,0x07,0xD8,0x06,0xB0,0x03,0xF0,0x03,0xE0,0x01}, // 0x02
|
||||
{0x00,0x3E,0x80,0x7F,0xE0,0x7F,0xF0,0x7F,0xF8,0x3F,0xF8,0x3F,0xF0,0x7F,0xE0,0x7F,0x80,0x7F,0x00,0x3E}, // 0x03
|
||||
{0x00,0x01,0x80,0x03,0xC0,0x0F,0xE0,0x1F,0xF8,0x7F,0xF0,0x1F,0xE0,0x0F,0xC0,0x07,0x80,0x03,0x00,0x01}, // 0x04
|
||||
{0x80,0x03,0xC0,0x07,0xC0,0x07,0xC0,0x3F,0xF8,0x7F,0xB8,0x7F,0xC0,0x3F,0xC0,0x07,0xC0,0x07,0x80,0x03}, // 0x05
|
||||
{0x80,0x03,0xC0,0x07,0xC0,0x0F,0xC0,0x1F,0xF8,0x3F,0xB8,0x7F,0xC0,0x1F,0xC0,0x0F,0xC0,0x07,0x80,0x03}, // 0x06
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
|
||||
{0xE0,0x01,0x10,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x08,0x24,0x10,0x2E,0xE0,0x71,0x00,0x70,0x00,0x18}, // 0x0B
|
||||
{0x00,0x00,0x00,0x1E,0x20,0x21,0xA0,0x40,0xF8,0x40,0xA0,0x40,0xA0,0x41,0x00,0x21,0x00,0x1E,0x00,0x00}, // 0x0C
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
|
||||
{0x06,0x00,0x0E,0x00,0x0E,0x00,0xFC,0x1F,0x00,0x18,0x30,0x10,0x70,0x30,0x70,0x20,0xE0,0x7F,0x00,0x00}, // 0x0E
|
||||
{0x00,0x01,0xC0,0x0F,0xC0,0x04,0x40,0x08,0x60,0x18,0x40,0x08,0x40,0x04,0xC0,0x0C,0xC0,0x0B,0x00,0x01}, // 0x0F
|
||||
{0xF8,0x0F,0xF0,0x07,0xF0,0x07,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xC0,0x01,0xC0,0x01,0x80,0x00,0x80,0x00}, // 0x10
|
||||
{0x80,0x00,0x80,0x00,0xC0,0x01,0xC0,0x01,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xF0,0x07,0xF0,0x07,0xF8,0x0F}, // 0x11
|
||||
{0x00,0x00,0x00,0x00,0x08,0x10,0x04,0x20,0xFE,0x7F,0x04,0x20,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x12
|
||||
{0x00,0x00,0x00,0x00,0xD8,0x7F,0x00,0x00,0x00,0x00,0xD8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x13
|
||||
{0x00,0x00,0x00,0x38,0x00,0x7C,0x00,0x7E,0xFE,0x7F,0x00,0x40,0x00,0x40,0xFE,0x7F,0x00,0x00,0x00,0x00}, // 0x14
|
||||
{0x00,0x00,0x00,0x00,0x86,0x3B,0xC2,0x4C,0x42,0x44,0x62,0x46,0x32,0x42,0xDC,0x41,0x00,0x00,0x00,0x00}, // 0x15
|
||||
{0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00}, // 0x16
|
||||
{0x00,0x00,0x00,0x00,0x11,0x10,0x09,0x20,0xFD,0x7F,0x09,0x20,0x11,0x10,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x17
|
||||
{0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x20,0xFE,0x7F,0x00,0x20,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x18
|
||||
{0x00,0x00,0x00,0x00,0x08,0x00,0x04,0x00,0xFE,0x7F,0x04,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x19
|
||||
{0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x02,0xC0,0x01,0x80,0x00,0x00,0x00}, // 0x1A
|
||||
{0x00,0x00,0x80,0x00,0xC0,0x01,0xA0,0x02,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00,0x00}, // 0x1B
|
||||
{0x00,0x00,0xF8,0x07,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x00,0x00}, // 0x1C
|
||||
{0x00,0x00,0x80,0x00,0xC0,0x01,0xA0,0x02,0x80,0x00,0x80,0x00,0xA0,0x02,0xC0,0x01,0x80,0x00,0x00,0x00}, // 0x1D
|
||||
{0x08,0x00,0x18,0x00,0x78,0x00,0xF8,0x01,0xF8,0x03,0xF8,0x0F,0xF8,0x03,0xF8,0x00,0x38,0x00,0x08,0x00}, // 0x1E
|
||||
{0x00,0x08,0x00,0x0C,0x00,0x0F,0xC0,0x0F,0xE0,0x0F,0xF8,0x0F,0xE0,0x0F,0x80,0x0F,0x00,0x0E,0x00,0x08}, // 0x1F
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x21
|
||||
{0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x22
|
||||
{0x80,0x00,0x98,0x04,0xE0,0x05,0x80,0x1E,0x98,0x64,0xE0,0x05,0x80,0x1E,0x80,0x64,0x80,0x04,0x00,0x00}, // 0x23
|
||||
{0x00,0x00,0x00,0x00,0x18,0x38,0x08,0x64,0x08,0x42,0xFC,0xFF,0x88,0x41,0xF0,0x40,0x00,0x00,0x00,0x00}, // 0x24
|
||||
{0x08,0x38,0x10,0x44,0x20,0x44,0xC0,0x44,0x00,0x39,0x70,0x02,0x88,0x0C,0x88,0x10,0x88,0x20,0x70,0x40}, // 0x25
|
||||
{0xE0,0x00,0x10,0x01,0x08,0x3A,0x08,0x46,0x88,0x45,0xC8,0x4C,0x38,0x38,0x18,0x00,0x68,0x00,0x80,0x01}, // 0x26
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x27
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0x18,0x18,0x0C,0x30,0x04,0x20,0x02,0x40,0x02,0x40,0x00,0x00}, // 0x28
|
||||
{0x00,0x00,0x02,0x40,0x02,0x40,0x04,0x20,0x0C,0x30,0x18,0x18,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x29
|
||||
{0x00,0x00,0x00,0x10,0x00,0x18,0x00,0x0F,0x00,0x72,0x00,0x0F,0x00,0x18,0x00,0x10,0x00,0x00,0x00,0x00}, // 0x2A
|
||||
{0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0xF8,0x07,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00}, // 0x2B
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2C
|
||||
{0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00}, // 0x2D
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2E
|
||||
{0x00,0x00,0x02,0x00,0x0C,0x00,0x30,0x00,0xC0,0x00,0x00,0x03,0x00,0x0C,0x00,0x30,0x00,0x40,0x00,0x00}, // 0x2F
|
||||
{0x00,0x00,0xC0,0x0F,0x30,0x30,0x08,0x40,0x08,0x40,0x08,0x40,0x30,0x30,0xC0,0x0F,0x00,0x00,0x00,0x00}, // 0x30
|
||||
{0x00,0x00,0x08,0x20,0x08,0x20,0x08,0x20,0xF8,0x7F,0x08,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x31
|
||||
{0x00,0x00,0x18,0x60,0x28,0x40,0x48,0x40,0x88,0x40,0x08,0x43,0x08,0x3C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x32
|
||||
{0x00,0x00,0x00,0x00,0x08,0x40,0x08,0x42,0x08,0x42,0x08,0x42,0xF0,0x3D,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x33
|
||||
{0xC0,0x00,0x40,0x03,0x40,0x04,0x40,0x18,0x40,0x20,0xF8,0x7F,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00}, // 0x34
|
||||
{0x00,0x00,0x00,0x00,0x08,0x7C,0x08,0x44,0x08,0x44,0x10,0x42,0xE0,0x41,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x35
|
||||
{0x00,0x00,0xE0,0x0F,0x10,0x32,0x08,0x44,0x08,0x44,0x08,0x44,0x10,0x42,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x36
|
||||
{0x00,0x00,0x00,0x40,0x18,0x40,0xE0,0x40,0x00,0x43,0x00,0x4C,0x00,0x50,0x00,0x60,0x00,0x00,0x00,0x00}, // 0x37
|
||||
{0x00,0x00,0xF0,0x38,0x08,0x45,0x08,0x42,0x08,0x42,0x08,0x45,0x90,0x45,0x60,0x38,0x00,0x00,0x00,0x00}, // 0x38
|
||||
{0x00,0x00,0x00,0x1E,0x08,0x21,0x88,0x40,0x88,0x40,0x88,0x40,0x30,0x21,0xC0,0x1F,0x00,0x00,0x00,0x00}, // 0x39
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x06,0x18,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3A
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x06,0x1E,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x3B
|
||||
{0x00,0x00,0x00,0x00,0xC0,0x00,0xC0,0x00,0x20,0x01,0x20,0x01,0x10,0x02,0x10,0x02,0x08,0x04,0x00,0x00}, // 0x3C
|
||||
{0x00,0x00,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x00,0x00}, // 0x3D
|
||||
{0x00,0x00,0x08,0x04,0x10,0x02,0x10,0x02,0x20,0x01,0x20,0x01,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00}, // 0x3E
|
||||
{0x00,0x00,0x00,0x70,0x00,0x40,0xD8,0x40,0x00,0x41,0x00,0x42,0x00,0x64,0x00,0x38,0x00,0x00,0x00,0x00}, // 0x3F
|
||||
{0xC0,0x0F,0x30,0x18,0x18,0x20,0xC8,0x47,0x28,0x48,0x68,0x50,0xD8,0x51,0xE0,0x3F,0x20,0x00,0x20,0x00}, // 0x40
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x01,0x40,0x0E,0x40,0x18,0x40,0x0C,0x40,0x03,0xC0,0x00,0x30,0x00,0x08,0x00}, // 0x41
|
||||
{0x00,0x00,0xF8,0x1F,0x08,0x11,0x08,0x11,0x08,0x11,0x08,0x11,0x88,0x12,0x70,0x0C,0x00,0x00,0x00,0x00}, // 0x42
|
||||
{0xC0,0x03,0x30,0x0C,0x10,0x08,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x18,0x00,0x00,0x00,0x00}, // 0x43
|
||||
{0x00,0x00,0xF8,0x1F,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x10,0x08,0xE0,0x07,0x00,0x00,0x00,0x00}, // 0x44
|
||||
{0x00,0x00,0xF8,0x1F,0x88,0x10,0x88,0x10,0x88,0x10,0x88,0x10,0x88,0x10,0x08,0x10,0x00,0x00,0x00,0x00}, // 0x45
|
||||
{0x00,0x00,0xF8,0x1F,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x00,0x10,0x00,0x00,0x00,0x00}, // 0x46
|
||||
{0x00,0x00,0xC0,0x03,0x30,0x0C,0x10,0x08,0x08,0x10,0x08,0x10,0x88,0x10,0x88,0x10,0xF8,0x18,0x00,0x00}, // 0x47
|
||||
{0x00,0x00,0xF8,0x1F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xF8,0x1F,0x00,0x00,0x00,0x00}, // 0x48
|
||||
{0x00,0x00,0x08,0x10,0x08,0x10,0x08,0x10,0xF8,0x1F,0x08,0x10,0x08,0x10,0x08,0x10,0x00,0x00,0x00,0x00}, // 0x49
|
||||
{0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x10,0x08,0x10,0x08,0x10,0xF0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x4A
|
||||
{0x00,0x00,0xF8,0x1F,0x00,0x01,0x80,0x01,0x40,0x02,0x20,0x04,0x20,0x08,0x10,0x10,0x08,0x00,0x00,0x00}, // 0x4B
|
||||
{0x00,0x00,0xF8,0x1F,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x4C
|
||||
{0xF8,0x1F,0x00,0x1C,0x80,0x07,0xE0,0x00,0x60,0x00,0x80,0x03,0x00,0x1C,0xF8,0x1F,0x00,0x00,0x00,0x00}, // 0x4D
|
||||
{0x00,0x00,0xF8,0x1F,0x00,0x08,0x00,0x06,0x80,0x01,0x60,0x00,0x10,0x00,0xF8,0x1F,0x00,0x00,0x00,0x00}, // 0x4E
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x08,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x10,0x08,0xE0,0x07,0x00,0x00}, // 0x4F
|
||||
{0x00,0x00,0xF8,0x1F,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x00,0x11,0x00,0x0E,0x00,0x00,0x00,0x00}, // 0x50
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x08,0x08,0x10,0x08,0x10,0x08,0x10,0x0C,0x10,0x12,0x08,0xE2,0x07,0x00,0x00}, // 0x51
|
||||
{0x00,0x00,0xF8,0x1F,0x80,0x10,0x80,0x10,0xC0,0x10,0x20,0x11,0x10,0x0E,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x52
|
||||
{0x00,0x00,0x18,0x0E,0x08,0x12,0x08,0x11,0x08,0x11,0x88,0x10,0x90,0x10,0x70,0x18,0x00,0x00,0x00,0x00}, // 0x53
|
||||
{0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xF8,0x1F,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x00}, // 0x54
|
||||
{0x00,0x00,0xE0,0x1F,0x18,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0xE0,0x1F,0x00,0x00,0x00,0x00}, // 0x55
|
||||
{0x00,0x10,0x00,0x0C,0x80,0x03,0x60,0x00,0x18,0x00,0x18,0x00,0xE0,0x00,0x00,0x03,0x00,0x0C,0x00,0x10}, // 0x56
|
||||
{0x00,0x18,0xC0,0x07,0x38,0x00,0xF0,0x00,0x00,0x07,0x80,0x03,0x70,0x00,0x38,0x00,0xC0,0x07,0x00,0x18}, // 0x57
|
||||
{0x08,0x10,0x10,0x08,0x20,0x04,0x40,0x02,0x80,0x01,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10}, // 0x58
|
||||
{0x00,0x10,0x00,0x08,0x00,0x06,0x00,0x01,0xF8,0x00,0x00,0x01,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x10}, // 0x59
|
||||
{0x00,0x00,0x18,0x10,0x28,0x10,0x48,0x10,0x88,0x10,0x08,0x11,0x08,0x12,0x08,0x14,0x08,0x18,0x00,0x00}, // 0x5A
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0x02,0x40,0x02,0x40,0x02,0x40,0x02,0x40,0x00,0x00,0x00,0x00}, // 0x5B
|
||||
{0x00,0x00,0x00,0x40,0x00,0x30,0x00,0x0C,0x00,0x03,0xC0,0x00,0x30,0x00,0x0C,0x00,0x02,0x00,0x00,0x00}, // 0x5C
|
||||
{0x00,0x00,0x02,0x40,0x02,0x40,0x02,0x40,0x02,0x40,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x5D
|
||||
{0x00,0x00,0x20,0x00,0xC0,0x00,0x00,0x07,0x00,0x1C,0x00,0x70,0x00,0x0E,0xC0,0x01,0x20,0x00,0x00,0x00}, // 0x5E
|
||||
{0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00}, // 0x5F
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x60
|
||||
{0x00,0x00,0x30,0x00,0x48,0x04,0x88,0x04,0x88,0x04,0x90,0x04,0xF8,0x03,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x61
|
||||
{0x00,0x00,0xF8,0x7F,0x10,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x10,0x06,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x62
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x08,0x04,0x08,0x04,0x00,0x00,0x00,0x00}, // 0x63
|
||||
{0x00,0x00,0xE0,0x01,0x18,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x10,0x02,0xF8,0x7F,0x00,0x00,0x00,0x00}, // 0x64
|
||||
{0x00,0x00,0xE0,0x01,0x90,0x02,0x88,0x04,0x88,0x04,0x88,0x04,0x88,0x04,0x88,0x03,0x00,0x00,0x00,0x00}, // 0x65
|
||||
{0x00,0x00,0x00,0x04,0x00,0x04,0xF8,0x3F,0x00,0x24,0x00,0x44,0x00,0x44,0x00,0x44,0x00,0x44,0x00,0x00}, // 0x66
|
||||
{0x00,0x00,0xE0,0x01,0x19,0x02,0x09,0x04,0x09,0x04,0x09,0x04,0x12,0x02,0xFC,0x07,0x00,0x00,0x00,0x00}, // 0x67
|
||||
{0x00,0x00,0xF8,0x7F,0x00,0x01,0x00,0x02,0x00,0x04,0x00,0x04,0x00,0x04,0xF8,0x03,0x00,0x00,0x00,0x00}, // 0x68
|
||||
{0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x64,0xF8,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x69
|
||||
{0x00,0x00,0x01,0x00,0x01,0x04,0x01,0x04,0x01,0x64,0xFE,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6A
|
||||
{0x00,0x00,0xF8,0x7F,0x80,0x00,0xC0,0x00,0x20,0x01,0x20,0x02,0x10,0x02,0x08,0x04,0x00,0x00,0x00,0x00}, // 0x6B
|
||||
{0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0x40,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x6C
|
||||
{0xF8,0x07,0x00,0x02,0x00,0x04,0x00,0x04,0xF8,0x03,0x00,0x02,0x00,0x04,0x00,0x04,0xF8,0x03,0x00,0x00}, // 0x6D
|
||||
{0x00,0x00,0xF8,0x07,0x00,0x03,0x00,0x02,0x00,0x04,0x00,0x04,0x00,0x04,0xF8,0x03,0x00,0x00,0x00,0x00}, // 0x6E
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x10,0x02,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x6F
|
||||
{0x00,0x00,0xFF,0x07,0x10,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x10,0x06,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x70
|
||||
{0x00,0x00,0xE0,0x01,0x18,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x10,0x02,0xFF,0x07,0x00,0x00,0x00,0x00}, // 0x71
|
||||
{0x00,0x00,0x00,0x00,0xF8,0x07,0x00,0x01,0x00,0x02,0x00,0x04,0x00,0x04,0x00,0x07,0x00,0x00,0x00,0x00}, // 0x72
|
||||
{0x00,0x00,0x18,0x03,0x88,0x04,0x88,0x04,0x48,0x04,0x48,0x04,0x30,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x73
|
||||
{0x00,0x00,0x00,0x04,0x00,0x04,0xF0,0x1F,0x08,0x04,0x08,0x04,0x08,0x04,0x08,0x04,0x00,0x00,0x00,0x00}, // 0x74
|
||||
{0x00,0x00,0xF0,0x07,0x08,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x75
|
||||
{0x00,0x04,0x80,0x03,0x60,0x00,0x18,0x00,0x08,0x00,0x30,0x00,0xC0,0x00,0x00,0x03,0x00,0x04,0x00,0x00}, // 0x76
|
||||
{0x00,0x06,0xE0,0x01,0x18,0x00,0x70,0x00,0x80,0x03,0x80,0x01,0x70,0x00,0x18,0x00,0xE0,0x01,0x00,0x06}, // 0x77
|
||||
{0x00,0x00,0x08,0x04,0x10,0x02,0x20,0x01,0xC0,0x00,0xC0,0x00,0x20,0x01,0x10,0x02,0x08,0x04,0x00,0x00}, // 0x78
|
||||
{0x01,0x04,0x01,0x03,0xC1,0x00,0x62,0x00,0x1C,0x00,0x18,0x00,0x60,0x00,0x80,0x00,0x00,0x03,0x00,0x04}, // 0x79
|
||||
{0x00,0x00,0x08,0x04,0x18,0x04,0x28,0x04,0x48,0x04,0x88,0x04,0x08,0x05,0x08,0x06,0x08,0x04,0x00,0x00}, // 0x7A
|
||||
{0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x7C,0x3F,0x02,0x40,0x02,0x40,0x02,0x40,0x00,0x00,0x00,0x00}, // 0x7B
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x7C
|
||||
{0x00,0x00,0x00,0x00,0x02,0x40,0x02,0x40,0x02,0x40,0x7C,0x3F,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00}, // 0x7D
|
||||
{0xC0,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x80,0x01}, // 0x7E
|
||||
{0x00,0x00,0xF8,0x01,0x08,0x03,0x08,0x04,0x08,0x08,0x08,0x04,0x08,0x03,0xF8,0x01,0x00,0x00,0x00,0x00}, // 0x7F
|
||||
{0xC0,0x03,0x30,0x0C,0x10,0x08,0x08,0x10,0x08,0x10,0x09,0x10,0x0D,0x10,0x0B,0x18,0x00,0x00,0x00,0x00}, // 0x80
|
||||
{0x00,0x00,0xF0,0x07,0x08,0x20,0x08,0x00,0x08,0x00,0x10,0x20,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x81
|
||||
{0x00,0x00,0xE0,0x01,0x90,0x02,0x88,0x04,0x88,0x24,0x88,0x44,0x88,0x04,0x88,0x03,0x00,0x00,0x00,0x00}, // 0x82
|
||||
{0x00,0x00,0x30,0x00,0x48,0x24,0x88,0x44,0x88,0x44,0x90,0x24,0xF8,0x03,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x83
|
||||
{0x00,0x00,0x30,0x00,0x48,0x24,0x88,0x04,0x88,0x04,0x90,0x24,0xF8,0x03,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x84
|
||||
{0x00,0x00,0x30,0x00,0x48,0x44,0x88,0x24,0x88,0x04,0x90,0x04,0xF8,0x03,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x85
|
||||
{0x00,0x00,0x30,0x00,0x48,0x04,0x88,0x44,0x88,0xA4,0x90,0x44,0xF8,0x03,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x86
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x02,0x08,0x04,0x09,0x04,0x0D,0x04,0x0B,0x04,0x08,0x04,0x00,0x00,0x00,0x00}, // 0x87
|
||||
{0x00,0x00,0xE0,0x01,0x90,0x22,0x88,0x44,0x88,0x44,0x88,0x24,0x88,0x04,0x88,0x03,0x00,0x00,0x00,0x00}, // 0x88
|
||||
{0x00,0x00,0xE0,0x01,0x90,0x02,0x88,0x24,0x88,0x04,0x88,0x04,0x88,0x24,0x88,0x03,0x00,0x00,0x00,0x00}, // 0x89
|
||||
{0x00,0x00,0xE0,0x01,0x90,0x02,0x88,0x44,0x88,0x24,0x88,0x04,0x88,0x04,0x88,0x03,0x00,0x00,0x00,0x00}, // 0x8A
|
||||
{0x00,0x00,0x00,0x04,0x00,0x24,0x00,0x04,0xF8,0x07,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x8B
|
||||
{0x00,0x00,0x00,0x04,0x00,0x24,0x00,0x44,0xF8,0x47,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x8C
|
||||
{0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x44,0xF8,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x8D
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x81,0x40,0x0E,0x40,0x18,0x40,0x0C,0x40,0x83,0xC0,0x00,0x30,0x00,0x08,0x00}, // 0x8E
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x01,0x40,0x4E,0x40,0xB0,0x40,0xB8,0x40,0x4F,0xC0,0x01,0x70,0x00,0x08,0x00}, // 0x8F
|
||||
{0x00,0x00,0xF8,0x1F,0x88,0x10,0x88,0x10,0x88,0x50,0x88,0x90,0x88,0x10,0x08,0x10,0x00,0x00,0x00,0x00}, // 0x90
|
||||
{0x70,0x04,0xC8,0x04,0x88,0x04,0x88,0x04,0xF0,0x03,0x98,0x04,0x88,0x04,0x88,0x04,0x88,0x03,0x00,0x00}, // 0x91
|
||||
{0x08,0x00,0x30,0x00,0xE0,0x01,0x20,0x06,0x20,0x18,0xF8,0x1F,0x88,0x10,0x88,0x10,0x08,0x10,0x00,0x00}, // 0x92
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x22,0x08,0x44,0x08,0x44,0x08,0x24,0x10,0x02,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x93
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x22,0x08,0x04,0x08,0x04,0x08,0x24,0x10,0x02,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x94
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x42,0x08,0x24,0x08,0x04,0x08,0x04,0x10,0x02,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0x95
|
||||
{0x00,0x00,0xF0,0x07,0x08,0x20,0x08,0x40,0x08,0x40,0x10,0x20,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x96
|
||||
{0x00,0x00,0xF0,0x07,0x08,0x40,0x08,0x20,0x08,0x00,0x10,0x00,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x97
|
||||
{0x01,0x04,0x01,0x03,0xC1,0x20,0x62,0x00,0x1C,0x00,0x18,0x20,0x60,0x00,0x80,0x00,0x00,0x03,0x00,0x04}, // 0x98
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x88,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x90,0x10,0x08,0xE0,0x07,0x00,0x00}, // 0x99
|
||||
{0x00,0x00,0xE0,0x1F,0x18,0x80,0x08,0x00,0x08,0x00,0x08,0x00,0x10,0x80,0xE0,0x1F,0x00,0x00,0x00,0x00}, // 0x9A
|
||||
{0x00,0x00,0xE8,0x01,0x10,0x02,0x28,0x04,0xC8,0x04,0x08,0x05,0x10,0x02,0xE0,0x05,0x00,0x00,0x00,0x00}, // 0x9B
|
||||
{0x00,0x00,0x00,0x00,0x08,0x00,0x18,0x02,0xE8,0x3F,0x08,0x42,0x08,0x42,0x08,0x40,0x00,0x00,0x00,0x00}, // 0x9C
|
||||
{0x00,0x00,0xE8,0x07,0x30,0x08,0x68,0x10,0x88,0x10,0x08,0x11,0x08,0x16,0x10,0x0C,0xE0,0x17,0x00,0x00}, // 0x9D
|
||||
{0x00,0x00,0x08,0x04,0x10,0x02,0x20,0x01,0xC0,0x00,0xC0,0x00,0x20,0x01,0x10,0x02,0x08,0x04,0x00,0x00}, // 0x9E
|
||||
{0x00,0x00,0x01,0x00,0x01,0x04,0x01,0x04,0xFE,0x7F,0x00,0x84,0x00,0x84,0x00,0x80,0x00,0x00,0x00,0x00}, // 0x9F
|
||||
{0x00,0x00,0x30,0x00,0x48,0x04,0x88,0x04,0x88,0x24,0x90,0x44,0xF8,0x03,0x08,0x00,0x00,0x00,0x00,0x00}, // 0xA0
|
||||
{0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0xF8,0x27,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xA1
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x02,0x08,0x04,0x08,0x24,0x08,0x44,0x10,0x02,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0xA2
|
||||
{0x00,0x00,0xF0,0x07,0x08,0x00,0x08,0x00,0x08,0x20,0x10,0x40,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xA3
|
||||
{0x00,0x00,0xF8,0x07,0x00,0x23,0x00,0x42,0x00,0x24,0x00,0x24,0x00,0x44,0xF8,0x03,0x00,0x00,0x00,0x00}, // 0xA4
|
||||
{0x00,0x00,0xF8,0x1F,0x00,0x48,0x00,0x86,0x80,0xC1,0x60,0x40,0x10,0x80,0xF8,0x1F,0x00,0x00,0x00,0x00}, // 0xA5
|
||||
{0x00,0x00,0x00,0x00,0x00,0x4C,0x00,0x52,0x00,0x52,0x00,0x52,0x00,0x3E,0x00,0x02,0x00,0x00,0x00,0x00}, // 0xA6
|
||||
{0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x42,0x00,0x42,0x00,0x42,0x00,0x42,0x00,0x3C,0x00,0x00,0x00,0x00}, // 0xA7
|
||||
{0x00,0x00,0x0E,0x00,0x13,0x00,0x11,0x00,0x21,0x00,0xC1,0x06,0x01,0x00,0x07,0x00,0x00,0x00,0x00,0x00}, // 0xA8
|
||||
{0x00,0x00,0x00,0x1C,0x00,0x22,0x00,0x5D,0x00,0x55,0x00,0x5D,0x00,0x22,0x00,0x1C,0x00,0x00,0x00,0x00}, // 0xA9
|
||||
{0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0xE0,0x01,0x00,0x00}, // 0xAA
|
||||
{0x08,0x40,0x30,0x7E,0x40,0x00,0x80,0x01,0x00,0x06,0x00,0x08,0x08,0x31,0x38,0x41,0x28,0x01,0xC8,0x00}, // 0xAB
|
||||
{0x08,0x40,0x30,0x7E,0x40,0x00,0x80,0x01,0x00,0x06,0x60,0x08,0xA0,0x30,0x20,0x41,0xF8,0x01,0x20,0x00}, // 0xAC
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xAD
|
||||
{0x00,0x00,0x80,0x00,0x40,0x01,0x20,0x02,0x10,0x04,0x80,0x00,0x40,0x01,0x20,0x02,0x10,0x04,0x00,0x00}, // 0xAE
|
||||
{0x00,0x00,0x10,0x04,0x20,0x02,0x40,0x01,0x80,0x00,0x10,0x04,0x20,0x02,0x40,0x01,0x80,0x00,0x00,0x00}, // 0xAF
|
||||
{0x36,0xDB,0x36,0xDB,0x00,0x00,0x36,0xDB,0x36,0xDB,0x00,0x00,0x36,0xDB,0x36,0xDB,0x00,0x00,0x00,0x00}, // 0xB0
|
||||
{0xDB,0x36,0xDB,0x36,0x36,0xDB,0xFF,0xFF,0xDB,0x36,0x36,0xDB,0xFF,0xFF,0xDB,0x36,0x36,0xDB,0x36,0xDB}, // 0xB1
|
||||
{0xFF,0xFF,0xFF,0xFF,0x36,0xDB,0xFF,0xFF,0xFF,0xFF,0x36,0xDB,0xFF,0xFF,0xFF,0xFF,0x36,0xDB,0x36,0xDB}, // 0xB2
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xB3
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xB4
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x01,0x40,0x0E,0x40,0x58,0x40,0x8C,0x40,0x03,0xC0,0x00,0x30,0x00,0x08,0x00}, // 0xB5
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x01,0x40,0x4E,0x40,0x98,0x40,0x8C,0x40,0x43,0xC0,0x00,0x30,0x00,0x08,0x00}, // 0xB6
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x01,0x40,0x8E,0x40,0x58,0x40,0x0C,0x40,0x03,0xC0,0x00,0x30,0x00,0x08,0x00}, // 0xB7
|
||||
{0xC0,0x0F,0x30,0x30,0x98,0x67,0xC8,0x4C,0x48,0x48,0x48,0x48,0x58,0x68,0x30,0x30,0xC0,0x0F,0x00,0x00}, // 0xB8
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x7F,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xB9
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xBA
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x7F,0x01,0x00,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xBB
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x40,0xFF,0x40,0x00,0xC0,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xBC
|
||||
{0x00,0x00,0xC0,0x0F,0x20,0x10,0x30,0x20,0x10,0x20,0xF8,0x7F,0x10,0x20,0x10,0x20,0x00,0x00,0x00,0x00}, // 0xBD
|
||||
{0x00,0x40,0x00,0x20,0x20,0x19,0x20,0x05,0xF8,0x03,0x20,0x05,0x20,0x09,0x00,0x10,0x00,0x20,0x00,0x40}, // 0xBE
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xBF
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xC0
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0xFF,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xC1
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xC2
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xC3
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xC4
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0xFF,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xC5
|
||||
{0x00,0x00,0x30,0x00,0x48,0x24,0x88,0x44,0x88,0x24,0x90,0x24,0xF8,0x43,0x08,0x00,0x00,0x00,0x00,0x00}, // 0xC6
|
||||
{0x08,0x00,0x70,0x00,0xC0,0x41,0x40,0x8E,0x40,0xD8,0x40,0x4C,0x40,0x83,0xC0,0x00,0x30,0x00,0x08,0x00}, // 0xC7
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xFF,0x40,0x00,0x40,0xFF,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xC8
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x01,0x00,0x01,0x7F,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xC9
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x40,0xFF,0x40,0x00,0x40,0xFF,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xCA
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x7F,0x01,0x00,0x01,0x7F,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xCB
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x7F,0xFF,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xCC
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xCD
|
||||
{0x40,0x01,0x40,0x01,0x40,0x01,0x7F,0xFF,0x00,0x00,0x7F,0xFF,0x40,0x01,0x40,0x01,0x40,0x01,0x40,0x01}, // 0xCE
|
||||
{0x00,0x00,0x20,0x10,0xC0,0x0F,0x40,0x08,0x40,0x08,0x40,0x08,0x40,0x08,0xC0,0x0F,0x20,0x10,0x00,0x00}, // 0xCF
|
||||
{0x00,0x00,0xE0,0x41,0x10,0x52,0x08,0x74,0x08,0x24,0x08,0x54,0x10,0x0E,0xE0,0x03,0x00,0x00,0x00,0x00}, // 0xD0
|
||||
{0x00,0x01,0xF8,0x1F,0x08,0x11,0x08,0x11,0x08,0x10,0x08,0x10,0x10,0x08,0xE0,0x07,0x00,0x00,0x00,0x00}, // 0xD1
|
||||
{0x00,0x00,0xF8,0x1F,0x88,0x10,0x88,0x50,0x88,0x90,0x88,0x90,0x88,0x50,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xD2
|
||||
{0x00,0x00,0xF8,0x1F,0x88,0x90,0x88,0x10,0x88,0x10,0x88,0x10,0x88,0x90,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xD3
|
||||
{0x00,0x00,0xF8,0x1F,0x88,0x10,0x88,0x10,0x88,0x90,0x88,0x50,0x88,0x10,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xD4
|
||||
{0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xD5
|
||||
{0x00,0x00,0x08,0x10,0x08,0x10,0x08,0x10,0xF8,0x5F,0x08,0x90,0x08,0x10,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xD6
|
||||
{0x00,0x00,0x08,0x10,0x08,0x10,0x08,0x50,0xF8,0x9F,0x08,0x90,0x08,0x50,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xD7
|
||||
{0x00,0x00,0x08,0x10,0x08,0x90,0x08,0x10,0xF8,0x1F,0x08,0x10,0x08,0x90,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xD8
|
||||
{0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xD9
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00}, // 0xDA
|
||||
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, // 0xDB
|
||||
{0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00}, // 0xDC
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xDD
|
||||
{0x00,0x00,0x08,0x10,0x08,0x10,0x08,0x90,0xF8,0x5F,0x08,0x10,0x08,0x10,0x08,0x10,0x00,0x00,0x00,0x00}, // 0xDE
|
||||
{0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF}, // 0xDF
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x08,0x08,0x10,0x08,0x50,0x08,0x90,0x08,0x10,0x10,0x08,0xE0,0x07,0x00,0x00}, // 0xE0
|
||||
{0x00,0x00,0xF8,0x3F,0x00,0x40,0x00,0x40,0x08,0x47,0x88,0x38,0x48,0x00,0x30,0x00,0x00,0x00,0x00,0x00}, // 0xE1
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x08,0x08,0x50,0x08,0x90,0x08,0x90,0x08,0x50,0x10,0x08,0xE0,0x07,0x00,0x00}, // 0xE2
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x08,0x08,0x90,0x08,0x50,0x08,0x10,0x08,0x10,0x10,0x08,0xE0,0x07,0x00,0x00}, // 0xE3
|
||||
{0x00,0x00,0xE0,0x01,0x10,0x22,0x08,0x44,0x08,0x24,0x08,0x24,0x10,0x42,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0xE4
|
||||
{0x00,0x00,0xE0,0x07,0x10,0x48,0x08,0x90,0x08,0xD0,0x08,0x50,0x08,0x90,0x10,0x08,0xE0,0x07,0x00,0x00}, // 0xE5
|
||||
{0x00,0x00,0xFF,0x07,0x10,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0xF8,0x07,0x00,0x00,0x00,0x00}, // 0xE6
|
||||
{0x00,0x00,0xFF,0x7F,0x10,0x02,0x08,0x04,0x08,0x04,0x08,0x04,0x10,0x06,0xE0,0x01,0x00,0x00,0x00,0x00}, // 0xE7
|
||||
{0x00,0x00,0xF8,0x1F,0x20,0x04,0x20,0x04,0x20,0x04,0x20,0x04,0x40,0x04,0x80,0x03,0x00,0x00,0x00,0x00}, // 0xE8
|
||||
{0x00,0x00,0xE0,0x1F,0x18,0x00,0x08,0x00,0x08,0x40,0x08,0x80,0x10,0x00,0xE0,0x1F,0x00,0x00,0x00,0x00}, // 0xE9
|
||||
{0x00,0x00,0xE0,0x1F,0x18,0x00,0x08,0x40,0x08,0x80,0x08,0x80,0x10,0x40,0xE0,0x1F,0x00,0x00,0x00,0x00}, // 0xEA
|
||||
{0x00,0x00,0xE0,0x1F,0x18,0x00,0x08,0x80,0x08,0x40,0x08,0x00,0x10,0x00,0xE0,0x1F,0x00,0x00,0x00,0x00}, // 0xEB
|
||||
{0x01,0x04,0x01,0x03,0xC1,0x00,0x62,0x00,0x1C,0x20,0x18,0x40,0x60,0x00,0x80,0x00,0x00,0x03,0x00,0x04}, // 0xEC
|
||||
{0x00,0x10,0x00,0x08,0x00,0x06,0x00,0x01,0xF8,0x40,0x00,0x81,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x10}, // 0xED
|
||||
{0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80}, // 0xEE
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEF
|
||||
{0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00}, // 0xF0
|
||||
{0x00,0x00,0x08,0x01,0x08,0x01,0x08,0x01,0x08,0x01,0xC8,0x07,0x08,0x01,0x08,0x01,0x08,0x01,0x00,0x00}, // 0xF1
|
||||
{0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00}, // 0xF2
|
||||
{0x08,0x42,0x10,0x52,0x20,0x5A,0xC0,0x6C,0x00,0x01,0x60,0x02,0xA0,0x0C,0x20,0x11,0xF8,0x21,0x20,0x40}, // 0xF3
|
||||
{0x00,0x00,0x00,0x38,0x00,0x7C,0x00,0x7E,0xFE,0x7F,0x00,0x40,0x00,0x40,0xFE,0x7F,0x00,0x00,0x00,0x00}, // 0xF4
|
||||
{0x00,0x00,0x00,0x00,0x86,0x3B,0xC2,0x4C,0x42,0x44,0x62,0x46,0x32,0x42,0xDC,0x41,0x00,0x00,0x00,0x00}, // 0xF5
|
||||
{0x00,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x58,0x06,0x58,0x06,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00}, // 0xF6
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF7
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x48,0x00,0x48,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF8
|
||||
{0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF9
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFA
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFB
|
||||
{0x00,0x00,0x00,0x00,0x00,0x42,0x00,0x52,0x00,0x52,0x00,0x52,0x00,0x6C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFC
|
||||
{0x00,0x00,0x00,0x00,0x00,0x42,0x00,0x46,0x00,0x4A,0x00,0x4A,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFD
|
||||
{0x00,0x00,0xF8,0x07,0xF8,0x07,0xF8,0x07,0xF8,0x07,0xF8,0x07,0xF8,0x07,0xF8,0x07,0xF8,0x07,0x00,0x00}, // 0xFE
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
|
||||
};
|
||||
347
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/main.c → ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/main.cpp
Executable file → Normal file
347
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/main.c → ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/main.cpp
Executable file → Normal file
@@ -1,46 +1,59 @@
|
||||
#include "main.h"
|
||||
// #include "main.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "epd_interface.h"
|
||||
#include "powermgt.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#include "settings.h"
|
||||
extern "C" {
|
||||
|
||||
#include "comms.h"
|
||||
#include "core_cm3.h"
|
||||
#include "eeprom.h"
|
||||
#include "epd.h"
|
||||
#include "gpio.h"
|
||||
#include "mz100.h"
|
||||
#include "mz100_aon_ram.h"
|
||||
#include "mz100_clock.h"
|
||||
#include "mz100_flash.h"
|
||||
#include "mz100_gpio.h"
|
||||
#include "mz100_pinmux.h"
|
||||
#include "mz100_pmu.h"
|
||||
#include "mz100_sleep.h"
|
||||
#include "mz100_ssp.h"
|
||||
#include "mz100_uart.h"
|
||||
#include "powermgt.h"
|
||||
#include "printf.h"
|
||||
#include "mz100/core_cm3.h"
|
||||
#include "mz100/eeprom.h"
|
||||
|
||||
#include "mz100/gpio.h"
|
||||
#include "mz100/mz100.h"
|
||||
#include "mz100/mz100_aon_ram.h"
|
||||
#include "mz100/mz100_clock.h"
|
||||
#include "mz100/mz100_flash.h"
|
||||
#include "mz100/mz100_gpio.h"
|
||||
#include "mz100/mz100_pinmux.h"
|
||||
#include "mz100/mz100_pmu.h"
|
||||
#include "mz100/mz100_sleep.h"
|
||||
#include "mz100/mz100_ssp.h"
|
||||
#include "mz100/mz100_uart.h"
|
||||
#include "mz100/printf.h"
|
||||
#include "proto.h"
|
||||
#include "settings.h"
|
||||
#include "syncedproto.h"
|
||||
#include "timer.h"
|
||||
#include "userinterface.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "mz100/timer.h"
|
||||
|
||||
#include "mz100/util.h"
|
||||
#include "zigbee.h"
|
||||
extern void dump(const uint8_t *a, const uint16_t l);
|
||||
}
|
||||
|
||||
#include "oepl-protocol.h"
|
||||
|
||||
#include "compression.h"
|
||||
#include "userinterface.h"
|
||||
|
||||
#include "oepl_fs.h"
|
||||
|
||||
#define SW_VER_CURRENT (0x0000011300000000ull) // top 16 bits are off limits, xxxx.VV.tt.vvvv.mmmm means version V.t.v.m
|
||||
#define SW_DEFAULT_MAC (0x0000000000000014ull)
|
||||
#define FW_MAGIC (0x14AFEEBCDC14AE5Aull)
|
||||
|
||||
uint64_t __attribute__((section(".ver"))) mCurVersionExport = SW_VER_CURRENT;
|
||||
uint64_t __attribute__((section(".default_mac"))) default_mac = SW_DEFAULT_MAC;
|
||||
|
||||
char macStr[32];
|
||||
char macStr1[32];
|
||||
// uint8_t mSelfMac[8];
|
||||
uint64_t __attribute__((section(".fwmagic"))) magic = FW_MAGIC;
|
||||
|
||||
#define TAG_MODE_CHANSEARCH 0
|
||||
#define TAG_MODE_ASSOCIATED 1
|
||||
#define TAG_MODE_DEEPSLEEP 0x10
|
||||
|
||||
__attribute__((section(".aon"))) uint8_t currentTagMode = TAG_MODE_CHANSEARCH;
|
||||
__attribute__((section(".aon"))) volatile struct zigbeeCalibDataStruct zigbeeCalibData;
|
||||
@@ -51,8 +64,8 @@ bool protectedFlashWrite(uint32_t address, uint8_t *buffer, uint32_t num) {
|
||||
while (attempt--) {
|
||||
qspiEraseRange(address, num);
|
||||
delay(50);
|
||||
FLASH_Write(false, address, buffer, num);
|
||||
FLASH_Read(0, address, buf2, num);
|
||||
FLASH_Write((FLASH_ProgramMode_Type) false, address, buffer, num);
|
||||
FLASH_Read((FLASH_ReadMode_Type)0, address, buf2, num);
|
||||
if (memcmp(buffer, buf2, num) == 0) {
|
||||
printf("Flash block at %06X written successfully\n", address);
|
||||
free(buf2);
|
||||
@@ -65,17 +78,18 @@ bool protectedFlashWrite(uint32_t address, uint8_t *buffer, uint32_t num) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static void prvGetSelfMac(void) {
|
||||
FLASH_Read(0, EEPROM_MAC_INFO_START, mSelfMac, 8);
|
||||
|
||||
static void initTagProfile() {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
mSelfMac[c] = tagProfile.macAddress[7 - c];
|
||||
}
|
||||
if ((((uint32_t *)mSelfMac)[0] | ((uint32_t *)mSelfMac)[1]) == 0 || (((uint32_t *)mSelfMac)[0] & ((uint32_t *)mSelfMac)[1]) == 0xffffffff) { // fastest way to check for all ones or all zeroes
|
||||
|
||||
printf("mac unknown\r\n");
|
||||
// Write a blank mac to have something to work with.
|
||||
memcpy(&mSelfMac, (uint8_t *)&default_mac, 8);
|
||||
FLASH_Write(0, EEPROM_MAC_INFO_START, mSelfMac, 8);
|
||||
// sleep_with_with_wakeup(0);
|
||||
printf("MAC: mac unknown, taking random Flash ID\n");
|
||||
*((uint64_t *)&tagProfile.macAddress) = FLASH_GetUniqueID();
|
||||
}
|
||||
|
||||
tag.imageSize = flashRoundUp(sizeof(struct EepromImageHeader) + (tagProfile.xRes * tagProfile.yRes * tagProfile.bpp) / 8);
|
||||
tag.OEPLtype = tagProfile.OEPLType;
|
||||
}
|
||||
|
||||
uint8_t showChannelSelect() { // returns 0 if no accesspoints were found
|
||||
@@ -88,7 +102,9 @@ uint8_t showChannelSelect() { // returns 0 if no accesspoints were found
|
||||
if (detectAP(channelList[c])) {
|
||||
if (mLastLqi > result[c])
|
||||
result[c] = mLastLqi;
|
||||
printf("Channel: %d - LQI: %d RSSI %d\n", channelList[c], mLastLqi, mLastRSSI);
|
||||
#ifdef DEBUG_MAIN
|
||||
printf("MAIN: Channel: %d - LQI: %d RSSI %d\n", channelList[c], mLastLqi, mLastRSSI);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,6 +150,7 @@ uint8_t channelSelect() { // returns 0 if no accesspoints were found
|
||||
|
||||
void __attribute__((interrupt)) NMIException(void) {
|
||||
printf("-----------> NMIException\r\n");
|
||||
delay(1000);
|
||||
PMU->CLK_SRC.BF.MAIN_CLK_SOURCE = 1;
|
||||
PMU->PWR_MODE.BF.PWR_MODE = 0;
|
||||
NVIC_SystemReset();
|
||||
@@ -168,25 +185,42 @@ void __attribute__((interrupt)) UsageFaultException(void) {
|
||||
}
|
||||
|
||||
void __attribute__((interrupt)) SVCHandler(void) {
|
||||
printf("-----------> SVCHandler\r\n");
|
||||
PMU->CLK_SRC.BF.MAIN_CLK_SOURCE = 1;
|
||||
PMU->PWR_MODE.BF.PWR_MODE = 0;
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void __attribute__((interrupt)) DebugMonitor(void) {
|
||||
printf("-----------> DebugMonitor\r\n");
|
||||
PMU->CLK_SRC.BF.MAIN_CLK_SOURCE = 1;
|
||||
PMU->PWR_MODE.BF.PWR_MODE = 0;
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void __attribute__((interrupt)) PendSVC(void) {
|
||||
printf("-----------> PendSVC\r\n");
|
||||
PMU->CLK_SRC.BF.MAIN_CLK_SOURCE = 1;
|
||||
PMU->PWR_MODE.BF.PWR_MODE = 0;
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void setupRTC() {
|
||||
CLK_Xtal32MEnable(CLK_OSC_INTERN);
|
||||
while (!CLK_GetClkStatus(CLK_OUT_XTAL64M))
|
||||
;
|
||||
int32_t setupRTC(uint32_t calibrate) {
|
||||
// CLK_Xtal32MEnable(CLK_OSC_INTERN);
|
||||
// while (!CLK_GetClkStatus(CLK_OUT_XTAL64M))
|
||||
// ;
|
||||
RC32K_CalClk_Div(63, 31);
|
||||
CLK_ModuleClkEnable(CLK_RC32K_CAL);
|
||||
CLK_RC32KEnable();
|
||||
while (!CLK_GetClkStatus(CLK_OUT_RC32K))
|
||||
;
|
||||
PMU->RC32K_CAL_CNTL.BF.RC32K_CAL_DIV = 0;
|
||||
CLK_RC32KCalibration(CLK_RC32KCAL_XTAL64M, CLK_AUTO_CAL, 0);
|
||||
int32_t calres;
|
||||
if (!calibrate) {
|
||||
calres = CLK_RC32KCalibration(CLK_RC32KCAL_XTAL64M, CLK_AUTO_CAL, 0);
|
||||
} else {
|
||||
calres = CLK_RC32KCalibration(CLK_RC32KCAL_XTAL64M, CLK_MANUAL_CAL, calibrate);
|
||||
}
|
||||
CLK_ModuleClkEnable(CLK_RTC);
|
||||
CLK_RTCClkSrc(CLK_RTC_RC32K);
|
||||
RTC_Stop();
|
||||
@@ -199,6 +233,7 @@ void setupRTC() {
|
||||
NVIC_ClearPendingIRQ(RTC_IRQn);
|
||||
RTC_IntMask(RTC_INT_CNT_UPP, UNMASK);
|
||||
NVIC_EnableIRQ(RTC_IRQn);
|
||||
return calres;
|
||||
}
|
||||
|
||||
void setupUART() {
|
||||
@@ -210,41 +245,30 @@ void setupUART() {
|
||||
UART_CFG_Type uartcfg;
|
||||
uartcfg.baudRate = 115200;
|
||||
uartcfg.dataBits = UART_DATABITS_8;
|
||||
uartcfg.stopBits = 1;
|
||||
uartcfg.stopBits = (UART_StopBits_Type)1;
|
||||
uartcfg.parity = UART_PARITY_NONE;
|
||||
uartcfg.autoFlowControl = DISABLE;
|
||||
UART_Init(1, &uartcfg);
|
||||
UART_Init((UART_ID_Type)1, &uartcfg);
|
||||
|
||||
UART_FIFO_Type uartFifo;
|
||||
uartFifo.FIFO_ResetRx = 1;
|
||||
uartFifo.FIFO_ResetTx = 1;
|
||||
uartFifo.FIFO_Function = 1;
|
||||
uartFifo.FIFO_RcvrTrigger = 2;
|
||||
uartFifo.FIFO_TxEmptyTrigger = 3;
|
||||
UART_FIFOConfig(1, &uartFifo);
|
||||
uartFifo.FIFO_ResetRx = (FunctionalState)1;
|
||||
uartFifo.FIFO_ResetTx = (FunctionalState)1;
|
||||
uartFifo.FIFO_Function = (FunctionalState)1;
|
||||
uartFifo.FIFO_RcvrTrigger = (UART_RxFIFOLevel_Type)2;
|
||||
uartFifo.FIFO_TxEmptyTrigger = (UART_TxFIFOLevel_Type)3;
|
||||
UART_FIFOConfig((UART_ID_Type)1, &uartFifo);
|
||||
// UART 1 DEBUG OUT
|
||||
}
|
||||
|
||||
void setupWDT() {
|
||||
//** WATCHDOG
|
||||
CLK_ModuleClkEnable(CLK_WDT);
|
||||
WDT_SetMode(WDT_MODE_RESET);
|
||||
WDT_SetResetPulseLen(WDT_RESET_PULSE_LEN_256);
|
||||
WDT_SetTimeoutVal(30);
|
||||
WDT_RestartCounter();
|
||||
WDT_Enable();
|
||||
//** WATCHDOG
|
||||
}
|
||||
|
||||
void setupGPIO() {
|
||||
//** GPIOS
|
||||
init_GPIO_boot();
|
||||
// NFC POWER Should be on if NFC is wanted to be used
|
||||
GPIO_PinOutputModeConfig(NFC_POWER, PIN_OUTPUT_MODE_NORMAL_FUNCTION);
|
||||
GPIO_PinModeConfig(NFC_POWER, PINMODE_DEFAULT);
|
||||
GPIO_PinMuxFun(NFC_POWER, 0);
|
||||
GPIO_PinMuxFun(NFC_POWER, (GPIO_PinMuxFunc_Type)0);
|
||||
GPIO_SetPinDir(NFC_POWER, GPIO_OUTPUT);
|
||||
GPIO_WritePinOutput(NFC_POWER, 1); // Better power NFC up so IRQ will work unpowered later
|
||||
GPIO_WritePinOutput(NFC_POWER, (GPIO_IO_Type)1); // Better power NFC up so IRQ will work unpowered later
|
||||
//** GPIOS
|
||||
if (!(~(*(volatile unsigned int *)0x4A080000) << 30)) {
|
||||
NVIC_EnableIRQ(ExtPin5_IRQn);
|
||||
@@ -252,9 +276,9 @@ void setupGPIO() {
|
||||
}
|
||||
}
|
||||
|
||||
void setupCLKCalib() {
|
||||
int32_t setupCLKCalib() {
|
||||
(*(volatile unsigned int *)0x4A070004) = ((*(volatile unsigned int *)0x4A070004) & 0xFFFFFFE0) + 2;
|
||||
PMU->PWR_MODE.BF.PWR_MODE = 2;
|
||||
// PMU->PWR_MODE.BF.PWR_MODE = 2; // hmmm
|
||||
uint32_t v0 = FLASH_WordRead(FLASH_NORMAL_READ, 4u);
|
||||
char v1;
|
||||
if (!(~v0 << 25)) {
|
||||
@@ -263,6 +287,19 @@ void setupCLKCalib() {
|
||||
;
|
||||
v1 = CLK_RC32MCalibration(CLK_AUTO_CAL, 0);
|
||||
FLASH_WordWrite(FLASH_PROGRAM_NORMAL, 4u, (v0 & 0xFFFFFF00) | (v1 & 0x7F));
|
||||
return v1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void checkWDT() {
|
||||
uint32_t val1 = WDT_GetCounterVal();
|
||||
delay(10000);
|
||||
uint32_t val2 = WDT_GetCounterVal();
|
||||
if (val1 == val2) {
|
||||
printf("WDT: Not running!\n");
|
||||
} else {
|
||||
printf("WDT: 1: %lu 2: %lu divider is now %lu\n", val1, val2, (val2 - val1) / 10000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,22 +319,27 @@ void TagAssociated() {
|
||||
|
||||
// check if the battery level is below minimum, and force a redraw of the screen
|
||||
|
||||
if ((lowBattery && !lowBatteryShown && tagSettings.enableLowBatSymbol) || (noAPShown && tagSettings.enableNoRFSymbol)) {
|
||||
printf("For some reason, we're going to redraw the image. lowbat=%d, lowbatshown=%d, noAPShown=%d\n", lowBattery, lowBatteryShown, noAPShown);
|
||||
if ((lowBattery && !lowBatteryShown && tagSettings.enableLowBatSymbol) ||
|
||||
(!lowBattery && lowBatteryShown) ||
|
||||
(noAPShown && tagSettings.enableNoRFSymbol)) {
|
||||
// Check if we were already displaying an image
|
||||
if (curImgSlot != 0xFF) {
|
||||
powerUp(INIT_EEPROM | INIT_EPD);
|
||||
wdt60s();
|
||||
drawImageFromEeprom(curImgSlot);
|
||||
drawImageFromEeprom(curImgSlot, 0);
|
||||
powerDown(INIT_EEPROM | INIT_EPD);
|
||||
} else {
|
||||
powerUp(INIT_EPD);
|
||||
wdt60s();
|
||||
showAPFound();
|
||||
powerDown(INIT_EPD);
|
||||
wdt60s();
|
||||
}
|
||||
}
|
||||
|
||||
powerUp(INIT_RADIO);
|
||||
#ifdef DEBUG_MAIN
|
||||
printf("MAIN: full request\n");
|
||||
#endif
|
||||
avail = getAvailDataInfo();
|
||||
avail = getAvailDataInfo();
|
||||
powerDown(INIT_RADIO);
|
||||
|
||||
@@ -369,12 +411,13 @@ void TagChanSearch() {
|
||||
// Check if we should redraw the screen with icons, info screen or screensaver
|
||||
if ((!currentChannel && !noAPShown && tagSettings.enableNoRFSymbol) ||
|
||||
(lowBattery && !lowBatteryShown && tagSettings.enableLowBatSymbol) ||
|
||||
(!lowBattery && lowBatteryShown) ||
|
||||
(scanAttempts == (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS - 1))) {
|
||||
powerUp(INIT_EPD);
|
||||
wdt60s();
|
||||
if (curImgSlot != 0xFF) {
|
||||
powerUp(INIT_EEPROM);
|
||||
drawImageFromEeprom(curImgSlot);
|
||||
drawImageFromEeprom(curImgSlot, 0);
|
||||
powerDown(INIT_EEPROM);
|
||||
} else if ((scanAttempts >= (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS - 1))) {
|
||||
showLongTermSleep();
|
||||
@@ -386,80 +429,112 @@ void TagChanSearch() {
|
||||
|
||||
// did we find a working channel?
|
||||
if (currentChannel) {
|
||||
#ifdef DEBUG_PROTO
|
||||
printf("PROTO: Found a working channel from the TagChanSearch loop\n");
|
||||
#endif
|
||||
// now associated! set up and bail out of this loop.
|
||||
scanAttempts = 0;
|
||||
wakeUpReason = WAKEUP_REASON_NETWORK_SCAN;
|
||||
initPowerSaving(INTERVAL_BASE);
|
||||
doSleep(getNextSleep() * 1000UL);
|
||||
currentTagMode = TAG_MODE_ASSOCIATED;
|
||||
sleep_with_with_wakeup(getNextSleep() * 1000UL);
|
||||
return;
|
||||
} else {
|
||||
// still not associated
|
||||
doSleep(getNextScanSleep(true) * 1000UL);
|
||||
sleep_with_with_wakeup(getNextScanSleep(true) * 1000UL);
|
||||
}
|
||||
}
|
||||
|
||||
void tagDeepSleep() {
|
||||
printf("MAIN: long sleepy\n");
|
||||
sleep_with_with_wakeup(1800 * 1000UL);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
(*(volatile unsigned int *)0x20124000) = 0x100004; // On WARM RESET: Goto this address. -> entry
|
||||
(*(volatile unsigned int *)0xE000ED08) = 0x20100000; // Vector table in RAM and offset 0x4000
|
||||
(*(volatile unsigned int *)0xE000E41A) = 0x40; // ??
|
||||
|
||||
timerInit();
|
||||
|
||||
CLK_SystemClkInit(CLK_SYS_XTAL64M, CLK_SYS_64M);
|
||||
CLK_Xtal32MEnable(CLK_OSC_INTERN);
|
||||
while (CLK_GetClkStatus(CLK_OUT_XTAL64M) != 1)
|
||||
;
|
||||
|
||||
setupUART();
|
||||
setupCLKCalib();
|
||||
if (!loadValidateAonRam() || PMU_GetLastResetCause()) {
|
||||
setupWDT();
|
||||
// cold boot!
|
||||
printf("BOOT: Cold boot!\n");
|
||||
// calibrate the 32K RC oscillator (autocal), we'll store the result to flash later
|
||||
uint32_t rtccal = setupRTC(0);
|
||||
setupGPIO();
|
||||
setupCLKCalib();
|
||||
setupUART();
|
||||
printf("Rst reason: %i\r\n", PMU_GetLastResetCause());
|
||||
printf("AON is not valid!\n");
|
||||
setupRTC();
|
||||
clearAonRam();
|
||||
timerInit();
|
||||
setupWDT();
|
||||
|
||||
clearAonRam();
|
||||
// all variables are set to 0 now. This might not be appropriate for all variables, such as:
|
||||
curImgSlot = 0xFF;
|
||||
|
||||
// try to load settings
|
||||
if (!loadSettings()) {
|
||||
// if we couldn't load settings, we'll try to get it from the tagprofile file. Useful during development
|
||||
fs->init();
|
||||
if (!loadProfileFromFile((char *)"tagprofile.bin")) {
|
||||
// whoops. Empty profile, that shouldn't really ever happen, ever.
|
||||
printf("We don't know the type of this tag. That's kinda bad, I guess...\n");
|
||||
} else {
|
||||
fs->deleteFile((char *)"tagprofile.bin");
|
||||
}
|
||||
} else {
|
||||
printf("BOOT: Loaded tag settings from EEPROM\n");
|
||||
}
|
||||
printf("BOOT: MAC: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", tagProfile.macAddress[0], tagProfile.macAddress[1], tagProfile.macAddress[2], tagProfile.macAddress[3], tagProfile.macAddress[4], tagProfile.macAddress[5], tagProfile.macAddress[6], tagProfile.macAddress[7]);
|
||||
tagProfile.RC32Kcal = rtccal;
|
||||
|
||||
printf("BOOT: Rst reason: %i\r\n", PMU_GetLastResetCause());
|
||||
|
||||
initTagProfile();
|
||||
|
||||
wdt10s();
|
||||
showSplashScreen();
|
||||
delay(10000);
|
||||
currentChannel = 0;
|
||||
zigbeeCalibData.isValid = false;
|
||||
wakeUpReason = WAKEUP_REASON_FIRSTBOOT;
|
||||
prvGetSelfMac();
|
||||
initializeProto();
|
||||
printf("Erz data\r\n");
|
||||
initPowerSaving(INTERVAL_BASE);
|
||||
loadDefaultSettings();
|
||||
|
||||
doVoltageReading();
|
||||
|
||||
qspiEraseRange(EEPROM_SETTINGS_AREA_START, EEPROM_SETTINGS_AREA_LEN);
|
||||
|
||||
sprintf(macStr, "(" MACFMT ")", MACCVT(mSelfMac));
|
||||
currentChannel = showChannelSelect();
|
||||
WDT_RestartCounter();
|
||||
radioShutdown();
|
||||
if (currentChannel) {
|
||||
printf("AP Found\r\n");
|
||||
printf("BOOT: AP Found\n");
|
||||
wdt10s();
|
||||
delay(10000);
|
||||
showAPFound();
|
||||
sprintf(macStr1, "OpenEPaperLink Ch: %i", currentChannel);
|
||||
wdt10s();
|
||||
timerDelay(TIMER_TICKS_PER_MSEC * 1000);
|
||||
currentTagMode = TAG_MODE_ASSOCIATED;
|
||||
} else {
|
||||
printf("No AP found\r\n");
|
||||
printf("BOOT: No AP found\n");
|
||||
wdt10s();
|
||||
delay(10000);
|
||||
showNoAP();
|
||||
sleep_with_with_wakeup(120000UL);
|
||||
wdt10s();
|
||||
timerDelay(TIMER_TICKS_PER_MSEC * 1000);
|
||||
currentTagMode = TAG_MODE_CHANSEARCH;
|
||||
}
|
||||
writeSettings();
|
||||
printf("BOOT: Cold boot complete\n");
|
||||
sleep_with_with_wakeup(5 * 1000UL);
|
||||
|
||||
} else {
|
||||
// setupWDT();
|
||||
setupRTC(tagProfile.RC32Kcal);
|
||||
setupWDT();
|
||||
setupGPIO();
|
||||
// setupCLKCalib();
|
||||
// setupUART();
|
||||
// setupRTC();
|
||||
memset(curBlock.requestedParts, 0x00, BLOCK_REQ_PARTS_BYTES);
|
||||
timerInit();
|
||||
}
|
||||
|
||||
powerUp(INIT_UART);
|
||||
while (1) {
|
||||
wdt10s();
|
||||
switch (currentTagMode) {
|
||||
@@ -469,13 +544,16 @@ int main(void) {
|
||||
case TAG_MODE_CHANSEARCH:
|
||||
TagChanSearch();
|
||||
break;
|
||||
case TAG_MODE_DEEPSLEEP:
|
||||
tagDeepSleep();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _write(int file, char *ptr, int len) {
|
||||
UART_SendBytes(1, ptr, len);
|
||||
UART_SendBytes((UART_ID_Type)1, ptr, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -483,27 +561,74 @@ void _putchar(char c) {
|
||||
_write(0, &c, 1);
|
||||
}
|
||||
|
||||
void applyUpdate() {
|
||||
uint32_t ofst, now, size, pieceSz = 0x2000;
|
||||
void applyUpdate(uint32_t size) {
|
||||
uint32_t ofst, now, pieceSz = 0x2000;
|
||||
uint8_t chunkStore[0x2000];
|
||||
|
||||
printf("Applying update\r\n");
|
||||
|
||||
// apparently, the flash process is more reliable if we do these two first
|
||||
setupCLKCalib();
|
||||
setupRTC();
|
||||
|
||||
setupRTC(0);
|
||||
|
||||
uint64_t test;
|
||||
FLASH_Read((FLASH_ReadMode_Type)0, fsEnd + 0x0168, (uint8_t *)&test, 8);
|
||||
if (test != magic) {
|
||||
printf("Update didn't have the correct magic number!\n");
|
||||
printf("got %llu\n", test);
|
||||
delay(1000);
|
||||
return;
|
||||
}
|
||||
|
||||
showApplyUpdate();
|
||||
|
||||
size = EEPROM_OS_LEN;
|
||||
printf("Applying update\r\n");
|
||||
// qspiEraseRange(EEPROM_OS_START, EEPROM_OS_LEN);
|
||||
|
||||
for (ofst = 0; ofst < size; ofst += now) {
|
||||
now = size - ofst;
|
||||
if (now > pieceSz)
|
||||
now = pieceSz;
|
||||
printf("Cpy 0x%06x + 0x%04x to 0x%06x\r\n", EEPROM_UPDATE_START + ofst, now, EEPROM_OS_START + ofst);
|
||||
FLASH_Read(0, EEPROM_UPDATE_START + ofst, chunkStore, now);
|
||||
protectedFlashWrite(EEPROM_OS_START + ofst, chunkStore, now);
|
||||
printf("Cpy 0x%06x + 0x%04x to 0x%06x\r\n", fsEnd + ofst, now, ofst);
|
||||
FLASH_Read((FLASH_ReadMode_Type)0, fsEnd + ofst, chunkStore, now);
|
||||
// qspiEraseRange(ofst, now);
|
||||
protectedFlashWrite(ofst, chunkStore, now);
|
||||
WDT_RestartCounter();
|
||||
}
|
||||
printf("Resetting!\n");
|
||||
delay(1000);
|
||||
NVIC_SystemReset();
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
void executeCommand(uint8_t cmd) {
|
||||
printf("executing command %d \n", cmd);
|
||||
delay(20);
|
||||
switch (cmd) {
|
||||
case CMD_DO_REBOOT:
|
||||
NVIC_SystemReset();
|
||||
break;
|
||||
case CMD_DO_RESET_SETTINGS:
|
||||
break;
|
||||
case CMD_DO_SCAN:
|
||||
currentChannel = showChannelSelect();
|
||||
break;
|
||||
case CMD_ERASE_EEPROM_IMAGES:
|
||||
eraseImageBlocks();
|
||||
break;
|
||||
case CMD_GET_BATTERY_VOLTAGE:
|
||||
doVoltageReading();
|
||||
// ensure
|
||||
longDataReqCounter = LONG_DATAREQ_INTERVAL + 1;
|
||||
sleep_with_with_wakeup(2 * 1000UL);
|
||||
break;
|
||||
case CMD_DO_DEEPSLEEP:
|
||||
showLongTermSleep();
|
||||
currentTagMode = TAG_MODE_DEEPSLEEP;
|
||||
break;
|
||||
default:
|
||||
printf("Unimplemented command 0x%02X\n", cmd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3,32 +3,32 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "core_cm3.h"
|
||||
//#include "core_cm3.h"
|
||||
|
||||
#define NO_GUI 0 // Set this to one for faster developing, not Refresh on the E-Paper while showing Full screen messages
|
||||
|
||||
#define TEST_PIN 3
|
||||
#define RF_WAKEUP_PIN 5
|
||||
#define TEST_PIN GPIO_3
|
||||
#define RF_WAKEUP_PIN GPIO_5
|
||||
|
||||
#define UART_TX 4
|
||||
#define UART_RX 6
|
||||
#define UART_TX GPIO_4
|
||||
#define UART_RX GPIO_6
|
||||
|
||||
#define NFC_POWER 1
|
||||
#define NFC_IRQ 7
|
||||
#define NFC_SCL 28
|
||||
#define NFC_SDA 29
|
||||
#define NFC_POWER GPIO_1
|
||||
#define NFC_IRQ GPIO_7
|
||||
#define NFC_SCL GPIO_28
|
||||
#define NFC_SDA GPIO_29
|
||||
|
||||
#define EPD_BS 2
|
||||
#define EPD_MOSI 12
|
||||
#define EPD_MISO 13
|
||||
#define EPD_CLK 22
|
||||
#define EPD_CS 23
|
||||
#define EPD_RESET 24
|
||||
#define EPD_DC 26
|
||||
#define EPD_BUSY 27
|
||||
#define EPD_HLT_CTRL 25
|
||||
#define EPD_BS GPIO_2
|
||||
#define EPD_MOSI GPIO_12
|
||||
#define EPD_MISO GPIO_13
|
||||
#define EPD_CLK GPIO_22
|
||||
#define EPD_CS GPIO_23
|
||||
#define EPD_RESET GPIO_24
|
||||
#define EPD_DC GPIO_26
|
||||
#define EPD_BUSY GPIO_27
|
||||
#define EPD_HLT_CTRL GPIO_25
|
||||
|
||||
|
||||
#define RADIO_FIRST_CHANNEL (11) //2.4-GHz channels start at 11
|
||||
|
||||
void applyUpdate();
|
||||
void applyUpdate(uint32_t len);
|
||||
void executeCommand(uint8_t cmd);
|
||||
16
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/README.md
Normal file
16
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
## 'Filesystem' tools for 88MZ100 ##
|
||||
|
||||
- compile_fs_tools.sh
|
||||
- Compiles 'genprofile.cpp' and and 'mkfs.oepl.cpp' utilities. Expects g++ in paths
|
||||
- mkfs.oepl.sh
|
||||
- Converts relevant images to binaries, generates a tag profile, and assembles a binary filesystem
|
||||
- genprofile
|
||||
- Generates a binary tag profile from 'tagprofile.json'
|
||||
- mkbinaryimage.py
|
||||
- Generates OEPL-compatible binary image file
|
||||
- mkfs.oepl
|
||||
- Optionally compresses files and fonts and assembles them into a filesystem
|
||||
- tagprofile.json
|
||||
- Tag profile. Used if the serial flasher is used to flash/program a tag. Contains type and mac address
|
||||
|
||||

|
||||
@@ -0,0 +1,7 @@
|
||||
rm mkfs.oepl genprofile
|
||||
g++ mkfs.oepl.cpp -lz -o mkfs.oepl
|
||||
g++ genprofile.cpp -o genprofile
|
||||
chmod +x mkfs.oepl
|
||||
chmod +x genprofile
|
||||
|
||||
|
||||
BIN
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/genprofile
Normal file
BIN
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/genprofile
Normal file
Binary file not shown.
@@ -0,0 +1,61 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
// #include <iostream>
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <nlohmann/json.hpp>
|
||||
using json = nlohmann::json;
|
||||
|
||||
#include "../tagprofile_struct.h"
|
||||
|
||||
struct tagHardwareProfile* getProfileFromJson();
|
||||
|
||||
int main() {
|
||||
struct tagHardwareProfile* thwp = getProfileFromJson();
|
||||
printf("MAC: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X, xRes: %d\n", thwp->macAddress[0],thwp->macAddress[1],thwp->macAddress[2],thwp->macAddress[3],thwp->macAddress[4],thwp->macAddress[5],thwp->macAddress[6],thwp->macAddress[7], thwp->xRes);
|
||||
FILE* wptr = fopen("tagprofile.bin", "wb");
|
||||
fwrite((uint8_t*)thwp, sizeof(struct tagHardwareProfile), 1, wptr);
|
||||
fclose(wptr);
|
||||
}
|
||||
|
||||
struct tagHardwareProfile* getProfileFromJson() {
|
||||
struct tagHardwareProfile* thwp = new struct tagHardwareProfile;
|
||||
|
||||
std::ifstream f("tagprofile.json");
|
||||
json jsonData = json::parse(f);
|
||||
|
||||
// Check if the 'mac' key exists in the JSON object
|
||||
if (jsonData.find("mac") != jsonData.end()) {
|
||||
std::string macString = jsonData["mac"];
|
||||
thwp->xRes = jsonData["xRes"];
|
||||
thwp->yRes = jsonData["yRes"];
|
||||
thwp->bpp = jsonData["bpp"];
|
||||
thwp->controllerType = jsonData["controllerType"];
|
||||
thwp->OEPLType = jsonData["OEPLType"];
|
||||
|
||||
// Attempt to parse the MAC address with ":" separators
|
||||
int resultWithColons = sscanf(macString.c_str(), "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
|
||||
&thwp->macAddress[0], &thwp->macAddress[1], &thwp->macAddress[2], &thwp->macAddress[3],
|
||||
&thwp->macAddress[4], &thwp->macAddress[5], &thwp->macAddress[6], &thwp->macAddress[7]);
|
||||
if (resultWithColons != 8) {
|
||||
int resultWithoutColons = sscanf(macString.c_str(), "%2hhx%2hhx%2hhx%2hhx%2hhx%2hhx%2hhx%2hhx",
|
||||
&thwp->macAddress[0], &thwp->macAddress[1], &thwp->macAddress[2], &thwp->macAddress[3],
|
||||
&thwp->macAddress[4], &thwp->macAddress[5], &thwp->macAddress[6], &thwp->macAddress[7]);
|
||||
|
||||
// Check if either format successfully parsed the MAC address
|
||||
if (resultWithoutColons != 8) {
|
||||
std::cerr << "Error parsing MAC address from JSON string." << std::endl;
|
||||
delete thwp;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
return thwp;
|
||||
} else {
|
||||
std::cerr << "Error: 'mac' key not found in JSON." << std::endl;
|
||||
delete thwp;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MAC_BEGINS_HERE>
|
||||
@@ -0,0 +1,95 @@
|
||||
import sys
|
||||
from PIL import Image
|
||||
import struct
|
||||
import math
|
||||
|
||||
def convert_image_to_binary(input_image_path, output_file_path):
|
||||
# Open the image
|
||||
img = Image.open(input_image_path)
|
||||
|
||||
# Calculate the padded X size
|
||||
new_x_size = math.ceil(img.size[0] / 8) * 8
|
||||
|
||||
# Create a new image with the padded X size
|
||||
img_padded = Image.new("RGB", (new_x_size, img.size[1]), (255, 255, 255))
|
||||
img_padded.paste(img, (0, 0))
|
||||
|
||||
# Convert the padded image to grayscale and invert
|
||||
img_bw = img_padded.convert('L').point(lambda x: 255 - x)
|
||||
|
||||
# Check if the image has a red channel
|
||||
has_red_channel = 'R' in img.getbands()
|
||||
pixel_data_red = img_padded.split()[0].point(lambda x: 255 - x).tobytes()
|
||||
if any(pixel_data_red):
|
||||
has_red_channel = 1;
|
||||
else:
|
||||
has_red_channel = 0;
|
||||
|
||||
# Calculate unpadded resolution
|
||||
unpadded_resolution = (img.size[0], img.size[1])
|
||||
|
||||
# Create binary file
|
||||
with open(output_file_path, "wb") as binary_file:
|
||||
# Write header: 0x06, unpadded X size, Y size, bits-per-pixel
|
||||
binary_file.write(b'\x06')
|
||||
binary_file.write(unpadded_resolution[0].to_bytes(2, byteorder='little'))
|
||||
binary_file.write(unpadded_resolution[1].to_bytes(2, byteorder='little'))
|
||||
|
||||
# Determine bits-per-pixel
|
||||
bits_per_pixel = 2 if has_red_channel else 1
|
||||
binary_file.write(bits_per_pixel.to_bytes(1, byteorder='big'))
|
||||
|
||||
# Extract pixel data
|
||||
pixel_data_bw = img_bw.tobytes()
|
||||
|
||||
# If there's a red channel, extract red pixels
|
||||
if has_red_channel:
|
||||
pixel_data_red = img_padded.split()[0].point(lambda x: 255 - x).tobytes()
|
||||
|
||||
# Process pixel data in chunks of 8 and pack into bytes for black/white
|
||||
packed_data_bw = bytearray()
|
||||
packed_data_red = bytearray()
|
||||
for i in range(0, len(pixel_data_bw), 8):
|
||||
chunk_bw = pixel_data_bw[i:i + 8]
|
||||
packed_byte_bw = 0
|
||||
for j, pixel_value in enumerate(chunk_bw):
|
||||
packed_byte_bw |= (pixel_value >> j) & 1 << (7 - j)
|
||||
|
||||
packed_data_bw.append(packed_byte_bw)
|
||||
|
||||
chunk_red = pixel_data_red[i:i + 8]
|
||||
packed_byte_red = 0
|
||||
for j, pixel_value in enumerate(chunk_red):
|
||||
packed_byte_red |= (pixel_value >> j) & 1 << (7 - j)
|
||||
|
||||
packed_byte_red = packed_byte_red ^ packed_byte_bw
|
||||
|
||||
packed_data_red.append(packed_byte_red)
|
||||
|
||||
|
||||
# Write packed pixel data to binary file
|
||||
binary_file.write(bytes(packed_data_bw))
|
||||
binary_file.write(bytes(packed_data_red))
|
||||
else:
|
||||
# Process pixel data in chunks of 8 and pack into bytes for black/white
|
||||
packed_data_bw = bytearray()
|
||||
for i in range(0, len(pixel_data_bw), 8):
|
||||
chunk_bw = pixel_data_bw[i:i + 8]
|
||||
packed_byte_bw = 0
|
||||
for j, pixel_value in enumerate(chunk_bw):
|
||||
packed_byte_bw |= (pixel_value >> j) & 1 << (7 - j)
|
||||
|
||||
packed_data_bw.append(packed_byte_bw)
|
||||
|
||||
# Write packed pixel data to binary file
|
||||
binary_file.write(bytes(packed_data_bw))
|
||||
|
||||
print(f"Conversion completed. Output saved to {output_file_path}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: python script_name.py input_image_path output_file_path")
|
||||
else:
|
||||
input_image_path = sys.argv[1]
|
||||
output_file_path = sys.argv[2]
|
||||
convert_image_to_binary(input_image_path, output_file_path)
|
||||
BIN
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/mkfs.oepl
Normal file
BIN
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/mkfs.oepl
Normal file
Binary file not shown.
258
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/mkfs.oepl.cpp
Normal file
258
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mkfsOEPL/mkfs.oepl.cpp
Normal file
@@ -0,0 +1,258 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
//#include <iostream>
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
|
||||
/*
|
||||
This prepares a FS binary for use with the 88mz100-based OEPL Tag Firmware
|
||||
Jelmer Bruijn 2024
|
||||
*/
|
||||
|
||||
|
||||
#define PROGMEM
|
||||
//#define WINDOW_SIZE 12 // 4096 bytes
|
||||
#define WINDOW_SIZE 10 // 1024 bytes
|
||||
#define FILENAME_LENGTH 32
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap
|
||||
uint8_t width; ///< Bitmap dimensions in pixels
|
||||
uint8_t height; ///< Bitmap dimensions in pixels
|
||||
uint8_t xAdvance; ///< Distance to advance cursor (x axis)
|
||||
int8_t xOffset; ///< X dist from cursor pos to UL corner
|
||||
int8_t yOffset; ///< Y dist from cursor pos to UL corner
|
||||
} GFXglyph;
|
||||
|
||||
/// Data stored for FONT AS A WHOLE
|
||||
typedef struct {
|
||||
uint8_t *bitmap; ///< Glyph bitmaps, concatenated
|
||||
GFXglyph *glyph; ///< Glyph array
|
||||
uint16_t first; ///< ASCII extents (first char)
|
||||
uint16_t last; ///< ASCII extents (last char)
|
||||
uint8_t yAdvance; ///< Newline distance (y axis)
|
||||
} GFXfont;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t first;
|
||||
uint16_t last;
|
||||
uint8_t yAdvance;
|
||||
char glyphFile[FILENAME_LENGTH];
|
||||
char bitmapFile[FILENAME_LENGTH];
|
||||
} GFXFontOEPL;
|
||||
|
||||
typedef struct {
|
||||
char name[FILENAME_LENGTH];
|
||||
uint32_t offset;
|
||||
uint32_t len;
|
||||
} OEPLFile;
|
||||
|
||||
std::vector<OEPLFile*> files;
|
||||
uint8_t* buffer = nullptr; // temporary holds the entire FS
|
||||
uint32_t curOffset = 0;
|
||||
char OEPLHeader[12] = "---OEPL_FS!";
|
||||
FILE *wptr;
|
||||
|
||||
|
||||
void dump(const uint8_t *a, const uint16_t l) {
|
||||
printf("\n ");
|
||||
#define ROWS 16
|
||||
for (uint8_t c = 0; c < ROWS; c++) {
|
||||
printf(" %02X", c);
|
||||
}
|
||||
printf("\n--------");
|
||||
for (uint8_t c = 0; c < ROWS; c++) {
|
||||
printf("---");
|
||||
}
|
||||
for (uint16_t c = 0; c < l; c++) {
|
||||
if ((c % ROWS) == 0) {
|
||||
printf("\n0x%04X | ", c);
|
||||
}
|
||||
printf("%02X ", a[c]);
|
||||
}
|
||||
printf("\n--------");
|
||||
for (uint8_t c = 0; c < ROWS; c++) {
|
||||
printf("---");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
unsigned long doCompress(uint8_t* in, uint32_t in_len, uint8_t* out) {
|
||||
*((uint32_t*)out) = in_len;
|
||||
z_stream stream;
|
||||
stream.zalloc = Z_NULL;
|
||||
stream.zfree = Z_NULL;
|
||||
stream.opaque = Z_NULL;
|
||||
stream.avail_in = (uInt)in_len;
|
||||
stream.next_in = (Bytef*)in;
|
||||
stream.avail_out = (uInt)(in_len+1337);
|
||||
stream.next_out = (Bytef*)(out+4);
|
||||
*((uint32_t*)out) = in_len;
|
||||
|
||||
if (deflateInit2(&stream, Z_BEST_COMPRESSION, Z_DEFLATED, WINDOW_SIZE, 8, Z_DEFAULT_STRATEGY) != Z_OK) {
|
||||
fprintf(stderr, "Error initializing zlib for compression\n");
|
||||
return 1;
|
||||
}
|
||||
if (deflate(&stream, Z_FINISH) != Z_STREAM_END) {
|
||||
fprintf(stderr, "Error compressing data\n");
|
||||
deflateEnd(&stream);
|
||||
return 1;
|
||||
}
|
||||
if (deflateEnd(&stream) != Z_OK) {
|
||||
fprintf(stderr, "Error finalizing compression\n");
|
||||
return 1;
|
||||
}
|
||||
//dump(out, 16);
|
||||
return stream.total_out+4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void addFile(uint8_t* filedata, uint16_t len, char* filename, bool compress){
|
||||
char newfilename[FILENAME_LENGTH];
|
||||
if(compress){
|
||||
if(strlen(filename)>(FILENAME_LENGTH-3)){
|
||||
printf("Filename '%s' is too long\n", filename);
|
||||
return;
|
||||
}
|
||||
uint8_t* tmpbuffer = (uint8_t*)malloc(len + 1337);
|
||||
unsigned long out_len = doCompress(filedata, len, tmpbuffer);
|
||||
if(out_len==1){
|
||||
printf("Compression of %s failed\n", filename);
|
||||
return;
|
||||
}
|
||||
filedata = tmpbuffer;
|
||||
uint8_t rounded = (uint8_t)((float)100*out_len/len);
|
||||
printf("Compressed %s \033[50D\033[40C: %u \033[50D\033[47C -> %lu \033[70D\033[58C(%d%%)\n", filename, len, out_len, rounded);
|
||||
len = out_len;
|
||||
uint8_t flen = strlen(filename);
|
||||
strncpy(newfilename,filename,FILENAME_LENGTH-3);
|
||||
strcpy(newfilename + flen, ".z");
|
||||
filename = newfilename;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(strlen(filename)>(FILENAME_LENGTH-1)){
|
||||
printf("Filename '%s' is too long\n", filename);
|
||||
return;
|
||||
}
|
||||
if(!buffer){
|
||||
buffer = (uint8_t*)malloc(len);
|
||||
} else {
|
||||
buffer = (uint8_t*)realloc((void*)buffer, curOffset + len);
|
||||
}
|
||||
memcpy(buffer+curOffset, filedata, len);
|
||||
if(compress)free(filedata);
|
||||
OEPLFile* file = new OEPLFile;
|
||||
strcpy(file->name,filename);
|
||||
file->offset = curOffset;
|
||||
file->len = len;
|
||||
files.push_back(file);
|
||||
curOffset+=len;
|
||||
}
|
||||
|
||||
void addFileFromFS(const char* filename, bool compress){
|
||||
FILE* file = fopen(filename, "rb");
|
||||
|
||||
if (file == NULL) {
|
||||
fprintf(stderr, "Error opening file: %s\n", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
fseek(file, 0, SEEK_END);
|
||||
long fileSize = ftell(file);
|
||||
rewind(file);
|
||||
|
||||
char* fileContent = (char*)malloc(fileSize);
|
||||
|
||||
if (fileContent == NULL) {
|
||||
fprintf(stderr, "Error allocating memory for file content\n");
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
|
||||
size_t bytesRead = fread(fileContent, 1, fileSize, file);
|
||||
addFile((uint8_t*)fileContent, fileSize, (char*)filename, compress);
|
||||
}
|
||||
|
||||
|
||||
void printFAT(){
|
||||
printf("OEPL Filesystem Summary:\n");
|
||||
uint16_t tableSize = files.size() * sizeof(OEPLFile);
|
||||
tableSize += sizeof(OEPLHeader)-1;
|
||||
fwrite(OEPLHeader,sizeof(OEPLHeader)-1,1,wptr);
|
||||
uint32_t fssize = 0;
|
||||
for(OEPLFile* file : files){
|
||||
file->offset += tableSize;
|
||||
fwrite((uint8_t*)file,sizeof(OEPLFile),1,wptr);
|
||||
printf("file: %s \033[50D\033[37C size=%u \033[50D\033[51C offset=0x%04X\n",file->name, file->len, file->offset);
|
||||
fssize = file->len + file->offset;
|
||||
}
|
||||
printf("Total FS size: %u\n", fssize);
|
||||
}
|
||||
|
||||
void saveFontData(const GFXfont* font, char* name){
|
||||
if(strlen(name)>(FILENAME_LENGTH-7)){
|
||||
printf("Font filename '%s' is too long\n", name);
|
||||
return;
|
||||
}
|
||||
GFXFontOEPL fontdata;
|
||||
fontdata.first = font->first;
|
||||
fontdata.last = font->last;
|
||||
fontdata.yAdvance = font->yAdvance;
|
||||
strcpy(fontdata.glyphFile, name);
|
||||
strcpy(fontdata.bitmapFile, name);
|
||||
uint8_t len = strlen(fontdata.glyphFile);
|
||||
strcpy(fontdata.glyphFile + len, ".glyph");
|
||||
strcpy(fontdata.bitmapFile + len, ".bmp");
|
||||
addFile((uint8_t*)&fontdata, sizeof(GFXFontOEPL), name, false);
|
||||
|
||||
|
||||
uint16_t glyphLen = font->last - font->first;
|
||||
uint16_t lastOffset = font->glyph[glyphLen].bitmapOffset;
|
||||
uint16_t lastBitmapSize = font->glyph[glyphLen].width * font->glyph[glyphLen].height;
|
||||
uint8_t lastBitmapBytes = lastBitmapSize/8;
|
||||
if(lastBitmapSize%8)lastBitmapBytes++;
|
||||
uint16_t bitmapSize = lastOffset + lastBitmapBytes;
|
||||
int16_t glyphSize = (glyphLen + 1) * sizeof(GFXglyph);
|
||||
|
||||
addFile((uint8_t*)font->glyph, glyphSize, fontdata.glyphFile, false);
|
||||
addFile((uint8_t*)font->bitmap, bitmapSize, fontdata.bitmapFile, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "../../common/fonts/FreeSans9pt7b.h"
|
||||
#include "../../common/fonts/FreeSansBold18pt7b.h"
|
||||
#include "../../common/fonts/FreeSansBold24pt7b.h"
|
||||
|
||||
int main(){
|
||||
wptr = fopen("../build/fs.img","wb"); // w for write, b for binary
|
||||
|
||||
/* FONTS */
|
||||
saveFontData(&FreeSansBold24pt7b, (char*)"font/FreeSansBold24pt7b");
|
||||
saveFontData(&FreeSansBold18pt7b, (char*)"font/FreeSansBold18pt7b");
|
||||
saveFontData(&FreeSans9pt7b, (char*)"font/FreeSans9pt7b");
|
||||
|
||||
/* OTHER STUFF */
|
||||
addFileFromFS("marker.txt", false);
|
||||
addFileFromFS("tagprofile.bin", false);
|
||||
addFileFromFS("norf.bin", true);
|
||||
addFileFromFS("lowbat.bin", true);
|
||||
addFileFromFS("sadpanda.bin", true);
|
||||
addFileFromFS("tbird2.bin", true);
|
||||
addFileFromFS("jet.bin", true);
|
||||
printFAT();
|
||||
fwrite(buffer,curOffset,1,wptr);
|
||||
fclose(wptr);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
python3 mkbinaryimage.py ../../common/assets/norf48.png norf.bin
|
||||
python3 mkbinaryimage.py ../../common/assets/lowbat48.png lowbat.bin
|
||||
python3 mkbinaryimage.py ../../common/assets/sadpanda.png sadpanda.bin
|
||||
python3 mkbinaryimage.py ../../common/assets/tbird2.png tbird2.bin
|
||||
python3 mkbinaryimage.py ../../common/assets/jet.png jet.bin
|
||||
./genprofile
|
||||
./mkfs.oepl
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"mac":"00000130C8754110",
|
||||
"xRes":400,
|
||||
"yRes":300,
|
||||
"bpp":2,
|
||||
"controllerType":1,
|
||||
"OEPLType":36
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"mac":"0000021ECA8C743F",
|
||||
"xRes":640,
|
||||
"yRes":384,
|
||||
"bpp":2,
|
||||
"controllerType":0,
|
||||
"OEPLType":5
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"mac":"000001EF0ED27336",
|
||||
"xRes":640,
|
||||
"yRes":384,
|
||||
"bpp":1,
|
||||
"controllerType":0,
|
||||
"OEPLType":38
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"mac":"000001EF0ED27336",
|
||||
"xRes":640,
|
||||
"yRes":384,
|
||||
"bpp":1,
|
||||
"controllerType":0,
|
||||
"OEPLType":38
|
||||
}
|
||||
25
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mz100/eeprom.h
Normal file
25
ARM_Tag_FW/88MZ100_OpenEpaperLink_7.4/mz100/eeprom.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _EEPROM_H_
|
||||
#define _EEPROM_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define EEPROM_WRITE_PAGE_SZ 256 //max write size & alignment
|
||||
#define EEPROM_ERZ_SECTOR_SZ 4096 //erase size and alignment
|
||||
//pages are 4K in size
|
||||
//an update can be stored in any 2 image slots
|
||||
|
||||
#define EEPROM_SETTINGS_AREA_START (0x7F000UL)
|
||||
#define EEPROM_SETTINGS_SIZE (0x01000UL)
|
||||
|
||||
#define EEPROM_TOTAL_SIZE (0x80000UL)
|
||||
|
||||
#define EEPROM_MAC_INFO_START (0x6c000UL) //not same as stock
|
||||
#define EEPROM_MAC_INFO_LEN (0x01000UL)
|
||||
|
||||
#define EEPROM_IMG_VALID (0x494d4721)
|
||||
|
||||
//#define EEPROM_PIECE_SZ (88)
|
||||
|
||||
#include "../../common/eeprom_struct.h"
|
||||
|
||||
#endif
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
#include "nfc.h"
|
||||
//#include <stdio.h>
|
||||
// #include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "core_cm3.h"
|
||||
#include "main.h"
|
||||
#include "../main.h"
|
||||
#include "mz100_rtc.h"
|
||||
#include "mz100_wdt.h"
|
||||
#include "mz100_pmu.h"
|
||||
@@ -14,38 +14,46 @@
|
||||
#include "util.h"
|
||||
#include "printf.h"
|
||||
|
||||
#include "mz100_clock.h"
|
||||
|
||||
void NVIC_some_IRQ1(unsigned int a1)
|
||||
{
|
||||
volatile bool RTCintFired = false;
|
||||
|
||||
void setupWDT() {
|
||||
//** WATCHDOG
|
||||
CLK_ModuleClkEnable(CLK_WDT);
|
||||
WDT_SetMode(WDT_MODE_RESET);
|
||||
WDT_SetResetPulseLen(WDT_RESET_PULSE_LEN_256);
|
||||
WDT_SetTimeoutVal(0x0B);
|
||||
WDT_RestartCounter();
|
||||
WDT_Enable();
|
||||
//** WATCHDOG
|
||||
}
|
||||
|
||||
void NVIC_some_IRQ1(unsigned int a1) {
|
||||
*(uint32_t *)(4 * (a1 >> 5) - 0x1FFF1E80) = 1 << (a1 & 0x1F);
|
||||
}
|
||||
void NIVC_some_IRQ(unsigned int a1)
|
||||
{
|
||||
void NIVC_some_IRQ(unsigned int a1) {
|
||||
*(uint32_t *)(4 * (a1 >> 5) - 0x1FFF1D80) = 1 << (a1 & 0x1F);
|
||||
}
|
||||
|
||||
void Pin_pad_set_Low(int pin)
|
||||
{
|
||||
void Pin_pad_set_Low(int pin) {
|
||||
GPIO_PinPadOutputEnable(pin);
|
||||
GPIO_PinPadOutputLevel(pin, PIN_PAD_OUTPUT_LOW);
|
||||
GPIO_PinOutputModeConfig(pin, PIN_OUTPUT_MODE_PAD);
|
||||
}
|
||||
|
||||
void Pin_pad_set_High(int pin)
|
||||
{
|
||||
void Pin_pad_set_High(int pin) {
|
||||
GPIO_PinPadOutputEnable(pin);
|
||||
GPIO_PinPadOutputLevel(pin, PIN_PAD_OUTPUT_HIGH);
|
||||
GPIO_PinOutputModeConfig(pin, PIN_OUTPUT_MODE_PAD);
|
||||
}
|
||||
|
||||
void Pin_pad_set_Normal(int pin)
|
||||
{
|
||||
void Pin_pad_set_Normal(int pin) {
|
||||
GPIO_PinPadOutputEnable(pin);
|
||||
GPIO_PinPadOutputLevel(pin, PIN_PAD_OUTPUT_LOW);
|
||||
GPIO_PinOutputModeConfig(pin, PIN_OUTPUT_MODE_NORMAL_FUNCTION);
|
||||
}
|
||||
void init_GPIO_boot()
|
||||
{
|
||||
void init_GPIO_boot() {
|
||||
Pin_pad_set_Normal(NFC_POWER);
|
||||
Pin_pad_set_Normal(NFC_IRQ);
|
||||
Pin_pad_set_Normal(EPD_MOSI);
|
||||
@@ -59,10 +67,9 @@ void init_GPIO_boot()
|
||||
Pin_pad_set_Normal(EPD_RESET);
|
||||
Pin_pad_set_Normal(EPD_HLT_CTRL);
|
||||
}
|
||||
void init_GPIO_sleep()
|
||||
{
|
||||
void init_GPIO_sleep() {
|
||||
Pin_pad_set_Low(NFC_POWER);
|
||||
//Pin_pad_set_Low(NFC_IRQ);
|
||||
// Pin_pad_set_Low(NFC_IRQ);
|
||||
Pin_pad_set_Low(EPD_MOSI);
|
||||
Pin_pad_set_Low(EPD_MISO);
|
||||
Pin_pad_set_Low(EPD_CLK);
|
||||
@@ -77,10 +84,8 @@ void init_GPIO_sleep()
|
||||
|
||||
uint8_t WAKEUP_RF = 0;
|
||||
|
||||
void __attribute__((interrupt)) ExtPin5_IRQHandler(void)
|
||||
{
|
||||
if (!WAKEUP_RF)
|
||||
{
|
||||
void __attribute__((interrupt)) ExtPin5_IRQHandler(void) {
|
||||
if (!WAKEUP_RF) {
|
||||
NVIC_ClearPendingIRQ(ExtPin5_IRQn);
|
||||
GPIO_IntMask(RF_WAKEUP_PIN, MASK);
|
||||
NVIC_some_IRQ1(ExtPin5_IRQn);
|
||||
@@ -90,10 +95,17 @@ void __attribute__((interrupt)) ExtPin5_IRQHandler(void)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t gSleepRtcCounter = 0;
|
||||
uint8_t Ext_Pin27_triggered = 0;
|
||||
void __attribute__((interrupt)) ExtPin27_IRQHandler(void)
|
||||
{
|
||||
void __attribute__((interrupt)) ExtPin7_IRQHandler(void) {
|
||||
NVIC_ClearPendingIRQ(ExtPin7_IRQn);
|
||||
GPIO_IntMask(NFC_IRQ, MASK);
|
||||
NVIC_some_IRQ1(ExtPin7_IRQn);
|
||||
PMU_ClearWakeupExtpin(PMU_GPIO7_INT);
|
||||
NVIC_ClearPendingIRQ(ExtPin7_IRQn);
|
||||
}
|
||||
|
||||
volatile uint32_t gSleepRtcCounter = 0;
|
||||
volatile uint8_t Ext_Pin27_triggered = 0;
|
||||
void __attribute__((interrupt)) ExtPin27_IRQHandler(void) {
|
||||
WDT_RestartCounter();
|
||||
printf(">>PIN_27_IRQHandler\r\n");
|
||||
NVIC_ClearPendingIRQ(ExtPin27_IRQn);
|
||||
@@ -104,33 +116,26 @@ void __attribute__((interrupt)) ExtPin27_IRQHandler(void)
|
||||
Ext_Pin27_triggered = 1;
|
||||
}
|
||||
|
||||
void enable_irq_for_pin(int a1, unsigned int a2)
|
||||
{
|
||||
PMU_WakeupPinSrc_Type v4; // r0
|
||||
PMU_WakeupPinSrc_Type v5; // r5
|
||||
char v6; // r7
|
||||
PMU_WakeupTrigMode_Type v7; // r1
|
||||
void enable_irq_for_pin(int a1, unsigned int a2) {
|
||||
PMU_WakeupPinSrc_Type v4; // r0
|
||||
PMU_WakeupPinSrc_Type v5; // r5
|
||||
char v6; // r7
|
||||
PMU_WakeupTrigMode_Type v7; // r1
|
||||
|
||||
GPIO_PinMuxFun(a2, 7);
|
||||
if (a2 > 7)
|
||||
{
|
||||
if (a2 > 7) {
|
||||
if (a2 - 26 > 5)
|
||||
return;
|
||||
v4 = a2 - 19;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
v4 = a2 - 1;
|
||||
}
|
||||
v5 = v4;
|
||||
v6 = a2 + 31;
|
||||
if (a1 == 1)
|
||||
{
|
||||
if (a1 == 1) {
|
||||
GPIO_PinModeConfig(a2, PINMODE_PULLDOWN);
|
||||
v7 = PMU_WAKEUP_EDGE_RISING;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (a1 != 2)
|
||||
goto LABEL_11;
|
||||
GPIO_PinModeConfig(a2, PINMODE_PULLUP);
|
||||
@@ -144,13 +149,13 @@ LABEL_11:
|
||||
NVIC_EnableIRQ(v6);
|
||||
}
|
||||
|
||||
void wait_busy_sleep(int a1)
|
||||
{
|
||||
void wait_busy_sleep(int a1) {
|
||||
unsigned int v1 = 0;
|
||||
gSleepRtcCounter = 0;
|
||||
printf("=> EPD_BUSYN_PIN : %d\r\n", 27);
|
||||
while (1)
|
||||
{
|
||||
// printf("=> EPD_BUSYN_PIN : %d\r\n", 27);
|
||||
delay(1);
|
||||
|
||||
while (1) {
|
||||
RTC_CounterReset();
|
||||
RTC_IntClr(RTC_INT_CNT_UPP);
|
||||
NIVC_some_IRQ(0);
|
||||
@@ -163,10 +168,7 @@ void wait_busy_sleep(int a1)
|
||||
if (Ext_Pin27_triggered == 1)
|
||||
break;
|
||||
v1++;
|
||||
delay(2000);
|
||||
printf("busypin:%d,SCNT:%d\r\n", GPIO_ReadPinLevel(EPD_BUSY), v1);
|
||||
if (v1 >= 0x5A)
|
||||
{
|
||||
if (v1 >= 0x5A) {
|
||||
printf("DRF BUSY CHECK FAIL\r\n");
|
||||
break;
|
||||
}
|
||||
@@ -176,7 +178,7 @@ void wait_busy_sleep(int a1)
|
||||
NIVC_some_IRQ(0);
|
||||
(*(volatile unsigned int *)0xE000E180) = 1;
|
||||
gSleepRtcCounter = 1000 * RTC_GetCounterVal() / 0x7FFFu + a1 * v1;
|
||||
printf("RTC_GetCounterVal(): %d, gSleepRtcCounter:%d(ms)\r\n", RTC_GetCounterVal(), gSleepRtcCounter);
|
||||
// printf("RTC_GetCounterVal(): %d, gSleepRtcCounter:%d(ms)\r\n", RTC_GetCounterVal(), gSleepRtcCounter);
|
||||
RTC_CounterReset();
|
||||
Ext_Pin27_triggered = 0;
|
||||
GPIO_SetPinDir(EPD_BUSY, GPIO_INPUT);
|
||||
@@ -184,14 +186,13 @@ void wait_busy_sleep(int a1)
|
||||
GPIO_PinModeConfig(EPD_BUSY, PINMODE_PULLUP);
|
||||
}
|
||||
|
||||
void do_sleeped_epd_refresh()
|
||||
{
|
||||
void do_sleeped_epd_refresh() {
|
||||
printf("PM2 MODE START!\r\n");
|
||||
PMU->PMIP_BRN.BF.BRNDET_EN = 0;
|
||||
PMU->PWR_MODE.BF.CAU_ON = 0;
|
||||
PMU->PMIP_CHP_CTRL.BF.CHP_ON_OFF = 1;
|
||||
PMU_SetSleepMode(PMU_PM2);
|
||||
PMU_ClearWakeupExtpin(PMU_GPIO5_INT);
|
||||
wait_busy_sleep(2000);
|
||||
wait_busy_sleep(500);
|
||||
printf("uDisTime : %d ms\r\n", gSleepRtcCounter);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
void setupWDT();
|
||||
|
||||
void NVIC_some_IRQ1(unsigned int a1);
|
||||
void NIVC_some_IRQ(unsigned int a1);
|
||||
void init_GPIO_boot();
|
||||
@@ -3,8 +3,8 @@ GROUP(-lgcc -lc -lnosys)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x100000, LENGTH = 80k
|
||||
RAM (rwx) : ORIGIN = 0x20100000 + 80k, LENGTH = 160k - 80k - 2k
|
||||
FLASH (rx) : ORIGIN = 0x100000, LENGTH = 90k
|
||||
RAM (rwx) : ORIGIN = 0x20100000 + 90k, LENGTH = 160k - 90k - 2k
|
||||
AONSHADOW (rwx) : ORIGIN = 0x20128000 - 2k, LENGTH = 2k
|
||||
AON (rwx) : ORIGIN = 0x20130000 , LENGTH = 4k
|
||||
}
|
||||
@@ -17,7 +17,7 @@ SECTIONS
|
||||
{
|
||||
KEEP(*(.isr_vector))
|
||||
KEEP(*(.ver))
|
||||
KEEP(*(.default_mac))
|
||||
KEEP(*(.fwmagic))
|
||||
*(.text*)
|
||||
|
||||
KEEP(*(.init))
|
||||
@@ -11,19 +11,20 @@ bool aonRamValid = false;
|
||||
|
||||
void clearAonRam() {
|
||||
memset((void *)0x130000, 0, 4096);
|
||||
//memcpy((void *)(0x128000 - AONSHADOW_SIZE), (uint8_t *)aonShadow, AONSHADOW_SIZE);
|
||||
}
|
||||
|
||||
bool loadValidateAonRam() {
|
||||
uint32_t testchecksum = aonChecksum;
|
||||
aonChecksum = 0x00000000;
|
||||
uint32_t checksum = 0xABBA5FF5;
|
||||
uint32_t checksum = 0xABBA5FF7;
|
||||
for (uint32_t c = 0x130000; c < 0x131000; c += 4) {
|
||||
checksum += *(uint32_t *)c;
|
||||
}
|
||||
if (checksum == testchecksum) {
|
||||
// immediately invalidate the checksum; if we reboot, we want a clean reboot
|
||||
aonChecksum = 0x5445A00A;
|
||||
memcpy((void *)(0x128000 - AONSHADOW_SIZE), (uint8_t*)aonShadow, AONSHADOW_SIZE);
|
||||
memcpy((void *)(0x128000 - AONSHADOW_SIZE), (uint8_t *)aonShadow, AONSHADOW_SIZE);
|
||||
return true;
|
||||
} else {
|
||||
clearAonRam();
|
||||
@@ -33,9 +34,9 @@ bool loadValidateAonRam() {
|
||||
}
|
||||
|
||||
void saveAonRam() {
|
||||
memcpy((uint8_t*)aonShadow, (void *)(0x128000 - AONSHADOW_SIZE), AONSHADOW_SIZE);
|
||||
memcpy((uint8_t *)aonShadow, (void *)(0x128000 - AONSHADOW_SIZE), AONSHADOW_SIZE);
|
||||
aonChecksum = 0x00000000;
|
||||
uint32_t checksum = 0xABBA5FF5;
|
||||
uint32_t checksum = 0xABBA5FF7;
|
||||
for (uint32_t c = 0x130000; c < 0x131000; c += 4) {
|
||||
checksum += *(uint32_t *)c;
|
||||
}
|
||||
@@ -12,8 +12,8 @@
|
||||
#include "mz100_sleep.h"
|
||||
#include "util.h"
|
||||
#include "gpio.h"
|
||||
#include "main.h"
|
||||
#include "proto.h"
|
||||
#include "../main.h"
|
||||
//#include "proto.h"
|
||||
#include "printf.h"
|
||||
|
||||
extern void saveAonRam();
|
||||
@@ -88,16 +88,16 @@ void Set_Wakeup_pin_nfc()
|
||||
NVIC_EnableIRQ(ExtPin7_IRQn);
|
||||
}
|
||||
|
||||
extern struct blockRequest curBlock; // used by the block-requester, contains the next request that we'll send
|
||||
extern struct AvailDataInfo curDataInfo; // last 'AvailDataInfo' we received from the AP
|
||||
extern bool requestPartialBlock; // if we should ask the AP to get this block from the host or not
|
||||
//extern struct blockRequest curBlock; // used by the block-requester, contains the next request that we'll send
|
||||
//extern struct AvailDataInfo xferDataInfo; // last 'AvailDataInfo' we received from the AP
|
||||
//extern bool requestPartialBlock; // if we should ask the AP to get this block from the host or not
|
||||
void sleep_with_with_wakeup(uint32_t sleep_time_ms)
|
||||
{
|
||||
saveAonRam();
|
||||
//memcpy((uint8_t *)&(*(volatile unsigned int *)0x130500), (uint8_t *)&curBlock, sizeof(struct blockRequest));
|
||||
//memcpy((uint8_t *)&(*(volatile unsigned int *)0x130600), (uint8_t *)&curDataInfo, sizeof(struct AvailDataInfo));
|
||||
//sleep_time_ms = 10000;
|
||||
printf("sleep! %u\n", sleep_time_ms);
|
||||
//printf("sleep! %u\n", sleep_time_ms);
|
||||
uint32_t sleep_time_ms_1;
|
||||
AON_level_VDD(7);
|
||||
AON_level_VAA(0);
|
||||
@@ -122,4 +122,4 @@ void sleep_with_with_wakeup(uint32_t sleep_time_ms)
|
||||
Set_Wakeup_pin_rf(1);
|
||||
Set_Wakeup_pin_nfc();
|
||||
__WFI();
|
||||
}
|
||||
}
|
||||
@@ -129,6 +129,7 @@ void WDT_SetMode(WDT_Mode_Type mode)
|
||||
void WDT_SetTimeoutVal(uint32_t timeoutVal)
|
||||
{
|
||||
/* set WDT timeout value */
|
||||
// This value can be anything between 0x00 and 0x0F; this configures the WDT to reset at 2^(16+value) cycles (2^16 - 2^31)
|
||||
WDT->TORR.BF.TOP = timeoutVal;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user