diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/flash.bat b/ARM_Tag_FW/OpenEPaperLink_TLSR/flash.bat new file mode 100644 index 00000000..b4b578ab --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/flash.bat @@ -0,0 +1,5 @@ +makeit.exe clean all +flashing\telink_flasher.exe 1 8258 ac +rem flashing\telink_flasher.exe 1 8258 wf 0 -s 512k -e +flashing\telink_flasher.exe 1 8258 wf 0 -i TLSR_OpenEPaperLink.bin +flashing\telink_flasher.exe 1 8258 rst -f diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/config.ini b/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/config.ini new file mode 100644 index 00000000..32a5092b --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/config.ini @@ -0,0 +1,53 @@ +[MCU] +TYPE 3 0x0d = 8258 \bin\dut_8258_flash_v0003.bin 40000 b010b010 End +default = 8258 End +[MODE] +MODE 0x01 = USB End +MODE 0x04 = EVK End +default = EVK End +[OBJ] +OBJ 0x01 = FLASH End +OBJ 0x02 = CORE End +OBJ 0x03 = ANALOG End +OBJ 0x04 = OTP End +default = CORE End +[SIZE] +SIZE 0x01 = 1 End +SIZE 0x02 = 2 End +SIZE 0x03 = 4 End +SIZE 0x04 = 8 End +SIZE 0x05 = 16 End +default = 1 End +[DOWNLOAD_ADDR] +DOWNLOAD 0x01 = 0 End +DOWNLOAD 0x02 = 20000 End +DOWNLOAD 0x03 = 40000 End +default = 0 End +[ERASE_ADDR] +ERASE 0x01 = 0 End +ERASE 0x02 = 20000 End +ERASE 0x03 = 40000 End +default = 0 End +[ERASE_SIZE] +SIZE 0x01 = 4 End +SIZE 0x02 = 16 End +SIZE 0x03 = 64 End +SIZE 0x04 = 128 End +SIZE 0x05 = 512 End +default = 512 End +[PAGE_DISPLAY] +PAGE 0x01 = 0 Download End +PAGE 0x02 = 1 Tdebug End +PAGE 0x03 = 2 Log windows End +default = 0 End +[SECTION] +SECTION 0x01 = .data End +SECTION 0x02 = .bss End +SECTION 0x03 = .retention_data End +SECTION 0x04 = .retention_bss End +SECTION 0x05 = .no_ret_data End +SECTION 0x06 = .no_ret_bss End +default End +[BUTTON] + +[PATH] diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/telink_flasher.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/telink_flasher.exe new file mode 100644 index 00000000..965750c6 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/telink_flasher.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/tl_usb2.2.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/tl_usb2.2.dll new file mode 100644 index 00000000..907b58c0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/flashing/tl_usb2.2.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/make/div_mod.mk b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/div_mod.mk new file mode 100644 index 00000000..2bc516f9 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/div_mod.mk @@ -0,0 +1,13 @@ +# Add inputs and outputs from these tool invocations to the build variables +OUT_DIR += \ +/platform/tc32 + +OBJS += \ +$(OUT_PATH)/platform/tc32/div_mod.o + + +# Each subdirectory must supply rules for building sources it contributes +$(OUT_PATH)/platform/tc32/%.o: $(SDK_PATH)/platform/tc32/%.S + @echo 'Building file: $<' + @$(CC) $(BOOT_FLAG) $(INCLUDE_PATHS) -c -o"$@" "$<" + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/make/platform.mk b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/platform.mk new file mode 100644 index 00000000..c152bbb4 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/platform.mk @@ -0,0 +1,28 @@ +# Add inputs and outputs from these tool invocations to the build variables +OUT_DIR += \ +/platform/chip_8258 \ +/platform/chip_8258/flash \ +/platform/services/b85m + + +OBJS += \ +$(OUT_PATH)/platform/chip_8258/flash.o \ +$(OUT_PATH)/platform/chip_8258/adc.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid011460c8.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid1060c8.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid13325e.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid134051.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid136085.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid1360c8.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid1360eb.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid14325e.o \ +$(OUT_PATH)/platform/chip_8258/flash/flash_mid1460c8.o \ +$(OUT_PATH)/platform/services/b85m/irq_handler.o + + + +# Each subdirectory must supply rules for building sources it contributes +$(OUT_PATH)/platform/%.o: $(SDK_PATH)/platform/%.c + @echo 'Building file: $<' + @$(CC) $(GCC_FLAGS) $(INCLUDE_PATHS) -c -o"$@" "$<" + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/make/platformS.mk b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/platformS.mk new file mode 100644 index 00000000..4a2e916f --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/platformS.mk @@ -0,0 +1,16 @@ +# Add inputs and outputs from these tool invocations to the build variables +OUT_DIR += \ +/platform/boot \ +/platform/boot/8258 + +OBJS += \ +$(OUT_PATH)/platform/boot/link_cfg.o \ +$(OUT_PATH)/platform/boot/8258/cstartup_8258.o + + + +# Each subdirectory must supply rules for building sources it contributes +$(OUT_PATH)/platform/boot/%.o: $(SDK_PATH)/platform/boot/%.S + @echo 'Building file: $<' + @$(CC) $(BOOT_FLAG) $(INCLUDE_PATHS) -c -o"$@" "$<" + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/make/proj.mk b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/proj.mk new file mode 100644 index 00000000..9f996b7e --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/make/proj.mk @@ -0,0 +1,40 @@ +# Add inputs and outputs from these tool invocations to the build variables +OUT_DIR += \ +/proj/common \ +/proj/drivers \ +/proj/drivers/usb \ +/proj/os + +OBJS += \ +$(OUT_PATH)/proj/common/list.o \ +$(OUT_PATH)/proj/common/mempool.o \ +$(OUT_PATH)/proj/common/string.o \ +$(OUT_PATH)/proj/common/tlPrintf.o \ +$(OUT_PATH)/proj/common/utility.o \ +$(OUT_PATH)/proj/drivers/drv_adc.o \ +$(OUT_PATH)/proj/drivers/drv_calibration.o \ +$(OUT_PATH)/proj/drivers/drv_flash.o \ +$(OUT_PATH)/proj/drivers/drv_gpio.o \ +$(OUT_PATH)/proj/drivers/drv_hw.o \ +$(OUT_PATH)/proj/drivers/drv_i2c.o \ +$(OUT_PATH)/proj/drivers/drv_keyboard.o \ +$(OUT_PATH)/proj/drivers/drv_nv.o \ +$(OUT_PATH)/proj/drivers/drv_pm.o \ +$(OUT_PATH)/proj/drivers/drv_pwm.o \ +$(OUT_PATH)/proj/drivers/drv_spi.o \ +$(OUT_PATH)/proj/drivers/drv_timer.o \ +$(OUT_PATH)/proj/drivers/drv_uart.o \ +$(OUT_PATH)/proj/os/ev.o \ +$(OUT_PATH)/proj/os/ev_buffer.o \ +$(OUT_PATH)/proj/os/ev_poll.o \ +$(OUT_PATH)/proj/os/ev_queue.o \ +$(OUT_PATH)/proj/os/ev_timer.o + + + +# Each subdirectory must supply rules for building sources it contributes +$(OUT_PATH)/proj/%.o: $(SDK_PATH)/proj/%.c + @echo 'Building file: $<' + @$(CC) $(GCC_FLAGS) $(INCLUDE_PATHS) -c -o"$@" "$<" + + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/makefile b/ARM_Tag_FW/OpenEPaperLink_TLSR/makefile new file mode 100644 index 00000000..56ffaa99 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/makefile @@ -0,0 +1,143 @@ +PROJECT_NAME := TLSR_OpenEPaperLink + + +ifeq ($(OS), Windows_NT) + TC32_COMPILER_PATH := "tc32_windows\\bin\\" + WINDOWS_PREFIX :=$(TC32_COMPILER_PATH) + LINUX_CHMOD := +else + TC32_COMPILER_PATH := ./tc32_linux/bin/ + WINDOWS_PREFIX := + LINUX_CHMOD := chmod 777 -R ./tc32_linux/ +endif + +AS = $(TC32_COMPILER_PATH)tc32-elf-as +CC = $(TC32_COMPILER_PATH)tc32-elf-gcc +LD = $(TC32_COMPILER_PATH)tc32-elf-ld +NM = $(TC32_COMPILER_PATH)tc32-elf-nm +OBJCOPY = $(TC32_COMPILER_PATH)tc32-elf-objcopy +OBJDUMP = $(TC32_COMPILER_PATH)tc32-elf-objdump +ARCH = $(TC32_COMPILER_PATH)tc32-elf-ar +SIZE = $(TC32_COMPILER_PATH)tc32-elf-size + +LIBS := -ldrivers_8258 + +DEVICE_TYPE = -DEND_DEVICE=1 +MCU_TYPE = -DMCU_CORE_8258=1 +BOOT_FLAG = -DMCU_CORE_8258 -DMCU_STARTUP_8258 + +SDK_PATH := ./tl_zigbee_sdk +SRC_PATH := ./src +OUT_PATH := ./out +MAKE_INCLUDES := ./make + +INCLUDE_PATHS := \ +-I$(SDK_PATH)/platform \ +-I$(SDK_PATH)/proj/common \ +-I$(SDK_PATH)/proj \ +-I$(SDK_PATH)/zbhci \ +-I$(SRC_PATH) \ +-I./common + + +LS_FLAGS := $(SDK_PATH)/platform/boot/8258/boot_8258.link + +GCC_FLAGS := \ +-ffunction-sections \ +-fdata-sections \ +-Wall \ +-O2 \ +-fpack-struct \ +-fshort-enums \ +-finline-small-functions \ +-std=gnu99 \ +-fshort-wchar \ +-fms-extensions + +GCC_FLAGS += \ +$(DEVICE_TYPE) \ +$(MCU_TYPE) \ +-D__PROJECT_TL_SWITCH__=1 + +OBJ_SRCS := +S_SRCS := +ASM_SRCS := +C_SRCS := +S_UPPER_SRCS := +O_SRCS := +FLASH_IMAGE := +ELFS := +OBJS := +LST := +SIZEDUMMY := + + +RM := $(WINDOWS_PREFIX)rm -rf + +# All of the sources participating in the build are defined here +-include $(MAKE_INCLUDES)/proj.mk +-include $(MAKE_INCLUDES)/platformS.mk +-include $(MAKE_INCLUDES)/div_mod.mk +-include $(MAKE_INCLUDES)/platform.mk +-include ./project.mk + +# Add inputs and outputs from these tool invocations to the build variables +LST_FILE := $(OUT_PATH)/$(PROJECT_NAME).lst +BIN_FILE := $(OUT_PATH)/../$(PROJECT_NAME).bin +ELF_FILE := $(OUT_PATH)/$(PROJECT_NAME).elf + +SIZEDUMMY += \ +sizedummy \ + + +# All Target +all: chmod_all pre-build main-build + +# Main-build Target +main-build: $(ELF_FILE) secondary-outputs + +# Tool invocations +$(ELF_FILE): $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: TC32 C Linker' + $(LD) --gc-sections -L $(SDK_PATH)/zigbee/lib/tc32 -L $(SDK_PATH)/platform/lib -T $(LS_FLAGS) -o "$(ELF_FILE)" $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + + +$(LST_FILE): $(ELF_FILE) + @echo 'Invoking: TC32 Create Extended Listing' + $(OBJDUMP) -x -D -l -S $(ELF_FILE) > $(LST_FILE) + @echo 'Finished building: $@' + @echo ' ' + +$(BIN_FILE): $(ELF_FILE) + @echo 'Create Flash image (binary format)' + @$(OBJCOPY) -v -O binary $(ELF_FILE) $(BIN_FILE) + @echo 'Finished building: $@' + @echo ' ' + + +sizedummy: $(ELF_FILE) + @echo 'Invoking: Print Size' + @$(SIZE) -t $(ELF_FILE) + @echo 'Finished building: $@' + @echo ' ' + +clean: + -$(RM) $(FLASH_IMAGE) $(ELFS) $(OBJS) $(SIZEDUMMY) $(LST_FILE) $(ELF_FILE) $(BIN_FILE) + -@echo ' ' + +pre-build: + $(WINDOWS_PREFIX)mkdir -p $(foreach s,$(OUT_DIR),$(OUT_PATH)$(s)) + -@echo ' ' + +chmod_all: + -@$(LINUX_CHMOD) + -@echo 'chmod_all' + +secondary-outputs: $(BIN_FILE) $(LST_FILE) $(FLASH_IMAGE) $(SIZEDUMMY) + +.PHONY: all clean dependents pre-build +.SECONDARY: main-build pre-build + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/makeit.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/makeit.exe new file mode 100644 index 00000000..4201fb40 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/makeit.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/project.mk b/ARM_Tag_FW/OpenEPaperLink_TLSR/project.mk new file mode 100644 index 00000000..329230da --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/project.mk @@ -0,0 +1,34 @@ +# Add inputs and outputs from these tool invocations to the build variables +OUT_DIR += \ +/$(SRC_PATH) \ + +OBJS += \ +$(OUT_PATH)/$(SRC_PATH)/main.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_spi.o \ +$(OUT_PATH)/$(SRC_PATH)/epd.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_bw_213.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_bwr_213.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_bwr_350.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_bwy_350.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_bw_213_ice.o \ +$(OUT_PATH)/$(SRC_PATH)/epd_bwr_154.o \ +$(OUT_PATH)/$(SRC_PATH)/led.o \ +$(OUT_PATH)/$(SRC_PATH)/i2c.o \ +$(OUT_PATH)/$(SRC_PATH)/battery.o \ +$(OUT_PATH)/$(SRC_PATH)/nfc.o \ +$(OUT_PATH)/$(SRC_PATH)/uart.o \ +$(OUT_PATH)/$(SRC_PATH)/one_bit_display.o \ +$(OUT_PATH)/$(SRC_PATH)/eeprom.o \ +$(OUT_PATH)/$(SRC_PATH)/zigbee.o \ +$(OUT_PATH)/$(SRC_PATH)/comms.o \ +$(OUT_PATH)/$(SRC_PATH)/drawing.o \ +$(OUT_PATH)/$(SRC_PATH)/syncedproto.o \ +$(OUT_PATH)/$(SRC_PATH)/wdt.o \ +$(OUT_PATH)/$(SRC_PATH)/powermgt.o \ + +# Each subdirectory must supply rules for building sources it contributes +$(OUT_PATH)/$(SRC_PATH)/%.o: $(SRC_PATH)/%.c + @echo 'Building file: $<' + @$(CC) $(GCC_FLAGS) $(INCLUDE_PATHS) -c -o"$@" "$<" + + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/OneBitDisplay.cpp b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/OneBitDisplay.cpp new file mode 100644 index 00000000..240c4897 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/OneBitDisplay.cpp @@ -0,0 +1,822 @@ +// +// OneBitDisplay (OLED+LCD library) +// Copyright (c) 2020 BitBank Software, Inc. +// Written by Larry Bank (bitbank@pobox.com) +// Project started 3/23/2020 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifdef _LINUX_ +#include +#include +#include +#include +// convert wire library constants into ArmbianIO values +#define OUTPUT GPIO_OUT +#define INPUT GPIO_IN +#define INPUT_PULLUP GPIO_IN_PULLUP +#define HIGH 1 +#define LOW 0 +void delay(int); +#else // Arduino + +#include +#ifdef __AVR__ +#include +#endif +#include + +#endif // _LINUX_ +#include "OneBitDisplay.h" +// All of the drawing code is in here +#include "obd.inl" + +// Initialization sequences +const unsigned char oled128_initbuf[] PROGMEM = {0x00, 0xae,0xdc,0x00,0x81,0x40, + 0xa1,0xc8,0xa8,0x7f,0xd5,0x50,0xd9,0x22,0xdb,0x35,0xb0,0xda,0x12, + 0xa4,0xa6,0xaf}; + +const unsigned char oled64x128_initbuf[] PROGMEM ={ +0x00, 0xae, 0xd5, 0x51, 0x20, 0xa8, 0x3f, 0xdc, 0x00, 0xd3, 0x60, 0xad, 0x80, 0xa6, 0xa4, 0xa0, 0xc0, 0x81, 0x40, 0xd9, 0x22, 0xdb, 0x35, 0xaf +}; + +const unsigned char oled132_initbuf[] PROGMEM = {0x00,0xae,0x02,0x10,0x40,0x81,0xa0,0xc0,0xa6,0xa8,0x3f,0xd3,0x00,0xd5,0x80,0xd9,0xf1,0xda,0x12,0xdb,0x40,0x20,0x02,0xa4,0xa6}; + +const unsigned char oled64_initbuf[] PROGMEM ={0x00,0xae,0xa8,0x3f,0xd3,0x00,0x40,0xa1,0xc8, + 0xda,0x12,0x81,0xff,0xa4,0xa6,0xd5,0x80,0x8d,0x14, + 0xaf,0x20,0x02}; + +const unsigned char oled32_initbuf[] PROGMEM = { +0x00,0xae,0xd5,0x80,0xa8,0x1f,0xd3,0x00,0x40,0x8d,0x14,0xa1,0xc8,0xda,0x02, +0x81,0x7f,0xd9,0xf1,0xdb,0x40,0xa4,0xa6,0xaf}; + +const unsigned char oled72_initbuf[] PROGMEM ={0x00,0xae,0xa8,0x3f,0xd3,0x00,0x40,0xa1,0xc8, + 0xda,0x12,0x81,0xff,0xad,0x30,0xd9,0xf1,0xa4,0xa6,0xd5,0x80,0x8d,0x14, + 0xaf,0x20,0x02}; + +const unsigned char uc1701_initbuf[] PROGMEM = {0xe2, 0x40, 0xa0, 0xc8, 0xa2, 0x2c, 0x2e, 0x2f, 0xf8, 0x00, 0x23, 0x81, 0x28, 0xac, 0x00, 0xa6}; + +const unsigned char hx1230_initbuf[] PROGMEM = {0x2f, 0x90, 0xa6, 0xa4, 0xaf, 0x40, 0xb0, 0x10, 0x00}; +const unsigned char nokia5110_initbuf[] PROGMEM = {0x21, 0xa4, 0xb1, 0x04,0x14,0x20,0x0c}; + +static void obdCachedFlush(OBDISP *pOBD, int bRender); +static void obdCachedWrite(OBDISP *pOBD, uint8_t *pData, uint8_t u8Len, int bRender); +void obdSetPosition(OBDISP *pOBD, int x, int y, int bRender); +void obdWriteCommand(OBDISP *pOBD, unsigned char c); +void obdWriteDataBlock(OBDISP *pOBD, unsigned char *ucBuf, int iLen, int bRender); +//static void SPI_BitBang(OBDISP *pOBD, uint8_t *pData, int iLen, uint8_t iMOSIPin, uint8_t iSCKPin); + +// +// Draw the contents of a memory buffer onto a display +// The sub-window will be clipped if it specifies too large an area +// for the destination display. The source OBDISP structure must have +// a valid back buffer defined +// The top and bottom destination edges will be drawn on byte boundaries (8 rows) +// The source top/bot edges can be on pixel boundaries +// This can be used for partial screen updates +// +void obdDumpWindow(OBDISP *pOBDSrc, OBDISP *pOBDDest, int srcx, int srcy, int destx, int desty, int width, int height) +{ +uint8_t *s,ucTemp[32]; // temp buffer to gather source pixels +int x, y, tx, i; +int iPitch; + + if (pOBDSrc == NULL || pOBDDest == NULL || pOBDSrc->ucScreen == NULL) + return; // invalid pointers + if (width > pOBDDest->width) + width = pOBDDest->width; + if (height > pOBDDest->height) + height = pOBDDest->height; + iPitch = pOBDSrc->width; + for (y=0; yucScreen[((srcy+y)/8)*iPitch + srcx+x]; + if (srcy & 7) // need to shift the bits to get 8 rows of src data + { + uint8_t uc, ucShift = srcy & 7; + for (i=0; i> ucShift; + uc |= s[iPitch] << (7-ucShift); + ucTemp[i] = uc; + } + obdCachedWrite(pOBDDest, ucTemp, tx, 1); + } + else + { // simpler case + obdCachedWrite(pOBDDest, s, tx, 1); // just copy it + } + } // for x + } // for y + obdCachedFlush(pOBDDest, 1); +} /* obdDumpWindow() */ + +// +// Write a single line to a Sharp memory LCD +// You must provide the exact number of bytes needed for a complete line +// e.g. for the 144x168 display, pSrc must provide 144 pixels (18 bytes) +// +void obdWriteLCDLine(OBDISP *pOBD, uint8_t *pSrc, int iLine) +{ + int x; + uint8_t c, ucInvert, *d, ucStart; + uint8_t ucLineBuf[54]; // 400 pixels is max supported width = 50 bytes + 4 + int iPitch = pOBD->width / 8; + static int iVCOM = 0; + +// if (pOBD == NULL || pSrc == NULL || pOBD->type < SHARP_144x168) +// return; // invalid request + if (iLine < 0 || iLine >= pOBD->height) + return; + + ucInvert = (pOBD->invert) ? 0x00 : 0xff; + digitalWrite(pOBD->iCSPin, HIGH); // active high + + ucStart = 0x80; // write command + iVCOM++; + if (iVCOM & 0x100) // flip it every 256 lines + ucStart |= 0x40; // VCOM bit + ucLineBuf[1] = ucStart; + // this code assumes I2C, so the first byte is ignored + _I2CWrite(pOBD, ucLineBuf, 2); // write command(01) + vcom(02) + + d = &ucLineBuf[2]; + ucLineBuf[1] = pgm_read_byte(&ucMirror[iLine+1]); // current line number + for (x=0; xiCSPin, LOW); // de-activate +} /* obdWriteLCDLine() */ + +// +// Turn the display on or off +// +void obdPower(OBDISP *pOBD, int bOn) +{ +uint8_t ucCMD; + + if (pOBD->type == LCD_NOKIA5110) + ucCMD = (bOn) ? 0x20 : 0x24; + else // all other supported displays + ucCMD = (bOn) ? 0xaf : 0xae; + obdWriteCommand(pOBD, ucCMD); +} /* obdPower() */ + +// Controls the LED backlight +void obdBacklight(OBDISP *pOBD, int bOn) +{ + if (pOBD->iLEDPin != 0xff) + { + digitalWrite(pOBD->iLEDPin, (bOn) ? HIGH:LOW); + } +} /* obdBacklight() */ + +// +// Initialize the display controller on an SPI bus +// +void obdSPIInit(OBDISP *pOBD, int iType, int iDC, int iCS, int iReset, int iMOSI, int iCLK, int iLED, int bFlip, int bInvert, int bBitBang, int32_t iSpeed) +{ +} /* obdSPIInit() */ +// +// Set the memory configuration to display the pixels at 0 or 180 degrees (flipped) +// Pass true (1) to flip 180, false (0) to set to 0 +// +void obdSetFlip(OBDISP *pOBD, int iOnOff) +{ + if (pOBD == NULL) return; + pOBD->flip = iOnOff; + if (pOBD->type == LCD_UC1701 || pOBD->type == LCD_UC1609) + { + if (iOnOff) // rotate display 180 + { + obdWriteCommand(pOBD, 0xa1); // SEG direction (A1 to flip horizontal) + obdWriteCommand(pOBD, 0xc0); // COM direction (C0 to flip vert) + } else { // non-rotated + obdWriteCommand(pOBD, 0xa0); + obdWriteCommand(pOBD, 0xc8); + } + } else { // OLEDs + if (iOnOff) + { + obdWriteCommand(pOBD, 0xa0); + obdWriteCommand(pOBD, 0xc0); + } else { + obdWriteCommand(pOBD, 0xa1); + obdWriteCommand(pOBD, 0xc8); + } + } +} /* obdSetFlip() */ +// +// Initializes the OLED controller into "page mode" +// +int obdI2CInit(OBDISP *pOBD, int iType, int iAddr, int bFlip, int bInvert, int bWire, int sda, int scl, int reset, int32_t iSpeed) +{ + return 0; +} /* obdInit() */ +// +// Sends a command to turn on or off the OLED display +// +void oledPower(OBDISP *pOBD, uint8_t bOn) +{ + if (bOn) + obdWriteCommand(pOBD, 0xaf); // turn on OLED + else + obdWriteCommand(pOBD, 0xae); // turn off OLED +} /* oledPower() */ + +#ifdef _LINUX_ +void delay(int iDelay) +{ +// usleep(iDelay * 1000); +} /* delay() */ +void delayMicroseconds(int iDelay) +{ + //usleep(iDelay); +} /* delayMicroseconds() */ +#endif // _LINUX_ +// +// Bit Bang the data on GPIO pins +// +void SPI_BitBang(OBDISP *pOBD, uint8_t *pData, int iLen, uint8_t iMOSIPin, uint8_t iSCKPin) +{ +int i; +uint8_t c; +// We can access the GPIO ports much quicker on AVR by directly manipulating +// the port registers +#ifdef __AVR__ +volatile uint8_t *outSCK, *outMOSI; // port registers for fast I/O +uint8_t port, bitSCK, bitMOSI; // bit mask for the chosen pins + + port = digitalPinToPort(iMOSIPin); + outMOSI = portOutputRegister(port); + bitMOSI = digitalPinToBitMask(iMOSIPin); + port = digitalPinToPort(iSCKPin); + outSCK = portOutputRegister(port); + bitSCK = digitalPinToBitMask(iSCKPin); + +#endif + + while (iLen) + { + c = *pData++; + if (pOBD->iDCPin == 0xff) // 3-wire SPI, write D/C bit first + { +#ifdef __AVR__ + if (pOBD->mode == MODE_DATA) + *outMOSI |= bitMOSI; + else + *outMOSI &= ~bitMOSI; + *outSCK |= bitSCK; // toggle clock + *outSCK &= ~bitSCK; // no delay needed on SPI devices since AVR is slow +#else + digitalWrite(iMOSIPin, (pOBD->mode == MODE_DATA)); + digitalWrite(iSCKPin, HIGH); + delayMicroseconds(0); + digitalWrite(iSCKPin, LOW); +#endif + } + if (c == 0 || c == 0xff) // quicker for all bits equal + { +#ifdef __AVR__ + if (c & 1) + *outMOSI |= bitMOSI; + else + *outMOSI &= ~bitMOSI; + for (i=0; i<8; i++) + { + *outSCK |= bitSCK; + *outSCK &= ~bitSCK; + } +#else + digitalWrite(iMOSIPin, (c & 1)); + for (i=0; i<8; i++) + { + digitalWrite(iSCKPin, HIGH); + delayMicroseconds(0); + digitalWrite(iSCKPin, LOW); + } +#endif + } + else + { + for (i=0; i<8; i++) + { +#ifdef __AVR__ + if (c & 0x80) // MSB first + *outMOSI |= bitMOSI; + else + *outMOSI &= ~bitMOSI; + *outSCK |= bitSCK; + c <<= 1; + *outSCK &= ~bitSCK; +#else + digitalWrite(iMOSIPin, (c & 0x80) != 0); // MSB first + digitalWrite(iSCKPin, HIGH); + c <<= 1; + delayMicroseconds(0); + digitalWrite(iSCKPin, LOW); +#endif + } + } + iLen--; + } +} /* SPI_BitBang() */ + +// Sets the D/C pin to data or command mode +void obdSetDCMode(OBDISP *pOBD, int iMode) +{ + if (pOBD->iDCPin == 0xff) // 9-bit SPI + pOBD->mode = (uint8_t)iMode; + else // set the GPIO line + digitalWrite(pOBD->iDCPin, (iMode == MODE_DATA)); +} /* obdSetDCMode() */ + +static void obdWriteCommand2(OBDISP *pOBD, unsigned char c, unsigned char d) +{ +unsigned char buf[4]; + + if (pOBD->com_mode == COM_I2C) {// I2C device + buf[0] = 0x00; + buf[1] = c; + buf[2] = d; + _I2CWrite(pOBD, buf, 3); + } else { // must be SPI + obdWriteCommand(pOBD, c); + obdWriteCommand(pOBD, d); + } +} /* obdWriteCommand2() */ + +// +// Sets the brightness (0=off, 255=brightest) +// +void obdSetContrast(OBDISP *pOBD, unsigned char ucContrast) +{ + if (pOBD->type == LCD_HX1230) + { // valid values are 0-31, so scale it + ucContrast >>= 3; + obdWriteCommand(pOBD, 0x80 + ucContrast); + } + else if (pOBD->type == LCD_NOKIA5110) + { + // we allow values of 0xb0-0xbf, so shrink the range + ucContrast >>= 4; + obdWriteCommand(pOBD, 0x21); // set advanced command mode + obdWriteCommand(pOBD, 0xb0 | ucContrast); + obdWriteCommand(pOBD, 0x20); // set simple command mode + } + else // OLEDs + UC1701 + obdWriteCommand2(pOBD, 0x81, ucContrast); +} /* obdSetContrast() */ + +// +// Special case for Sharp Memory LCD +// +static void SharpDumpBuffer(OBDISP *pOBD, uint8_t *pBuffer) +{ +int x, y; +uint8_t c, ucInvert, *s, *d, ucStart; +uint8_t ucLineBuf[56]; +int iPitch = pOBD->width / 8; +static uint8_t ucVCOM = 0; +int iBit; +uint8_t ucMask; + + ucInvert = (pOBD->invert) ? 0x00 : 0xff; + digitalWrite(pOBD->iCSPin, HIGH); // active high + + ucLineBuf[0] = 0; + ucStart = 0x80; // write command + if (ucVCOM) + ucStart |= 0x40; // VCOM bit + ucLineBuf[1] = ucStart; + // this code assumes I2C, so the first byte is ignored + _I2CWrite(pOBD, ucLineBuf, 2); // write command(01) + vcom(02) + ucVCOM = !ucVCOM; // need to toggle this each transaction + + // We need to flip and invert the image in code because the Sharp memory LCD + // controller only has the simplest of commands for data writing + if (pOBD->flip) + { + for (y=0; yheight; y++) // we have to write the memory in the wrong direction + { + ucMask = 0x80 >> (y & 7); + s = &pBuffer[pOBD->width - 1 + (pOBD->width * ((pOBD->height - 1 - y) >> 3))]; // point to last line first + d = &ucLineBuf[2]; + ucLineBuf[1] = pgm_read_byte(&ucMirror[y+1]); // current line number + for (x=0; xwidth/8; x++) + { + c = ucInvert; // we need to brute-force invert it + for (iBit=7; iBit>=0; iBit--) + { + if (s[0] & ucMask) + c ^= (1 << iBit); + s--; + } + *d++ = c; + } // for y + // write this line to the display + ucLineBuf[iPitch+2] = 0; // end of line + _I2CWrite(pOBD, ucLineBuf, iPitch+3); + } // for x + } + else // normal orientation + { + for (y=0; yheight; y++) // we have to write the memory in the wrong direction + { + ucMask = 1 << (y & 7); + s = &pBuffer[pOBD->width * (y >> 3)]; // point to last line first + d = &ucLineBuf[2]; + + ucLineBuf[1] = pgm_read_byte(&ucMirror[y+1]); // current line number + for (x=0; xwidth/8; x++) + { + c = ucInvert; + for (iBit=7; iBit>=0; iBit--) + { + if (s[0] & ucMask) + c ^= (1 << iBit); + s++; + } + *d++ = c; + } // for y + // write this line to the display + ucLineBuf[iPitch+2] = 0; // end of line + _I2CWrite(pOBD, ucLineBuf, iPitch+3); + } // for x + } + ucLineBuf[1] = 0; + _I2CWrite(pOBD, ucLineBuf, 2); // final transfer + digitalWrite(pOBD->iCSPin, LOW); // de-activate +} /* SharpDumpBuffer() */ +// +// Dump a screen's worth of data directly to the display +// Try to speed it up by comparing the new bytes with the existing buffer +// +void obdDumpBuffer(OBDISP *pOBD, uint8_t *pBuffer) +{ +int x, y, iPitch; +int iLines, iCols; +uint8_t bNeedPos; +uint8_t *pSrc = pOBD->ucScreen; + + iPitch = pOBD->width; + if (pOBD->type == LCD_VIRTUAL) // wrong function for this type of display + return; + if (pBuffer == NULL) // dump the internal buffer if none is given + pBuffer = pOBD->ucScreen; + if (pBuffer == NULL) + return; // no backbuffer and no provided buffer + + if (pOBD->type >= SHARP_144x168) // special case for Sharp Memory LCD + { + SharpDumpBuffer(pOBD, pBuffer); + return; + } + iLines = pOBD->height >> 3; + iCols = pOBD->width >> 4; + for (y=0; yucScreen == NULL || pBuffer == pSrc || memcmp(pSrc, pBuffer, 16) != 0) // doesn't match, need to send it + { + if (bNeedPos) // need to reposition output cursor? + { + bNeedPos = 0; + obdCachedFlush(pOBD, 1); + obdSetPosition(pOBD, x*16, y, 1); + } + obdCachedWrite(pOBD, pBuffer, 16, 1); + } + else + { + bNeedPos = 1; // we're skipping a block, so next time will need to set the new position + } + pSrc += 16; + pBuffer += 16; + } // for x + pSrc += (iPitch - pOBD->width); // for narrow displays, skip to the next line + pBuffer += (iPitch - pOBD->width); + } // for y + obdCachedFlush(pOBD, 1); +} /* obdDumpBuffer() */ + +// +// Menu functions are not (yet) supported on Linux +// +#ifndef _LINUX_ +// A valid CW or CCW move returns 1 or -1, invalid returns 0. +static int obdMenuReadRotary(SIMPLEMENU *sm) { +static int8_t rot_enc_table[] = {0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0}; +uint8_t c; +int rc = 0; + + + sm->prevNextCode <<= 2; + if (digitalRead(sm->u8Dn) == sm->iPressed) + sm->prevNextCode |= 0x02; + if (digitalRead(sm->u8Up) == sm->iPressed) + sm->prevNextCode |= 0x01; + sm->prevNextCode &= 0x0f; + + // If valid then store as 16 bit data. + if (rot_enc_table[sm->prevNextCode]) { + sm->store <<= 4; + sm->store |= sm->prevNextCode; + c = sm->store & 0xff; + //if (store==0xd42b) return 1; + //if (store==0xe817) return -1; + if ((c & 0xf) == 2) rc = -1; + else if ((c & 0xf) == 1) rc = 1; + } +// Serial.printf("store = 0x%04x, val = %d\r\n", sm->store, rc); + return rc; +} /* obdMenuReadRotary() */ + +// +// Initialize the simple menu structure +// +int obdMenuInit(OBDISP *pOBD, SIMPLEMENU *sm, char **pText, int iFontSize, int bCenter, int btnUp, int btnDn, int btnEnter, int iPressedState, int bIsRotary) +{ + int iLen; + if (sm == NULL || pText == NULL) return 0; + sm->pOBD = pOBD; + sm->u8Up = btnUp; // pin numbers of the action buttons + sm->u8Dn = btnDn; // or rotary A line + sm->u8Enter = btnEnter; // or rotary B line + sm->bIsRotary = bIsRotary; + sm->u8BtnState = 0; // no active buttons to start + sm->iPressed = iPressedState; // active state of a pressed button + sm->bCenter = bCenter; + sm->iFontSize = iFontSize; + sm->pMenuText = pText; + sm->iMenuIndex = 0; // start at first item + sm->iDispX = 128; // DEBUG + sm->iDispY = 64; // DEBUG + sm->bOneButton = (btnDn == -1 && btnEnter == -1); // only 1 button defined + sm->pfnCallback = NULL; + sm->prevNextCode = 0; + sm->store = 0; + iLen = 0; + while (pText[iLen] != NULL) { + iLen++; + } + sm->iMenuLen = iLen-1; // don't count the title text + return 1; // success +} /* obdMenuInit() */ + +// +// Get the text and centering position for +// a specific menu item +// returns the X position +// +static int obdMenuGetItem(SIMPLEMENU *sm, int iItem, char *szText) +{ + int x, cx, len; + + if (iItem > sm->iMenuLen) + return -1; // invalid request + + if (sm->iFontSize == FONT_6x8) + cx = 6; + else if (sm->iFontSize == FONT_8x8) + cx = 8; + else cx = 16; + strcpy(szText, sm->pMenuText[iItem]); + if (sm->pfnCallback && iItem > 0) // don't add callback for menu title + { + strcat(szText, " "); + strcat(szText, (*sm->pfnCallback)(iItem-1)); + } + x = 0; + if (sm->bCenter || iItem == 0) // always center the menu title + { + len = strlen(szText); + x = (sm->iDispX - (len * cx)) / 2; + } + return x; +} /* obdMenuGetItem() */ + +// +// Erase the display and show the given menu +// +void obdMenuShow(SIMPLEMENU *sm, int iItem) +{ +int i, x, iCount, iStart = 0; +int iFirst, iLast; +char szTemp[64]; + + iCount = (sm->iDispY / 8) - 1; // DEBUG - number of visible menu lines + iFirst = iLast = iItem; + if (iItem == -1) // show the entire menu + { + obdFill(sm->pOBD, 0, 0); + x = obdMenuGetItem(sm, 0, szTemp); // get the title text + obdMenuShowItem(sm->pOBD, x, 0, szTemp, 0, 0, sm->iFontSize, 0); // show title + iFirst = 0; + iLast = iCount-1; + } + if (sm->iMenuIndex >= iCount) // needs to scroll up + iStart = sm->iMenuIndex - (iCount-1); + if (sm->iMenuIndex < 0 || sm->iMenuIndex+iCount > sm->iMenuLen) { // invalid + sm->iMenuIndex = 0; + iStart = 0; + } + + for (i=iFirst; i<=iLast && i+iStart < sm->iMenuLen; i++) // draw the visible menu lines + { + x = obdMenuGetItem(sm, i + iStart + 1, szTemp); + if (x >= 0) // display if valid + obdMenuShowItem(sm->pOBD, x, i+1, szTemp, (i+iStart == sm->iMenuIndex), (iFirst==iLast), sm->iFontSize, (iFirst==iLast)); + } + if (iItem == -1) // now the display it in one shot + obdDumpBuffer(sm->pOBD, NULL); +} /* obdMenuShow() */ + +// +// Set a callback function to return custom info/status +// for each menu item +// +void obdMenuSetCallback(SIMPLEMENU *sm, SIMPLECALLBACK pfnCallBack) +{ + if (sm != NULL) + sm->pfnCallback = pfnCallBack; +} /* obdMenuSetCallback() */ +// +// Display the text of a single menu item +// optionally erases what's under it to prevent left-over text when the length changes +// +void obdMenuShowItem(OBDISP *pOBD, int x, int y, char *szText, int bInvert, int bErase, int iFontSize, int bRender) +{ + static char *szBlank = (char *)" "; + if (bErase) + obdWriteString(pOBD, 0, 0, y, szBlank, iFontSize, 0, bRender); // erase old info + obdWriteString(pOBD, 0, x, y, szText, iFontSize, bInvert, bRender); +} /* obdMenuShowItem() */ + +// +// Flash a menu item when it is selected +// +static void obdMenuFlash(SIMPLEMENU *sm, int iItem) +{ +int x, y, i, iCount; +char szTemp[64]; + + iCount = (sm->iDispY / 8) - 1; // DEBUG - number of visible menu lines + y = iItem+1; + if (y > iCount) // max bottom line + y = iCount; + + x = obdMenuGetItem(sm, iItem+1, szTemp); + if (x < 0) return; // invalid request + + for (i=0; i<3; i++) + { + obdMenuShowItem(sm->pOBD, x, y, szTemp, 0, 0, sm->iFontSize, 1); // show non-inverted + delay(200); + obdMenuShowItem(sm->pOBD, x, y, szTemp, 1, 0, sm->iFontSize, 1); // show inverted + delay(200); + } +} /* obdMenuFlash() */ + +// +// Change the menu index incrementally +// redraws the minimum amount of screen to show the new info +// (this prevents flicker/flash and saves battery life) +// returns the new menu index +// +int obdMenuDelta(SIMPLEMENU *sm, int iDelta) +{ + int i, x, iNewIndex, iCount; + int iStart1, iStart2; + char szTemp[64]; + + if (iDelta == 0) return sm->iMenuIndex; // nothing to do + + iNewIndex = sm->iMenuIndex + iDelta; + if (!sm->bOneButton && (iNewIndex < 0 || iNewIndex >= sm->iMenuLen)) // no change possible, exit + return sm->iMenuIndex; // unchanged + // If we are using a single button, wrap around the ends + if (iNewIndex < 0) iNewIndex = (sm->iMenuLen - 1); + else if (iNewIndex > sm->iMenuLen-1) iNewIndex = 0; + + iCount = (sm->iDispY / 8) - 1; // DEBUG - number of visible menu lines + iStart1 = iStart2 = 0; + if (sm->iMenuIndex > iCount-1) + iStart1 = sm->iMenuIndex - (iCount-1); + if (iNewIndex > iCount-1) // needs to scroll up + iStart2 = iNewIndex - (iCount-1); + if (iStart1 != iStart2) // need to redraw all items + { + for (i=0; i= 0) + obdMenuShowItem(sm->pOBD, x, i+1, szTemp, (i+iStart2 == iNewIndex), 1, sm->iFontSize, 0); + } + obdDumpBuffer(sm->pOBD, NULL); + } + else // need to redraw only the new and old items + { + i = sm->iMenuIndex - iStart1; + x = obdMenuGetItem(sm, sm->iMenuIndex+1, szTemp); + if (x >= 0) + obdMenuShowItem(sm->pOBD, x, i+1, szTemp, 0, 0, sm->iFontSize, 1); + i = iNewIndex - iStart2; + x = obdMenuGetItem(sm, iNewIndex+1, szTemp); + if (x >= 0) + obdMenuShowItem(sm->pOBD, x, i+1, szTemp, 1, 0, sm->iFontSize, 1); + } + sm->iMenuIndex = iNewIndex; + return iNewIndex; +} /* obdMenuDelta() */ + +// +// With the given setup, check for button presses +// and act accordingly +// returns -1 for normal interactions and the menu item index if the user presses the ENTER button +// +// time in milliseconds for a long press +#define MENU_LONG_PRESS 600 +int obdMenuRun(SIMPLEMENU *sm) +{ +uint8_t buttons = 0; +unsigned long ul; +int iDelta, rc = -1; + + if (sm->bIsRotary) { // read the rotary encoder + if (digitalRead(sm->u8Enter) == sm->iPressed) { + buttons |= 1; // pressed + if (buttons != sm->u8BtnState) + rc = sm->iMenuIndex; // user pressed ENTER, return current menu index + } else { // check for rotary encoder activity + iDelta = obdMenuReadRotary(sm); + obdMenuDelta(sm, iDelta); + } + sm->u8BtnState = buttons; + } else { +// check the button states + if (digitalRead(sm->u8Up) == sm->iPressed) + buttons |= 1; + if (buttons != sm->u8BtnState) // something changed + { + if (sm->bOneButton) // different logic for a single button system + { + if (sm->u8BtnState == 0 && buttons == 1) // up button just pressed + { + sm->ulPressTime = millis(); // record the press time + } + if (sm->u8BtnState == 1 && buttons == 0) // up button just released + { + ul = millis() - sm->ulPressTime; + if (ul < MENU_LONG_PRESS) // short press = navigate menu + obdMenuDelta(sm, 1); + else // treat it like a long press + rc = sm->iMenuIndex; // action + } + } + else // 3 button setup (UP/DOWN/ENTER) + { + if (digitalRead(sm->u8Dn) == sm->iPressed) + buttons |= 2; + if (digitalRead(sm->u8Enter) == sm->iPressed) + rc = sm->iMenuIndex; // user pressed ENTER, return current menu index + if ((sm->u8BtnState & 1) == 0 && (buttons & 1) == 1) // Up button pressed + { + obdMenuDelta(sm, -1); + } + if ((sm->u8BtnState & 2) == 0 && (buttons & 2) == 2) // Down button pressed + { + obdMenuDelta(sm, 1); + } + } + sm->u8BtnState = buttons; // save the latest state + } + } + if (rc != -1) // selected + obdMenuFlash(sm, sm->iMenuIndex); + return rc; +} /* obdMenuRun() */ +#endif // !_LINUX_ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/OneBitDisplay.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/OneBitDisplay.h new file mode 100644 index 00000000..08cc4bc1 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/OneBitDisplay.h @@ -0,0 +1,390 @@ +#ifndef __ONEBITDISPLAY__ +#define __ONEBITDISPLAY__ + +// Proportional font data taken from Adafruit_GFX library +/// Font data stored PER GLYPH +#if !defined( _ADAFRUIT_GFX_H ) && !defined( _GFXFONT_H_ ) +#define _GFXFONT_H_ +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 + uint8_t first; ///< ASCII extents (first char) + uint8_t last; ///< ASCII extents (last char) + uint8_t yAdvance; ///< Newline distance (y axis) +} GFXfont; +#endif // _ADAFRUIT_GFX_H + +typedef struct obdstruct +{ +uint8_t oled_addr; // requested address or 0xff for automatic detection +uint8_t wrap, flip, invert, type; +uint8_t *ucScreen; +int iCursorX, iCursorY; +int width, height; +int iScreenOffset; +//BBI2C bbi2c; +uint8_t com_mode; // communication mode (I2C / SPI) +uint8_t mode; // data/command mode for 9-bit SPI +uint8_t iDCPin, iMOSIPin, iCLKPin, iCSPin; +uint8_t iLEDPin; // backlight +uint8_t bBitBang; +} OBDISP; + +typedef char * (*SIMPLECALLBACK)(int iMenuItem); + +typedef struct smenu { + uint8_t u8Up, u8Dn, u8Enter; // button pin numbers + uint8_t bIsRotary; // rotary encoder or up/down buttons? + uint8_t bCenter; // center all menu text if true + uint8_t u8BtnState; // state of all buttons + uint8_t bOneButton; // flag indicating the menu operates from a single button + uint8_t prevNextCode; // rotary encoder state machine + int iMenuIndex; // current menu index + int iMenuLen; // number of entries in the menu (calculated at startup) + char **pMenuText; // string array with menu title and text + int iFontSize; + int iPressed; // polarity of button pressed state + unsigned long ulPressTime; // time in millis when button was pressed + int iDispX, iDispY; // display width/height in pixels + SIMPLECALLBACK pfnCallback; + OBDISP *pOBD; // display structureme + uint16_t store; +} SIMPLEMENU; + +// Make the Linux library interface C instead of C++ +#if defined(_LINUX_) && defined(__cplusplus) +extern "C" { +#endif + +#if !defined(BITBANK_LCD_MODES) +#define BITBANK_LCD_MODES +typedef enum +{ + MODE_DATA = 0, + MODE_COMMAND +} DC_MODE; +#endif + +typedef enum +{ + COM_I2C = 0, + COM_SPI, +} COM_MODE; + +typedef enum +{ + ROT_0 = 0, + ROT_90, + ROT_180, + ROT_270 +} FONT_ROTATION; + +// These are defined the same in my SPI_LCD library +#ifndef SPI_LCD_H + +// 5 possible font sizes: 8x8, 16x32, 6x8, 12x16 (stretched from 6x8 with smoothing), 16x16 (stretched from 8x8) +enum { + FONT_6x8 = 0, + FONT_8x8, + FONT_12x16, + FONT_16x16, + FONT_16x32, + FONT_COUNT +}; +// For backwards compatibility, keep the old names valid +#define FONT_NORMAL FONT_8x8 +#define FONT_SMALL FONT_6x8 +#define FONT_STRETCHED FONT_16x16 +#define FONT_LARGE FONT_16x32 +#endif + +// Display type for init function +enum { + OLED_128x128 = 1, + OLED_128x32, + OLED_128x64, + OLED_132x64, + OLED_64x128, + OLED_64x32, + OLED_96x16, + OLED_72x40, + LCD_UC1701, + LCD_UC1609, + LCD_HX1230, + LCD_NOKIA5110, + LCD_VIRTUAL, + SHARP_144x168, + SHARP_400x240 +}; + +// Rotation and flip angles to draw tiles +enum { + ANGLE_0=0, + ANGLE_90, + ANGLE_180, + ANGLE_270, + ANGLE_FLIPX, + ANGLE_FLIPY +}; + +// Return value from obd obdI2CInit() +enum { + OLED_NOT_FOUND = -1, // no display found + OLED_SSD1306_3C, // SSD1306 found at 0x3C + OLED_SSD1306_3D, // SSD1306 found at 0x3D + OLED_SH1106_3C, // SH1106 found at 0x3C + OLED_SH1106_3D, // SH1106 found at 0x3D + OLED_SH1107_3C, // SH1107 + OLED_SH1107_3D, + LCD_OK, + LCD_ERROR +}; +// +// Create a virtual display of any size +// The memory buffer must be provided at the time of creation +// +void obdCreateVirtualDisplay(OBDISP *pOBD, int width, int height, uint8_t *buffer); +// Constants for the obdCopy() function +// Output format options - +#define OBD_LSB_FIRST 0x001 +#define OBD_MSB_FIRST 0x002 +#define OBD_VERT_BYTES 0x004 +#define OBD_HORZ_BYTES 0x008 +// Orientation options - +#define OBD_ROTATE_90 0x010 +#define OBD_FLIP_VERT 0x020 +#define OBD_FLIP_HORZ 0x040 +#define OBD_INVERT 0x080 +// Copy the current bitmap buffer from its native form (LSB_FIRST, VERTICAL_BYTES) to the requested form +// A copy of the same format will just do a memcpy +int obdCopy(OBDISP *pOBD, int iFlags, uint8_t *pDestination); +// +// Draw the contents of a memory buffer onto a display +// The sub-window will be clipped if it specifies too large an area +// for the destination display. The source OBDISP structure must have +// a valid back buffer defined +// The top and bottom destination edges will be drawn on byte boundaries (8 rows) +// The source top/bot edges can be on pixel boundaries +// +void obdDumpWindow(OBDISP *pOBDSrc, OBDISP *pOBDDest, int srcx, int srcy, int destx, int desty, int width, int height); +// +// Write a single line to a Sharp memory LCD +// You must provide the exact number of bytes needed for a complete line +// e.g. for the 144x168 display, pSrc must provide 144 pixels (18 bytes) +// +void obdWriteLCDLine(OBDISP *pOBD, uint8_t *pSrc, int iLine); +// +// Initializes the display controller into "page mode" on I2C +// If SDAPin and SCLPin are not -1, then bit bang I2C on those pins +// Otherwise use the Wire library. +// If you don't need to use a separate reset pin, set it to -1 +// +int obdI2CInit(OBDISP *pOBD, int iType, int iAddr, int bFlip, int bInvert, int bWire, int iSDAPin, int iSCLPin, int iResetPin, int32_t iSpeed); +// +// Initialize an SPI version of the display +// +void obdSPIInit(OBDISP *pOBD, int iType, int iDC, int iCS, int iReset, int iMOSI, int iCLK, int iLED, int bFlip, int bInvert, int iBitBang, int32_t iSpeed); + +// +// Set the memory configuration to display the pixels at 0 or 180 degrees (flipped) +// pass true (1) to flip 180, false (0) to set to 0 +void obdSetFlip(OBDISP *pOBD, int iOnOff); +// +// Provide or revoke a back buffer for your OLED graphics +// This allows you to manage the RAM used by ss_oled on tiny +// embedded platforms like the ATmega series +// Pass NULL to revoke the buffer. Make sure you provide a buffer +// large enough for your display (e.g. 128x64 needs 1K - 1024 bytes) +// +void obdSetBackBuffer(OBDISP *pOBD, uint8_t *pBuffer); +// +// Sets the brightness (0=off, 255=brightest) +// +void obdSetContrast(OBDISP *pOBD, unsigned char ucContrast); +// +// Load a 1-bpp Windows bitmap +// Pass the pointer to the beginning of the BMP file +// First pass version assumes a full screen bitmap +// +int obdLoadBMP(OBDISP *pOBD, uint8_t *pBMP, int x, int y, int bInvert); +// +// Power up/down the display +// useful for low power situations +// +void obdPower(OBDISP *pOBD, int bOn); +// +// Set the current cursor position +// The column represents the pixel column (0-127) +// The row represents the text row (0-7) +// +void obdSetCursor(OBDISP *pOBD, int x, int y); + +// +// Turn text wrap on or off for the obdWriteString() function +// +void obdSetTextWrap(OBDISP *pOBD, int bWrap); +// +// Draw a string of normal (8x8), small (6x8) or large (16x32) characters +// At the given col+row with the given scroll offset. The scroll offset allows you to +// horizontally scroll text which does not fit on the width of the display. The offset +// represents the pixels to skip when drawing the text. An offset of 0 starts at the beginning +// of the text. +// The system remembers where the last text was written (the cursor position) +// To continue writing from the last position, set the x,y values to -1 +// The text can optionally wrap around to the next line by calling oledSetTextWrap(true); +// otherwise text which would go off the right edge will not be drawn and the cursor will +// be left "off screen" until set to a new position explicitly +// +// Returns 0 for success, -1 for invalid parameter +// +int obdWriteString(OBDISP *pOBD, int iScrollX, int x, int y, char *szMsg, int iSize, int bInvert, int bRender); +// +// Draw a string with a fractional scale in both dimensions +// the scale is a 16-bit integer with and 8-bit fraction and 8-bit mantissa +// To draw at 1x scale, set the scale factor to 256. To draw at 2x, use 512 +// The output must be drawn into a memory buffer, not directly to the display +// The string can be drawn in one of 4 rotations (ROT_0, ROT_90, ROT_180, ROT_270) +// +int obdScaledString(OBDISP *pOBD, int x, int y, char *szMsg, int iSize, int bInvert, int iXScale, int iYScale, int iRotation); +// +// Draw a string in a proportional font you supply +// Requires a back buffer +// +int obdWriteStringCustom(OBDISP *pOBD, GFXfont *pFont, int x, int y, char *szMsg, uint8_t ucColor); +// +// Get the width of text in a custom font +// +void obdGetStringBox(GFXfont *pFont, char *szMsg, int *width, int *top, int *bottom); +// +// Fill the frame buffer with a byte pattern +// e.g. all off (0x00) or all on (0xff) +// +void obdFill(OBDISP *pOBD, unsigned char ucData, int bRender); +// +// Set (or clear) an individual pixel +// The local copy of the frame buffer is used to avoid +// reading data from the display controller +// (which isn't possible in most configurations) +// This function needs the USE_BACKBUFFER macro to be defined +// otherwise, new pixels will erase old pixels within the same byte +// +int obdSetPixel(OBDISP *pOBD, int x, int y, unsigned char ucColor, int bRender); +// +// Dump an entire custom buffer to the display +// useful for custom animation effects +// +void obdDumpBuffer(OBDISP *pOBD, uint8_t *pBuffer); +// +// Render a window of pixels from a provided buffer or the library's internal buffer +// to the display. The row values refer to byte rows, not pixel rows due to the memory +// layout of OLEDs. Pass a src pointer of NULL to use the internal backing buffer +// returns 0 for success, -1 for invalid parameter +// +int obdDrawGFX(OBDISP *pOBD, uint8_t *pSrc, int iSrcCol, int iSrcRow, int iDestCol, int iDestRow, int iWidth, int iHeight, int iSrcPitch); + +// +// Draw a line between 2 points +// +void obdDrawLine(OBDISP *pOBD, int x1, int y1, int x2, int y2, uint8_t ucColor, int bRender); +// +// Play a frame of animation data +// The animation data is assumed to be encoded for a full frame of the display +// Given the pointer to the start of the compressed data, +// it returns the pointer to the start of the next frame +// Frame rate control is up to the calling program to manage +// When it finishes the last frame, it will start again from the beginning +// +uint8_t * obdPlayAnimFrame(OBDISP *pOBD, uint8_t *pAnimation, uint8_t *pCurrent, int iLen); +void obdWriteCommand(OBDISP *pOBD, unsigned char c); +void obdSetPosition(OBDISP *pOBD, int x, int y, int bRender); +void obdWriteDataBlock(OBDISP *pOBD, unsigned char *ucBuf, int iLen, int bRender); +// +// Scroll the internal buffer by 1 scanline (up/down) +// width is in pixels, lines is group of 8 rows +// Returns 0 for success, -1 for invalid parameter +// +int obdScrollBuffer(OBDISP *pOBD, int iStartCol, int iEndCol, int iStartRow, int iEndRow, int bUp); +// +// Draw a sprite of any size in any position +// If it goes beyond the left/right or top/bottom edges +// it's trimmed to show the valid parts +// This function requires a back buffer to be defined +// The priority color (0 or 1) determines which color is painted +// when a 1 is encountered in the source image. +// e.g. when 0, the input bitmap acts like a mask to clear +// the destination where bits are set. +// +void obdDrawSprite(OBDISP *pOBD, uint8_t *pSprite, int cx, int cy, int iPitch, int x, int y, uint8_t iPriority); +// +// Draw a 16x16 tile in any of 4 rotated positions +// Assumes input image is laid out like "normal" graphics with +// the MSB on the left and 2 bytes per line +// On AVR, the source image is assumed to be in FLASH memory +// The function can draw the tile on byte boundaries, so the x value +// can be from 0 to 112 and y can be from 0 to 6 +// +void obdDrawTile(OBDISP *pOBD, const uint8_t *pTile, int x, int y, int iRotation, int bInvert, int bRender); +// +// Draw an outline or filled ellipse +// +void obdEllipse(OBDISP *pOBD, int iCenterX, int iCenterY, int32_t iRadiusX, int32_t iRadiusY, uint8_t ucColor, uint8_t bFilled); +// +// Draw an outline or filled rectangle +// +void obdRectangle(OBDISP *pOBD, int x1, int y1, int x2, int y2, uint8_t ucColor, uint8_t bFilled); + +// +// Turn the LCD backlight on or off +// +void obdBacklight(OBDISP *pODB, int bOn); + +// +// Menu functions +// +// Initialize the simple menu structure +// +int obdMenuInit(OBDISP *pOBD, SIMPLEMENU *sm, char **pText, int iFontSize, int bCenter, int btnUp, int btnDn, int btnEnter, int iPressedState, int bIsRotary); +// +// Erase the display and show the given menu +// +void obdMenuShow(SIMPLEMENU *sm, int iItem); +// +// Set a callback function to return custom info/status +// for each menu item +// +void obdMenuSetCallback(SIMPLEMENU *sm, SIMPLECALLBACK pfnCallBack); +// +// Display the text of a single menu item +// optionally erases what's under it to prevent left-over text when the length changes +// +void obdMenuShowItem(OBDISP *pOBD, int x, int y, char *szText, int bInvert, int bErase, int iFontSize, int bRender); +// +// Change the menu index incrementally +// redraws the minimum amount of screen to show the new info +// (this prevents flicker/flash and saves battery life) +// returns the new menu index +// +int obdMenuDelta(SIMPLEMENU *sm, int iDelta); +// +// With the given setup, check for button presses +// and act accordingly +// returns -1 for normal interactions and the menu item index if the user presses the ENTER button +// +int obdMenuRun(SIMPLEMENU *sm); + +#if defined(_LINUX_) && defined(__cplusplus) +} +#endif // _LINUX_ + +#endif // __ONEBITDISPLAY__ + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/Roboto_Black_80.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/Roboto_Black_80.h new file mode 100644 index 00000000..8cd31e12 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/Roboto_Black_80.h @@ -0,0 +1,200 @@ +// Created by http://oleddisplay.squix.ch/ Consider a donation +// In case of problems make sure that you are using the font file with the correct version! +const uint8_t Roboto_Black_80Bitmaps[] = { + + // Bitmap Data: + 0x00, // ' ' + 0xFF,0xFC,0xFF,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xFC,0x7F,0xF8,0x7F,0xF8,0x7F,0xF8,0x7F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xC0,0x3F,0xF0,0x7F,0xF8,0x7F,0xFC,0xFF,0xFC,0xFF,0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0xFC,0x7F,0xFC,0x7F,0xF8,0x3F,0xF0,0x0F,0xC0, // '!' + 0xFF,0x83,0xFE,0xFF,0x83,0xFE,0xFF,0x83,0xFE,0xFF,0x83,0xFE,0xFF,0x83,0xFE,0xFF,0x83,0xFE,0xFF,0x83,0xFC,0xFF,0x83,0xFC,0xFF,0x83,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xFC,0xFF,0x03,0xF8,0xFF,0x03,0xF8,0xF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xFF,0xFF,0x00,0x00,0x0F,0xFF,0xFE,0x00,0x00,0x00,0x7F,0xF8,0x00,0x00,0x00,0x07,0xE0,0x00,0x00,0x00,0x03,0xF0,0x00,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x0F,0xC0,0x00,0x00, // '$' + 0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x03,0xFF,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0xF8,0x00,0x00,0x00,0x03,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0xFF,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFC,0x00,0x20,0x00,0x1F,0xF8,0x7F,0xE0,0x03,0xC0,0x00,0xFF,0x81,0xFF,0x00,0x1F,0x80,0x07,0xF8,0x07,0xFC,0x01,0xFF,0x00,0x3F,0xC0,0x3F,0xE0,0x0F,0xF0,0x01,0xFE,0x01,0xFF,0x00,0xFF,0x00,0x0F,0xF0,0x0F,0xF8,0x0F,0xF0,0x00,0x7F,0x80,0x7F,0xC0,0x7F,0x80,0x03,0xFC,0x03,0xFE,0x07,0xF8,0x00,0x1F,0xE0,0x1F,0xF0,0x7F,0xC0,0x00,0xFF,0x00,0xFF,0x83,0xFC,0x00,0x07,0xFC,0x0F,0xFC,0x3F,0xC0,0x00,0x3F,0xF0,0xFF,0xC1,0xFE,0x00,0x00,0xFF,0xFF,0xFE,0x1F,0xE0,0x00,0x07,0xFF,0xFF,0xE1,0xFF,0x00,0x00,0x1F,0xFF,0xFF,0x0F,0xF0,0x00,0x00,0x7F,0xFF,0xF0,0xFF,0x00,0x00,0x01,0xFF,0xFF,0x07,0xF8,0x00,0x00,0x07,0xFF,0xE0,0x7F,0x80,0x00,0x00,0x07,0xFC,0x07,0xF8,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x03,0xFC,0x00,0x00,0x00,0x00,0x00,0x3F,0xE0,0x00,0x00,0x00,0x00,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x07,0xF8,0x3F,0xFF,0x00,0x00,0x00,0x7F,0x83,0xFF,0xFE,0x00,0x00,0x03,0xFC,0x3F,0xFF,0xF8,0x00,0x00,0x3F,0xC3,0xFF,0xFF,0xE0,0x00,0x03,0xFC,0x3F,0xFF,0xFF,0x00,0x00,0x1F,0xE1,0xFF,0xFF,0xFC,0x00,0x01,0xFE,0x1F,0xF8,0x7F,0xE0,0x00,0x1F,0xF0,0xFF,0x81,0xFF,0x80,0x00,0xFF,0x07,0xF8,0x07,0xFC,0x00,0x0F,0xF0,0x3F,0xC0,0x3F,0xE0,0x00,0x7F,0x81,0xFE,0x01,0xFF,0x00,0x07,0xF8,0x0F,0xF0,0x0F,0xF8,0x00,0x7F,0x80,0x7F,0x80,0x7F,0xC0,0x03,0xFC,0x03,0xFC,0x03,0xFE,0x00,0x3F,0xC0,0x1F,0xE0,0x1F,0xF0,0x03,0xFE,0x00,0xFF,0x00,0xFF,0x80,0x1F,0xE0,0x07,0xFC,0x07,0xFC,0x00,0x7E,0x00,0x3F,0xF0,0x7F,0xC0,0x00,0xF0,0x00,0xFF,0xFF,0xFE,0x00,0x01,0x00,0x07,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x1F,0xFF,0xFF,0x00,0x00,0x00,0x00,0x7F,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFC,0x00, // '%' + 0x00,0x00,0x7F,0xC0,0x00,0x00,0x00,0x00,0x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0xFF,0x00,0x0F,0xFC,0x00,0x3F,0xF0,0x00,0x7F,0xE0,0x01,0xFF,0x80,0x03,0xFF,0x00,0x0F,0xFC,0x00,0x1F,0xF8,0x00,0x7F,0xE0,0x00,0xFF,0xC0,0x01,0xFF,0x80,0x07,0xFE,0x00,0x0F,0xFC,0x00,0x1F,0xF8,0x00,0x7F,0xF0,0x00,0xFF,0xC0,0x01,0xFF,0x80,0x03,0xFF,0x00,0x07,0xFE,0x00,0x1F,0xFC,0x00,0x3F,0xF8,0x00,0x7F,0xE0,0x00,0xFF,0xC0,0x01,0xFF,0x80,0x03,0xFF,0x00,0x07,0xFE,0x00,0x0F,0xFC,0x00,0x1F,0xF8,0x00,0x3F,0xF0,0x00,0x7F,0xE0,0x00,0xFF,0xC0,0x01,0xFF,0x80,0x03,0xFF,0x00,0x07,0xFE,0x00,0x0F,0xFC,0x00,0x1F,0xF8,0x00,0x3F,0xF0,0x00,0x7F,0xE0,0x00,0xFF,0xC0,0x01,0xFF,0x80,0x03,0xFF,0x80,0x07,0xFF,0x00,0x07,0xFE,0x00,0x0F,0xFC,0x00,0x1F,0xF8,0x00,0x3F,0xF0,0x00,0x7F,0xF0,0x00,0x7F,0xE0,0x00,0xFF,0xC0,0x01,0xFF,0x80,0x01,0xFF,0x80,0x03,0xFF,0x00,0x07,0xFE,0x00,0x07,0xFE,0x00,0x0F,0xFC,0x00,0x0F,0xFC,0x00,0x1F,0xF8,0x00,0x1F,0xF8,0x00,0x3F,0xF0,0x00,0x3F,0xF0,0x00,0x7F,0xF0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0xFF,0xF0,0x00,0xFF,0xC0,0x00,0xFF,0x80,0x00,0xFE,0x00,0x00,0x7C,0x00,0x00,0x78,0x00,0x00,0x20, // '(' + 0x10,0x00,0x00,0x3C,0x00,0x00,0x3E,0x00,0x00,0x3F,0x80,0x00,0x7F,0xC0,0x00,0x7F,0xE0,0x00,0xFF,0xF0,0x00,0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')' + 0x00,0x03,0xFC,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x07,0xF8,0x00,0x00,0x00,0x3F,0xC0,0x00,0x00,0x01,0xFE,0x00,0x00,0x00,0x07,0xF0,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x01,0xFC,0x00,0x01,0xC0,0x0F,0xE0,0x06,0x0F,0x80,0x7F,0x01,0xF0,0x7F,0x83,0xF8,0x3F,0x87,0xFF,0x1F,0x8F,0xFE,0x3F,0xFE,0xFD,0xFF,0xF1,0xFF,0xFF,0xFF,0xFF,0x9F,0xFF,0xFF,0xFF,0xFE,0x3F,0xFF,0xFF,0xFF,0xC0,0x1F,0xFF,0xFF,0xF0,0x00,0x1F,0xFF,0xF8,0x00,0x00,0x0F,0xFC,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0xFF,0xFF,0x00,0x00,0x0F,0xF7,0xF8,0x00,0x00,0xFF,0x9F,0xE0,0x00,0x0F,0xF8,0xFF,0x80,0x00,0x7F,0xC3,0xFE,0x00,0x07,0xFC,0x0F,0xF8,0x00,0x7F,0xC0,0x7F,0xE0,0x07,0xFE,0x01,0xFF,0x00,0x1F,0xE0,0x0F,0xFC,0x00,0x3E,0x00,0x3F,0x00,0x00,0xF0,0x00,0xF0,0x00,0x01,0x00,0x06,0x00,0x00, // '*' + 0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x07,0xFF,0x80,0x00,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 0x0F,0xC0,0x7F,0xE1,0xFF,0xE7,0xFF,0xCF,0xFF,0xDF,0xFF,0xBF,0xFF,0x7F,0xFE,0xFF,0xFD,0xFF,0xF1,0xFF,0xE1,0xFF,0x80,0xFC,0x00, // '.' + 0x00,0x00,0x1F,0xF8,0x00,0x00,0x7F,0xC0,0x00,0x03,0xFF,0x00,0x00,0x0F,0xFC,0x00,0x00,0x3F,0xE0,0x00,0x00,0xFF,0x80,0x00,0x07,0xFE,0x00,0x00,0x1F,0xF0,0x00,0x00,0x7F,0xC0,0x00,0x03,0xFF,0x00,0x00,0x0F,0xF8,0x00,0x00,0x3F,0xE0,0x00,0x01,0xFF,0x80,0x00,0x07,0xFC,0x00,0x00,0x1F,0xF0,0x00,0x00,0xFF,0xC0,0x00,0x03,0xFE,0x00,0x00,0x0F,0xF8,0x00,0x00,0x7F,0xE0,0x00,0x01,0xFF,0x80,0x00,0x07,0xFC,0x00,0x00,0x1F,0xF0,0x00,0x00,0xFF,0xC0,0x00,0x03,0xFE,0x00,0x00,0x0F,0xF8,0x00,0x00,0x7F,0xE0,0x00,0x01,0xFF,0x00,0x00,0x07,0xFC,0x00,0x00,0x3F,0xF0,0x00,0x00,0xFF,0x80,0x00,0x03,0xFE,0x00,0x00,0x1F,0xF8,0x00,0x00,0x7F,0xC0,0x00,0x01,0xFF,0x00,0x00,0x0F,0xFC,0x00,0x00,0x3F,0xF0,0x00,0x00,0xFF,0x80,0x00,0x03,0xFE,0x00,0x00,0x1F,0xF8,0x00,0x00,0x7F,0xC0,0x00,0x01,0xFF,0x00,0x00,0x0F,0xFC,0x00,0x00,0x3F,0xE0,0x00,0x00,0xFF,0x80,0x00,0x07,0xFE,0x00,0x00,0x1F,0xF0,0x00,0x00,0x7F,0xC0,0x00,0x03,0xFF,0x00,0x00,0x0F,0xF8,0x00,0x00,0x3F,0xE0,0x00,0x01,0xFF,0x80,0x00,0x07,0xFE,0x00,0x00,0x1F,0xF0,0x00,0x00,0x7F,0xC0,0x00,0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0xFF,0xC0,0x00,0x00,0x03,0xFF,0xE0,0x00,0x00,0x00,0xFF,0xF8,0x00,0x00,0x00,0x7F,0xFC,0x00,0x00,0x00,0x1F,0xFF,0x00,0x00,0x00,0x0F,0xFF,0x80,0x00,0x00,0x03,0xFF,0xE0,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x7F,0xFC,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x0F,0xFF,0x80,0x00,0x00,0x03,0xFF,0xE0,0x00,0x00,0x01,0xFF,0xF0,0x00,0x00,0x00,0x7F,0xFC,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x0F,0xFF,0x80,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x01,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x01,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x3F,0xFE,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x07,0xFF,0xC0,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00, // '7' + 0x00,0x01,0xFF,0x80,0x00,0x00,0x0F,0xFF,0xFC,0x00,0x00,0x1F,0xFF,0xFF,0x80,0x00,0x3F,0xFF,0xFF,0xF0,0x00,0x3F,0xFF,0xFF,0xFC,0x00,0x3F,0xFF,0xFF,0xFF,0x00,0x3F,0xFF,0xFF,0xFF,0xC0,0x3F,0xFF,0xFF,0xFF,0xE0,0x1F,0xFF,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFE,0x0F,0xFF,0xF0,0xFF,0xFF,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0x80,0xFF,0xFF,0xFF,0xFF,0xC0,0x3F,0xFF,0xFF,0xFF,0xE0,0x07,0xFF,0xFD,0xFF,0xF0,0x00,0xFF,0xF8,0xFF,0xF0,0x00,0x0F,0xF0,0x7F,0xF8,0x00,0x00,0x00,0x7F,0xFC,0x00,0x00,0x00,0x3F,0xFC,0x00,0x00,0x00,0x3F,0xFE,0x00,0x00,0x00,0x1F,0xFF,0x00,0x00,0x00,0x1F,0xFF,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x7F,0xFF,0x80,0x00,0x01,0xFF,0xFF,0xC0,0x00,0x3F,0xFF,0xFF,0xC0,0x00,0x1F,0xFF,0xFF,0xC0,0x00,0x0F,0xFF,0xFF,0xC0,0x00,0x07,0xFF,0xFF,0xC0,0x00,0x03,0xFF,0xFF,0x80,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x3F,0xF8,0x00,0x00,0x00,0x1F,0xC0,0x00,0x00,0x00, // '9' + 0x0F,0xC0,0x7F,0xE1,0xFF,0xE7,0xFF,0xCF,0xFF,0xDF,0xFF,0xBF,0xFF,0x7F,0xFE,0xFF,0xFD,0xFF,0xF1,0xFF,0xE1,0xFF,0x80,0xFC,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,0x07,0xE0,0x3F,0xF0,0xFF,0xF3,0xFF,0xE7,0xFF,0xEF,0xFF,0xDF,0xFF,0xBF,0xFF,0x7F,0xFE,0xFF,0xF8,0xFF,0xF0,0xFF,0xC0,0x7E,0x00, // ':' + 0x03,0xF0,0x07,0xFE,0x07,0xFF,0x87,0xFF,0xC3,0xFF,0xF1,0xFF,0xF8,0xFF,0xFC,0x7F,0xFE,0x3F,0xFF,0x1F,0xFF,0x07,0xFF,0x81,0xFF,0x80,0x3F,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,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0x81,0xFF,0xC0,0xFF,0xE0,0x7F,0xF0,0x3F,0xF8,0x1F,0xFC,0x0F,0xFE,0x07,0xFF,0x03,0xFF,0x81,0xFF,0xC0,0xFF,0xC0,0x7F,0xE0,0x3F,0xF0,0x1F,0xF8,0x1F,0xFC,0x0F,0xFC,0x07,0xFE,0x07,0xFE,0x03,0xFF,0x03,0xFF,0x01,0xFF,0x81,0xFF,0x80,0x7F,0x80,0x0F,0x80,0x01,0x80,0x00, // ';' + 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x1F,0xFC,0x00,0x00,0x0F,0xFF,0x80,0x00,0x07,0xFF,0xF0,0x00,0x07,0xFF,0xFE,0x00,0x03,0xFF,0xFF,0xC0,0x03,0xFF,0xFF,0xF8,0x01,0xFF,0xFF,0xFF,0x01,0xFF,0xFF,0xFF,0xE0,0xFF,0xFF,0xFF,0xF8,0x7F,0xFF,0xFF,0xF8,0x3F,0xFF,0xFF,0xFC,0x07,0xFF,0xFF,0xFC,0x00,0xFF,0xFF,0xFC,0x00,0x1F,0xFF,0xFC,0x00,0x03,0xFF,0xFC,0x00,0x00,0x7F,0xFC,0x00,0x00,0x0F,0xFF,0xF0,0x00,0x01,0xFF,0xFF,0xC0,0x00,0x3F,0xFF,0xFF,0x00,0x07,0xFF,0xFF,0xF8,0x00,0xFF,0xFF,0xFF,0xE0,0x07,0xFF,0xFF,0xFF,0x80,0x3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xFC,0x00,0xFF,0xF8,0x00,0x00,0x03,0xFF,0xE0,0x00,0x00,0x0F,0xFF,0x80,0x00,0x00,0x7F,0xFE,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x7F,0xFE,0x00,0x00,0x03,0xFF,0xF8,0x00,0x00,0x1F,0xFF,0xC0,0x00,0x00,0xFF,0xFE,0x00,0x00,0x07,0xFF,0xF0,0x00,0x00,0x3F,0xFF,0x80,0x00,0x01,0xFF,0xFC,0x00,0x00,0x0F,0xFF,0xE0,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0xFF,0xF8,0x00,0x00,0x07,0xFF,0xC0,0x00,0x00,0x1F,0xFE,0x00,0x00,0x00,0x7F,0xF8,0x00,0x00,0x01,0xFF,0xC0,0x00,0x00,0x07,0xFF,0x00,0x00,0x00,0x1F,0xFC,0x00,0x00,0x00,0x7F,0xF0,0x00,0x00,0x01,0xFF,0xC0,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,0xE0,0x00,0x00,0x00,0x7F,0xE0,0x00,0x00,0x03,0xFF,0xC0,0x00,0x00,0x0F,0xFF,0x80,0x00,0x00,0x7F,0xFE,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x07,0xFF,0xF0,0x00,0x00,0x1F,0xFF,0xC0,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0xFF,0xF8,0x00,0x00,0x03,0xFF,0xC0,0x00,0x00,0x07,0xFE,0x00,0x00,0x00,0x07,0xE0,0x00,0x00, // '?' + 0x00,0x00,0x00,0x03,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,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0x00,0x0F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x04,0x00,0x00,0x00,0x0F,0xFF,0xE0,0x00,0x01,0xC0,0x00,0x00,0x00,0x7F,0xFF,0xE0,0x01,0xFC,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFC,0x00,0x00,0x00,0x00, // '@' + 0x00,0x00,0x07,0xFF,0xC0,0x00,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x0F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00,0x3F,0xFF,0xF0,0x00,0x00,0x00,0x00,0x3F,0xFF,0xF0,0x00,0x00,0x00,0x00,0x3F,0xFF,0xF8,0x00,0x00,0x00,0x00,0x7F,0xFF,0xF8,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFC,0x00,0x00,0x00,0x00,0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00,0xFF,0xFF,0xE0,0x00,0x00,0x01,0xFF,0xFF,0xFC,0x00,0x00,0x03,0xFF,0xFF,0xFF,0x80,0x00,0x03,0xFF,0xFF,0xFF,0xE0,0x00,0x07,0xFF,0xFF,0xFF,0xFC,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0x80,0x03,0xFF,0xFF,0xFF,0xFF,0xE0,0x03,0xFF,0xFF,0xFF,0xFF,0xF8,0x03,0xFF,0xFF,0xFF,0xFF,0xFE,0x01,0xFF,0xFF,0x01,0xFF,0xFF,0x01,0xFF,0xFE,0x00,0x3F,0xFF,0xC0,0xFF,0xFC,0x00,0x07,0xFF,0xE0,0xFF,0xFE,0x00,0x03,0xFF,0xF0,0x7F,0xFE,0x00,0x00,0xFF,0xFC,0x3F,0xFF,0x00,0x00,0x7F,0xFE,0x3F,0xFF,0x00,0x00,0x1F,0xFF,0x1F,0xFF,0x80,0x00,0x0F,0xFF,0x8F,0xFF,0xC0,0x00,0x07,0xFF,0xE7,0xFF,0xC0,0x00,0x03,0xFF,0xF7,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x01,0xFF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FF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,0xF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,0xFF,0xFC,0x07,0xFF,0xC0,0x00,0x0F,0xFF,0x81,0xFF,0xF8,0x00,0x01,0xFF,0xF0,0x3F,0xFE,0x00,0x00,0x1F,0xFF,0x0F,0xFF,0xC0,0x00,0x03,0xFF,0xE1,0xFF,0xF0,0x00,0x00,0x3F,0xFE,0x7F,0xFE,0x00,0x00,0x07,0xFF,0xCF,0xFF,0x80,0x00,0x00,0x7F,0xFD,0xFF,0xF0,0x00,0x00,0x0F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x1F,0xFF,0xFF,0xE0,0x00,0x00,0x01,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x3F,0xFF,0xFF,0x00,0x00,0x00,0x03,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x7F,0xFF,0xF8,0x00,0x00,0x00,0x07,0xFF,0xFF,0x00,0x00,0x00,0x00,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x0F,0xFF,0xF8,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00,0x00,0x1F,0xFF,0xC0,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00, // 'Y' + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xE3,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x00,0x01,0xFF,0xFC,0x00,0x00,0x00,0x0F,0xFF,0xE0,0x00,0x00,0x00,0x3F,0xFF,0x80,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80,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x3F,0xFE,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0xFF,0xF8,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x07,0xFF,0xC0,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x3F,0xFE,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0xFF,0xF8,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x07,0xFF,0xC0,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x3F,0xFE,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00,0xFF,0xF8,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x07,0xFF,0xC0,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x1F,0xFF,0x80,0x00,0x00,0x1F,0xFF,0x80, // '\' + 0xFF,0xFF,0xBF,0xFF,0xEF,0xFF,0xFB,0xFF,0xFE,0xFF,0xFF,0xBF,0xFF,0xEF,0xFF,0xFB,0xFF,0xFE,0xFF,0xFF,0xBF,0xFF,0xE0,0xFF,0xF8,0x3F,0xFE,0x0F,0xFF,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x3F,0xFC,0x00,0x3F,0xFC,0x00,0x3F,0xF8,0x00,0x7F,0xF8,0x00,0x7F,0xF0,0x00,0xFF,0xE0,0x01,0xFF,0xE0,0x03,0xFF,0xC0,0x03,0xFF,0x80,0x07,0xFF,0x00,0x0F,0xFE,0x00,0x1F,0xFC,0x00,0x3F,0xF8,0x00,0x7F,0xF0,0x00,0xFF,0xE0,0x01,0xFF,0xC0,0x03,0xFF,0x80,0x07,0xFF,0x00,0x0F,0xFE,0x00,0x1F,0xFC,0x00,0x3F,0xF8,0x00,0x7F,0xF0,0x00,0xFF,0xF0,0x01,0xFF,0xE0,0x01,0xFF,0xC0,0x03,0xFF,0xC0,0x07,0xFF,0xE0,0x07,0xFF,0xF0,0x07,0xFF,0xE0,0x07,0xFF,0xC0,0x07,0xFF,0x80,0x03,0xFF,0x00,0x1F,0xFE,0x00,0x7F,0xFC,0x01,0xFF,0xF8,0x07,0xFF,0xF0,0x1F,0xFF,0x80,0x3F,0xFC,0x00,0x7F,0xF0,0x01,0xFF,0xE0,0x03,0xFF,0x80,0x07,0xFF,0x00,0x0F,0xFE,0x00,0x1F,0xFC,0x00,0x3F,0xF8,0x00,0x7F,0xF0,0x00,0xFF,0xE0,0x01,0xFF,0xC0,0x03,0xFF,0x80,0x07,0xFF,0x00,0x0F,0xFE,0x00,0x1F,0xFC,0x00,0x3F,0xF8,0x00,0x7F,0xF0,0x00,0xFF,0xE0,0x03,0xFF,0xC0,0x07,0xFF,0x80,0x0F,0xFE,0x00,0x3F,0xFC,0x00,0x7F,0xF8,0x01,0xFF,0xE0,0x07,0xFF,0x80,0x1F,0xFF,0x00,0x3F,0xFC,0x00,0x7F,0xF0,0x00,0x7F,0xC0,0x00,0xFE,0x00,0x00,0xF0,0x00,0x01,0x80,0x00,0x00 // '}' +}; +const GFXglyph Roboto_Black_80Glyphs[] = { +// bitmapOffset, width, height, xAdvance, xOffset, yOffset + { 0, 1, 1, 21, 0, 0 }, // ' ' + { 1, 16, 58, 23, 4, -57 }, // '!' + { 117, 24, 22, 26, 1, -60 }, // '"' + { 183, 45, 57, 47, 1, -57 }, // '#' + { 504, 41, 75, 47, 3, -66 }, // '$' + { 889, 53, 59, 60, 4, -58 }, // '%' + { 1280, 52, 59, 55, 2, -58 }, // '&' + { 1664, 11, 22, 13, 1, -60 }, // ''' + { 1695, 23, 81, 29, 5, -63 }, // '(' + { 1928, 24, 81, 29, 1, -63 }, // ')' + { 2171, 37, 34, 38, 1, -57 }, // '*' + { 2329, 40, 41, 44, 2, -47 }, // '+' + { 2534, 16, 25, 23, 2, -10 }, // ',' + { 2584, 24, 10, 37, 6, -30 }, // '-' + { 2614, 15, 13, 25, 5, -13 }, // '.' + { 2639, 30, 62, 29, -1, -57 }, // '/' + { 2872, 41, 59, 47, 3, -58 }, // '0' + { 3175, 28, 57, 47, 6, -57 }, // '1' + { 3375, 42, 58, 47, 2, -58 }, // '2' + { 3680, 42, 59, 47, 2, -58 }, // '3' + { 3990, 43, 57, 47, 2, -57 }, // '4' + { 4297, 41, 58, 47, 3, -57 }, // '5' + { 4595, 42, 59, 47, 3, -58 }, // '6' + { 4905, 42, 57, 47, 2, -57 }, // '7' + { 5205, 41, 59, 47, 3, -58 }, // '8' + { 5508, 41, 59, 47, 3, -58 }, // '9' + { 5811, 15, 44, 25, 5, -44 }, // ':' + { 5894, 17, 59, 24, 3, -44 }, // ';' + { 6020, 35, 39, 42, 2, -43 }, // '<' + { 6191, 37, 27, 48, 5, -38 }, // '=' + { 6316, 36, 39, 42, 4, -43 }, // '>' + { 6492, 38, 58, 42, 1, -58 }, // '?' + { 6768, 68, 73, 73, 2, -55 }, // '@' + { 7389, 56, 57, 56, 0, -57 }, // 'A' + { 7788, 46, 57, 53, 4, -57 }, // 'B' + { 8116, 49, 59, 54, 3, -58 }, // 'C' + { 8478, 46, 57, 53, 4, -57 }, // 'D' + { 8806, 41, 57, 46, 4, -57 }, // 'E' + { 9099, 39, 57, 45, 4, -57 }, // 'F' + { 9377, 49, 59, 56, 3, -58 }, // 'G' + { 9739, 49, 57, 57, 4, -57 }, // 'H' + { 10089, 15, 57, 25, 5, -57 }, // 'I' + { 10196, 41, 58, 46, 1, -57 }, // 'J' + { 10494, 49, 57, 52, 4, -57 }, // 'K' + { 10844, 39, 57, 44, 4, -57 }, // 'L' + { 11122, 63, 57, 71, 4, -57 }, // 'M' + { 11571, 49, 57, 57, 4, -57 }, // 'N' + { 11921, 50, 59, 56, 3, -58 }, // 'O' + { 12290, 46, 57, 53, 4, -57 }, // 'P' + { 12618, 50, 69, 56, 3, -58 }, // 'Q' + { 13050, 47, 57, 53, 4, -57 }, // 'R' + { 13385, 46, 59, 51, 2, -58 }, // 'S' + { 13725, 49, 57, 51, 1, -57 }, // 'T' + { 14075, 46, 58, 54, 4, -57 }, // 'U' + { 14409, 54, 57, 54, 0, -57 }, // 'V' + { 14794, 69, 57, 71, 1, -57 }, // 'W' + { 15286, 52, 57, 52, 0, -57 }, // 'X' + { 15657, 51, 57, 51, 0, -57 }, // 'Y' + { 16021, 46, 57, 50, 2, -57 }, // 'Z' + { 16349, 19, 81, 24, 4, -67 }, // '[' + { 16542, 39, 62, 35, -1, -57 }, // '\' + { 16845, 18, 81, 24, 1, -67 }, // ']' + { 17028, 34, 28, 37, 2, -57 }, // '^' + { 17147, 36, 10, 36, 0, 0 }, // '_' + { 17192, 23, 12, 28, 2, -60 }, // '`' + { 17227, 40, 44, 43, 2, -43 }, // 'a' + { 17447, 40, 61, 46, 4, -60 }, // 'b' + { 17752, 39, 44, 43, 2, -43 }, // 'c' + { 17967, 40, 61, 46, 2, -60 }, // 'd' + { 18272, 41, 44, 45, 2, -43 }, // 'e' + { 18498, 30, 61, 30, 0, -61 }, // 'f' + { 18727, 41, 60, 47, 2, -43 }, // 'g' + { 19035, 39, 60, 46, 3, -60 }, // 'h' + { 19328, 15, 60, 23, 4, -60 }, // 'i' + { 19441, 23, 77, 23, -4, -60 }, // 'j' + { 19663, 42, 60, 45, 4, -60 }, // 'k' + { 19978, 15, 60, 23, 4, -60 }, // 'l' + { 20091, 62, 43, 70, 4, -43 }, // 'm' + { 20425, 39, 43, 46, 3, -43 }, // 'n' + { 20635, 42, 44, 46, 2, -43 }, // 'o' + { 20866, 40, 59, 46, 4, -43 }, // 'p' + { 21161, 40, 59, 46, 2, -43 }, // 'q' + { 21456, 26, 43, 31, 4, -43 }, // 'r' + { 21596, 39, 44, 42, 1, -43 }, // 's' + { 21811, 27, 54, 28, 0, -53 }, // 't' + { 21994, 40, 43, 46, 3, -42 }, // 'u' + { 22209, 42, 42, 42, 0, -42 }, // 'v' + { 22430, 57, 42, 59, 1, -42 }, // 'w' + { 22730, 42, 42, 42, 0, -42 }, // 'x' + { 22951, 42, 59, 42, 0, -42 }, // 'y' + { 23261, 36, 42, 42, 3, -42 }, // 'z' + { 23450, 23, 76, 27, 2, -62 }, // '{' + { 23669, 8, 68, 21, 7, -57 }, // '|' + { 23737, 23, 76, 27, 2, -62 } // '}' +}; +const GFXfont Roboto_Black_80 = { +(uint8_t *)Roboto_Black_80Bitmaps,(GFXglyph *)Roboto_Black_80Glyphs,0x20, 0x7E, 95}; + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/app_cfg.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/app_cfg.h new file mode 100644 index 00000000..91bf13dd --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/app_cfg.h @@ -0,0 +1,128 @@ +/******************************************************************************************************** + * @file app_cfg.h + * + * @brief This is the header file for app_cfg + * + * @author Zigbee Group + * @date 2021 + * + * @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************************************/ + +#pragma once + +/* Enable C linkage for C++ Compilers: */ +#if defined(__cplusplus) +extern "C" +{ +#endif + +#define ON 1 +#define OFF 0 + +#ifndef MCU_CORE_8258 +#define MCU_CORE_8258 1 +#endif + +#define RAM _attribute_data_retention_ // short version, this is needed to keep the values in ram after sleep + +/********************************************************************** + * Version configuration + */ +#include "version_cfg.h" + +/* PM */ +#define PM_ENABLE ON + + +/* Board ID */ +#define BOARD_8258_DIY 10 + +/* Board define */ +#if (CHIP_TYPE == TLSR_8258_1M) +#define FLASH_CAP_SIZE_1M 1 +#endif +#define BOARD BOARD_8258_DIY // BOARD_8258_DONGLE //BOARD_TB_04 //BOARD_8258_EVK // +#define CLOCK_SYS_CLOCK_HZ 24000000 +/************************* For 512K Flash only ***************************************/ +/* Flash map: + 0x00000 Old Firmware bin + 0x34000 NV_1 + 0x40000 OTA New bin storage Area + 0x76000 MAC address + 0x77000 C_Cfg_Info + 0x78000 U_Cfg_Info + 0x7A000 NV_2 + 0x80000 End Flash + */ +#define USER_DATA_SIZE 0x34000 +#define BEGIN_USER_DATA1 0x00000 +#define END_USER_DATA1 (BEGIN_USER_DATA1 + USER_DATA_SIZE) +#define BEGIN_USER_DATA2 0x40000 +#define END_USER_DATA2 (BEGIN_USER_DATA2 + USER_DATA_SIZE) + // #define GEN_USER_CFG_DATA END_USER_DATA2 +#define NV_ITEM_APP_USER_CFG (NV_ITEM_APP_GP_TRANS_TABLE + 1) // see sdk/proj/drivers/drv_nv.h + +/* Board include */ +#include "board_8258_diy.h" + +/* Voltage detect module */ +/* If VOLTAGE_DETECT_ENABLE is set, + * 1) if MCU_CORE_826x is defined, the DRV_ADC_VBAT_MODE mode is used by default, + * and there is no need to configure the detection IO port; + * 2) if MCU_CORE_8258 or MCU_CORE_8278 is defined, the DRV_ADC_VBAT_MODE mode is used by default, + * we need to configure the detection IO port, and the IO must be in a floating state. + * 3) if MCU_CORE_B91 is defined, the DRV_ADC_BASE_MODE mode is used by default, + * we need to configure the detection IO port, and the IO must be connected to the target under test, + * such as VCC. + */ +#define VOLTAGE_DETECT_ENABLE OFF + +#if defined(MCU_CORE_826x) +#define VOLTAGE_DETECT_ADC_PIN 0 +#elif defined(MCU_CORE_8258) || defined(MCU_CORE_8278) +#define VOLTAGE_DETECT_ADC_PIN GPIO_PB7 +#elif defined(MCU_CORE_B91) +#define VOLTAGE_DETECT_ADC_PIN ADC_GPIO_PB0 +#endif + +/* Watch dog module */ +#define MODULE_WATCHDOG_ENABLE OFF + +/* UART module */ +#define MODULE_UART_ENABLE OFF + + /********************************************************************** + * EV configuration + */ + typedef enum + { + EV_POLL_ED_DETECT, + EV_POLL_HCI, + EV_POLL_IDLE, + EV_POLL_MAX, + } ev_poll_e; + +enum{ + CLOCK_SYS_CLOCK_1S = CLOCK_SYS_CLOCK_HZ, + CLOCK_SYS_CLOCK_1MS = (CLOCK_SYS_CLOCK_1S / 1000), + CLOCK_SYS_CLOCK_1US = (CLOCK_SYS_CLOCK_1S / 1000000), +}; +/* Disable C linkage for C++ Compilers: */ +#if defined(__cplusplus) +} +#endif diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/battery.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/battery.c new file mode 100644 index 00000000..e2d6b908 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/battery.c @@ -0,0 +1,85 @@ +#include +#include "tl_common.h" + +#include "battery.h" + +RAM volatile unsigned int adc_dat_buf[8]; + +void adc_bat_init(void) +{ + adc_power_on_sar_adc(0); + gpio_set_output_en(GPIO_PB7, 1); + gpio_set_input_en(GPIO_PB7, 0); + gpio_write(GPIO_PB7, 1); + adc_set_sample_clk(5); + adc_set_left_right_gain_bias(GAIN_STAGE_BIAS_PER100, GAIN_STAGE_BIAS_PER100); + adc_set_chn_enable_and_max_state_cnt(ADC_MISC_CHN, 2); + adc_set_state_length(240, 0, 10); + analog_write(anareg_adc_res_m, RES14 | FLD_ADC_EN_DIFF_CHN_M); + adc_set_ain_chn_misc(B7P, GND); + adc_set_ref_voltage(ADC_MISC_CHN, ADC_VREF_1P2V); + adc_set_tsample_cycle_chn_misc(SAMPLING_CYCLES_6); + adc_set_ain_pre_scaler(ADC_PRESCALER_1F8); + adc_power_on_sar_adc(1); +} + +uint16_t get_battery_mv() +{ + uint16_t temp; + int i, j; + adc_bat_init(); + adc_reset_adc_module(); + u32 t0 = clock_time(); + + uint16_t adc_sample[8] = {0}; + u32 adc_result; + for (i = 0; i < 8; i++) + { + adc_dat_buf[i] = 0; + } + while (!clock_time_exceed(t0, 25)) + ; + adc_config_misc_channel_buf((uint16_t *)adc_dat_buf, 8 << 2); + dfifo_enable_dfifo2(); + + for (i = 0; i < 8; i++) + { + while (!adc_dat_buf[i]) + ; + if (adc_dat_buf[i] & BIT(13)) + { + adc_sample[i] = 0; + } + else + { + adc_sample[i] = ((uint16_t)adc_dat_buf[i] & 0x1FFF); + } + if (i) + { + if (adc_sample[i] < adc_sample[i - 1]) + { + temp = adc_sample[i]; + adc_sample[i] = adc_sample[i - 1]; + for (j = i - 1; j >= 0 && adc_sample[j] > temp; j--) + { + adc_sample[j + 1] = adc_sample[j]; + } + adc_sample[j + 1] = temp; + } + } + } + dfifo_disable_dfifo2(); + u32 adc_average = (adc_sample[2] + adc_sample[3] + adc_sample[4] + adc_sample[5]) / 4; + adc_result = adc_average; + return (adc_result * 1175) >> 10; +} + +uint8_t get_battery_level(uint16_t battery_mv) +{ + uint8_t battery_level = (battery_mv - 2200) / (31 - 22); + if (battery_level > 100) + battery_level = 100; + if (battery_mv < 2200) + battery_level = 0; + return battery_level; +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/battery.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/battery.h new file mode 100644 index 00000000..8bb71657 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/battery.h @@ -0,0 +1,6 @@ +#pragma once + +#include + +uint16_t get_battery_mv(); +uint8_t get_battery_level(uint16_t battery_mv); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/bitmaps.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/bitmaps.h new file mode 100644 index 00000000..645b82bc --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/bitmaps.h @@ -0,0 +1,298 @@ +#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 + +#include "screen.h" + +static const uint8_t oepli[] = { + 128, 26, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x01, 0xc0, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x01, 0xc0, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x01, 0xc0, + 0xf7, 0x80, 0x00,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, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 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, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +static const uint8_t cloud[] = { + 128, 50, + 0x00, 0x08, 0x82, 0xa2, 0xab, 0x55, 0xbf, 0xff, 0xff, 0xff, 0x7d, 0xb4, 0x62, 0x28, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x11, 0x76, 0xff, 0x7b, 0xff, 0xff, 0x7f, 0xb7, 0xa9, 0x55, 0x50, 0x51, 0x00, + 0x00, 0x29, 0x22, 0x96, 0x6f, 0xf7, 0xbf, 0xff, 0xff, 0xff, 0xea, 0xe6, 0x22, 0xaa, 0x08, 0x00, + 0x00, 0x02, 0x54, 0x2a, 0xbf, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xfd, 0x59, 0xb4, 0x10, 0x20, 0x00, + 0x00, 0x24, 0x23, 0xb5, 0xb5, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xae, 0x48, 0x55, 0x10, 0x00, + 0x00, 0x88, 0x90, 0x54, 0x6a, 0xef, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xf5, 0xa3, 0x82, 0x00, 0x00, + 0x00, 0x01, 0x2d, 0xa3, 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xbe, 0x4e, 0x52, 0x09, 0x00, + 0x04, 0x90, 0x02, 0x0d, 0x55, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xdd, 0x68, 0xa9, 0x00, 0x10, + 0x00, 0x49, 0x0c, 0xfb, 0xab, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xeb, 0x95, 0x5a, 0x00, 0x20, + 0x00, 0x12, 0x91, 0x22, 0xbf, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0x65, 0x81, 0x40, 0x40, + 0x00, 0x28, 0x12, 0x7d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xab, 0x28, 0x00, 0x00, + 0x00, 0x42, 0x0a, 0x97, 0x75, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x4a, 0xc2, 0x04, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x02, 0x9c, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6a, 0x6a, 0x8d, 0x00, 0x20, + 0x00, 0x04, 0x4d, 0x72, 0xaa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xd5, 0x74, 0x80, 0x00, + 0x02, 0x40, 0x12, 0x8e, 0xdf, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xae, 0xaa, 0x0a, 0x11, 0x20, + 0x00, 0x20, 0x52, 0x5f, 0xf5, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x72, 0x94, 0xaa, 0x24, 0x00, + 0x00, 0x01, 0x0a, 0xab, 0x6f, 0x77, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xaf, 0x54, 0x54, 0x88, 0x00, + 0x00, 0x04, 0x80, 0x4d, 0x95, 0xeb, 0xff, 0xff, 0xff, 0xff, 0x5b, 0x58, 0xb5, 0x51, 0x40, 0x00, + 0x00, 0x08, 0x08, 0xa6, 0xb3, 0xf7, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xad, 0x4a, 0xa0, 0x10, 0x00, + 0x00, 0x02, 0x96, 0x41, 0xdc, 0xae, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xbf, 0xea, 0x48, 0x02, 0x00, + 0x00, 0x00, 0x09, 0x3e, 0xab, 0x75, 0xef, 0xff, 0xff, 0xff, 0xff, 0xd4, 0xb1, 0x21, 0x08, 0x00, + 0x00, 0x00, 0x0a, 0xc3, 0x5d, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xef, 0xef, 0x44, 0x4a, 0x64, 0x80, + 0x00, 0x00, 0xa1, 0x52, 0xa6, 0xef, 0xef, 0xff, 0xff, 0xff, 0xd6, 0xca, 0xf5, 0x10, 0x18, 0x00, + 0x00, 0x00, 0x02, 0x15, 0x4b, 0xd5, 0xdf, 0xff, 0xff, 0xf7, 0xeb, 0xd4, 0xd8, 0x85, 0x00, 0x00, +}; + +static const uint8_t receive[] = { + 56, 56, + 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, 0x07, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf0, + 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xf0, + 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xc0, + 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x03, 0xe0, + 0x00, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0xf0, + 0x00, 0x00, 0xfe, 0x00, 0x03, 0xff, 0xf0, + 0x00, 0x01, 0xfc, 0x00, 0x0f, 0xff, 0xf0, + 0x00, 0x01, 0xf8, 0x00, 0x3f, 0xff, 0xf0, + 0x00, 0x03, 0xf8, 0x00, 0xff, 0xff, 0x80, + 0x00, 0x07, 0xf0, 0x01, 0xff, 0xe0, 0x00, + 0x00, 0x0f, 0xe0, 0x03, 0xff, 0x00, 0x00, + 0x00, 0x0f, 0xc0, 0x0f, 0xf8, 0x00, 0x00, + 0x00, 0x1f, 0x80, 0x1f, 0xf0, 0x00, 0x00, + 0x00, 0x1f, 0x80, 0x3f, 0xc0, 0x00, 0x00, + 0x00, 0x3f, 0x00, 0x3f, 0x80, 0x00, 0x00, + 0x00, 0x3f, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x7e, 0x00, 0xfe, 0x00, 0x07, 0xe0, + 0x00, 0x7e, 0x01, 0xfc, 0x00, 0x1f, 0xf0, + 0x00, 0xfc, 0x01, 0xf8, 0x00, 0x7f, 0xf0, + 0x00, 0xfc, 0x03, 0xf0, 0x01, 0xff, 0xf0, + 0x00, 0xf8, 0x03, 0xf0, 0x03, 0xff, 0xf0, + 0x01, 0xf8, 0x07, 0xe0, 0x07, 0xff, 0x00, + 0x01, 0xf8, 0x07, 0xe0, 0x0f, 0xf0, 0x00, + 0x01, 0xf0, 0x0f, 0xc0, 0x1f, 0xe0, 0x00, + 0x01, 0xf0, 0x0f, 0xc0, 0x3f, 0x80, 0x00, + 0x03, 0xf0, 0x0f, 0x80, 0x3f, 0x00, 0x00, + 0x03, 0xf0, 0x1f, 0x80, 0x7e, 0x00, 0x00, + 0x03, 0xe0, 0x1f, 0x80, 0x7e, 0x00, 0x00, + 0x03, 0xe0, 0x1f, 0x00, 0xfc, 0x01, 0xe0, + 0x03, 0xe0, 0x1f, 0x00, 0xfc, 0x07, 0xf8, + 0x03, 0xe0, 0x1f, 0x00, 0xf8, 0x0f, 0xfc, + 0x03, 0xe0, 0x3f, 0x00, 0xf8, 0x0f, 0xfc, + 0x03, 0xe0, 0x3f, 0x01, 0xf8, 0x1f, 0xfe, + 0x03, 0xe0, 0x3f, 0x01, 0xf8, 0x1f, 0xfe, + 0x03, 0xe0, 0x3f, 0x01, 0xf8, 0x1f, 0xfe, + 0x03, 0xc0, 0x3e, 0x01, 0xf0, 0x1f, 0xfe, + 0x01, 0xc0, 0x1e, 0x00, 0xf0, 0x0f, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + + +static const uint8_t failed[] = { + 48, 48, + 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x03, 0xff, 0xff, 0xe0, 0x00, + 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, + 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, + 0x00, 0x7f, 0xf0, 0x0f, 0xfe, 0x00, + 0x00, 0xff, 0x80, 0x01, 0xff, 0x00, + 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, + 0x03, 0xf8, 0x00, 0x00, 0x1f, 0xc0, + 0x07, 0xf0, 0x00, 0x00, 0x3f, 0xe0, + 0x0f, 0xe0, 0x00, 0x00, 0x7f, 0xf0, + 0x0f, 0xc0, 0x00, 0x00, 0xff, 0xf0, + 0x1f, 0x80, 0x00, 0x01, 0xff, 0xf8, + 0x1f, 0x00, 0x00, 0x03, 0xff, 0xf8, + 0x3f, 0x00, 0x00, 0x07, 0xfe, 0xfc, + 0x3e, 0x00, 0x00, 0x0f, 0xfc, 0x7c, + 0x7e, 0x00, 0x00, 0x1f, 0xf8, 0x7e, + 0x7c, 0x00, 0x00, 0x3f, 0xf0, 0x3e, + 0x7c, 0x00, 0x00, 0x7f, 0xe0, 0x3e, + 0xfc, 0x00, 0x00, 0xff, 0xc0, 0x3f, + 0xf8, 0x00, 0x01, 0xff, 0x80, 0x1f, + 0xf8, 0x00, 0x03, 0xff, 0x00, 0x1f, + 0xf8, 0x00, 0x07, 0xfe, 0x00, 0x1f, + 0xf8, 0x00, 0x0f, 0xfc, 0x00, 0x1f, + 0xf8, 0x00, 0x1f, 0xf8, 0x00, 0x1f, + 0xf8, 0x00, 0x3f, 0xf0, 0x00, 0x1f, + 0xf8, 0x00, 0x7f, 0xe0, 0x00, 0x1f, + 0xf8, 0x00, 0xff, 0xc0, 0x00, 0x1f, + 0xfc, 0x01, 0xff, 0x80, 0x00, 0x3f, + 0x7c, 0x03, 0xff, 0x00, 0x00, 0x3e, + 0x7c, 0x07, 0xfe, 0x00, 0x00, 0x3e, + 0x7e, 0x0f, 0xfc, 0x00, 0x00, 0x7e, + 0x3e, 0x1f, 0xf8, 0x00, 0x00, 0x7c, + 0x3f, 0x3f, 0xf0, 0x00, 0x00, 0xfc, + 0x3f, 0x7f, 0xe0, 0x00, 0x00, 0xfc, + 0x1f, 0xff, 0xc0, 0x00, 0x01, 0xf8, + 0x0f, 0xff, 0x80, 0x00, 0x03, 0xf0, + 0x0f, 0xff, 0x00, 0x00, 0x07, 0xf0, + 0x07, 0xfe, 0x00, 0x00, 0x0f, 0xe0, + 0x03, 0xfc, 0x00, 0x00, 0x1f, 0xc0, + 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, + 0x00, 0xff, 0x80, 0x01, 0xff, 0x00, + 0x00, 0x7f, 0xf0, 0x0f, 0xfe, 0x00, + 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, + 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, + 0x00, 0x03, 0xff, 0xff, 0xe0, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, +}; + +#if (SCREEN_WIDTH != 128) +static const uint8_t ant[] = { + 16, 16, + 0x00, 0x40, + 0x02, 0x20, + 0x01, 0x20, + 0x11, 0x20, + 0x11, 0x20, + 0x12, 0x20, + 0x28, 0x40, + 0x28, 0x00, + 0x28, 0x00, + 0x44, 0x00, + 0x44, 0x00, + 0x44, 0x00, + 0x44, 0x00, + 0x82, 0x00, + 0x82, 0x00, + 0xfe, 0x00, +}; +#else +static const uint8_t ant[] = { + // rotated 90 degrees + 16,16, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x7c, 0x00, + 0x82, 0x00, + 0x00, 0x00, + 0x38, 0x00, + 0x44, 0x07, + 0x00, 0x79, + 0x03, 0x81, + 0x1c, 0x01, + 0x03, 0x81, + 0x00, 0x79, + 0x00, 0x07, +}; +#endif +static const uint8_t cross[] = { + 8,8, + 0x00, + 0x63, + 0x77, + 0x3e, + 0x1c, + 0x3e, + 0x77, + 0x63 +}; + +#if (SCREEN_WIDTH != 128) +static const uint8_t battery[] = { + 16,10, + 0x00, 0x00, + 0x7f, 0xfc, + 0x40, 0x04, + 0x58, 0x06, + 0x58, 0x06, + 0x58, 0x06, + 0x58, 0x06, + 0x40, 0x04, + 0x7f, 0xfc, + 0x00, 0x00, +}; +#else +// this battery symbol is rotated 90' +static const uint8_t battery[] = { +16,16, + 0x00, 0x00, + 0x03, 0xc0, + 0x0f, 0xf0, + 0x08, 0x10, + 0x08, 0x10, + 0x08, 0x10, + 0x08, 0x10, + 0x08, 0x10, + 0x08, 0x10, + 0x08, 0x10, + 0x08, 0x10, + 0x0b, 0xd0, + 0x0b, 0xd0, + 0x08, 0x10, + 0x0f, 0xf0, + 0x00, 0x00, +}; + +#endif + +#endif \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/board.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/board.h new file mode 100644 index 00000000..39264a9e --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/board.h @@ -0,0 +1,31 @@ +#ifndef _BOARD_H_ +#define _BOARD_H_ + +#include +#include "proto.h" +#include "main.h" + +//eeprom map +#define EEPROM_SETTINGS_AREA_START (0x40000UL) +#define EEPROM_SETTINGS_AREA_LEN (0x03000UL) + +#define EEPROM_UPDATA_AREA_START (0x43000UL) +#define EEPROM_UPDATE_AREA_LEN (0x20000UL) + +#define EEPROM_IMG_START (0x43000UL) +#define EEPROM_IMG_EACH (0x7000UL) +#define EEPROM_IMG_LEN (0x20000UL) + +#define EEPROM_PAGE_SIZE (0x01000) +//till end of eeprom really. do not put anything after - it will be erased at pairing time!!! +#define EEPROM_PROGRESS_BYTES (128) + + +#define HAS_EEPROM 1 +#define HAS_SCREEN 1 +#define AP_EMULATE_TAG 1 + +//hw types +#define HW_TYPE 0x60 + +#endif diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/board_8258_diy.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/board_8258_diy.h new file mode 100644 index 00000000..2f42a45b --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/board_8258_diy.h @@ -0,0 +1,24 @@ +#ifndef SRC_INCLUDE_BOARD_8258_DIY_H_ +#define SRC_INCLUDE_BOARD_8258_DIY_H_ + +/************************* For 512K Flash only ***************************************/ +/* Flash map: + 0x00000 Old Firmware bin + 0x34000 NV_1 + 0x40000 OTA New bin storage Area + 0x76000 MAC address + 0x77000 C_Cfg_Info + 0x78000 U_Cfg_Info + 0x7A000 NV_2 + 0x80000 End Flash + */ +#define USER_DATA_SIZE 0x34000 +#define BEGIN_USER_DATA1 0x00000 +#define END_USER_DATA1 (BEGIN_USER_DATA1 + USER_DATA_SIZE) +#define BEGIN_USER_DATA2 0x40000 +#define END_USER_DATA2 (BEGIN_USER_DATA2 + USER_DATA_SIZE) +#define GEN_USER_CFG_DATA END_USER_DATA2 + + + +#endif /* SRC_INCLUDE_BOARD_8258_DIY_H_ */ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comm_cfg.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comm_cfg.h new file mode 100644 index 00000000..88e4f42b --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comm_cfg.h @@ -0,0 +1,83 @@ +/******************************************************************************************************** + * @file comm_cfg.h + * + * @brief This is the header file for comm_cfg + * + * @author Zigbee Group + * @date 2021 + * + * @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************************************/ + +#pragma once + + +/********************************************************************** + * User configuration whether to use boot loader mode. + * + * NOTE: + * We do not recommend using BootLoader mode on 512K flash chips, + * because in boot loader mode, it can only support up to 196k firmware + * according to the current default Flash Map. + * + * Please refer to the drv_nv.h file, and check if the firmware size + * exceeds the maximum limit. + * + * The user can configure the CHIP_TYPE used by the corresponding + * project in the version.h file according to the actual size + * of the flash at hand. + * + * If BOOT_LOADER_MODE is 0, it means that the SDK uses Normal Mode, + * hardware multi-address (0x0000 or 0x40000) startup mode. + * If BOOT_LOADER_MODE is 1, it means that the SDK uses Boot Loader Mode. + * + * Normal mode is used by default. + */ +#define BOOT_LOADER_MODE 0 + + + +/* Boot loader address. */ +#define BOOT_LOADER_IMAGE_ADDR 0x0 + +/* APP image address. */ +#if (BOOT_LOADER_MODE) + #define APP_IMAGE_ADDR 0x8000 +#else + #define APP_IMAGE_ADDR 0x0 +#endif + + +/* Chip IDs */ +#define TLSR_8267 0x00 +#define TLSR_8269 0x01 +#define TLSR_8258_512K 0x02 +#define TLSR_8258_1M 0x03 +#define TLSR_8278 0x04 +#define TLSR_B91 0x05 + +/* Image types */ +#if (BOOT_LOADER_MODE) + #define IMAGE_TYPE_BOOT_FLAG 1 +#else + #define IMAGE_TYPE_BOOT_FLAG 0 +#endif +#define IMAGE_TYPE_BOOTLOADER (0xFF) +#define IMAGE_TYPE_GW (0x00 | (IMAGE_TYPE_BOOT_FLAG << 7)) +#define IMAGE_TYPE_LIGHT (0x01 | (IMAGE_TYPE_BOOT_FLAG << 7)) +#define IMAGE_TYPE_SWITCH (0x02 | (IMAGE_TYPE_BOOT_FLAG << 7)) +#define IMAGE_TYPE_CONTACT_SENSOR (0x03 | (IMAGE_TYPE_BOOT_FLAG << 7)) diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comms.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comms.c new file mode 100644 index 00000000..73d091e9 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comms.c @@ -0,0 +1,45 @@ +#include +#include +#include "tl_common.h" +#include "proto.h" +#include "zigbee.h" +#include "comms.h" + +#define ADDR_MODE_NONE (0) +#define ADDR_MODE_SHORT (2) +#define ADDR_MODE_LONG (3) + +#define FRAME_TYPE_BEACON (0) +#define FRAME_TYPE_DATA (1) +#define FRAME_TYPE_ACK (2) +#define FRAME_TYPE_MAC_CMD (3) + +extern uint8_t mSelfMac[8]; +uint8_t mLastLqi = 0; +int8_t mLastRSSI = 0; + +uint8_t commsGetLastPacketLQI(void) +{ + return mLastLqi; +} + +int8_t commsGetLastPacketRSSI(void) +{ + return mLastRSSI; +} + +int8_t commsRxUnencrypted(uint8_t *data) +{ + memset(data, 0, 128); + int8_t rxedLen = radioRxDequeuePkt(data, 128, &mLastRSSI, &mLastLqi); + if (rxedLen < 0) + return COMMS_RX_ERR_NO_PACKETS; + if (memcmp((void *)&data[5], mSelfMac, 8)) // Here we filter for our MAC Address... in software... + return COMMS_RX_ERR_INVALID_PACKET; + return rxedLen; +} + +bool commsTxNoCpy(const void *packetp) +{ + return radioTxLL(packetp); +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comms.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comms.h new file mode 100644 index 00000000..8fba53a2 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/comms.h @@ -0,0 +1,24 @@ +#ifndef _COMMS_H_ +#define _COMMS_H_ + +#include +#include + + +#define COMMS_MAX_RADIO_WAIT_MSEC 200 + +#define COMMS_RX_ERR_NO_PACKETS (-1) +#define COMMS_RX_ERR_INVALID_PACKET (-2) + +#define COMMS_MAX_PACKET_SZ (127) + +extern uint8_t mLastLqi; +extern int8_t mLastRSSI; + +int8_t commsRxUnencrypted(uint8_t *data); +bool commsTxUnencrypted(const void *packetP, uint8_t len); + +bool commsTxNoCpy(const void *packetp); + + +#endif diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/drawing.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/drawing.c new file mode 100644 index 00000000..97887835 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/drawing.c @@ -0,0 +1,67 @@ +#include "drawing.h" + +#include +#include "tl_common.h" +#include "board.h" +#include "eeprom.h" +#include "proto.h" +#include "screen.h" +#include "epd.h" + +static uint8_t mClutMap[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\r\n"); + EPD_Display_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); + } + EPD_Display_byte(mClutMap[c % 256]); + } + EPD_Display_color_change(); + for (uint32_t c = 0; c < (SCREEN_HEIGHT * (SCREEN_WIDTH / 8)); c++) + { + EPD_Display_byte(0x00); + } + EPD_Display_end(); + break; + case DATATYPE_IMG_RAW_2BPP: + printf("Doing raw 2bpp\r\n"); + EPD_Display_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); + } + EPD_Display_byte(mClutMap[c % 256]); + } + EPD_Display_color_change(); + for (uint32_t c = 0; c < (SCREEN_HEIGHT * (SCREEN_WIDTH / 8)); c++) + { + if (c % 256 == 0) + { + eepromRead(addr + sizeof(struct EepromImageHeader) + (SCREEN_HEIGHT * (SCREEN_WIDTH / 8)) + c, mClutMap, 256); + } + EPD_Display_byte(mClutMap[c % 256]); + } + EPD_Display_end(); + break; + case DATATYPE_IMG_BMP:; + printf("sending BMP to EPD - "); + + printf(" complete.\r\n"); + 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...\r\n", eih->dataType); + return; + } +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/drawing.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/drawing.h new file mode 100644 index 00000000..205f4e3a --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/drawing.h @@ -0,0 +1,9 @@ +#ifndef _DRAWING_H_ +#define _DRAWING_H_ + +#include +#include + +void drawImageAtAddress(uint32_t addr, uint8_t lut); + +#endif diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/eeprom.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/eeprom.c new file mode 100644 index 00000000..af833629 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/eeprom.c @@ -0,0 +1,52 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "zigbee.h" +#include "proto.h" +#include "comms.h" +#include "board.h" +#include "powermgt.h" +#include "eeprom.h" +#include "tl_common.h" + +uint32_t eepromGetSize(void) +{ + return EEPROM_IMG_LEN; +} + +void eepromRead(uint32_t addr, uint8_t *dstP, uint32_t len) +{ + printf("Eeprom read %X Len: %d\r\n", addr, len); + flash_read_page(addr, len, dstP); +} + +bool eepromWrite(uint32_t addr, uint8_t *srcP, uint32_t len) +{ + printf("Eeprom write %X Len: %d\r\n", addr, len); + flash_write_page(addr, len, srcP); + return true; +} + +bool eepromErase(uint32_t addr, uint32_t len) +{ + printf("Eeprom erase %X Len: %d\r\n", addr, len); + // round starting address down + if (addr % EEPROM_PAGE_SIZE) + { + len += addr % EEPROM_PAGE_SIZE; + addr = addr / EEPROM_PAGE_SIZE * EEPROM_PAGE_SIZE; + } + // round length up + len = (len + EEPROM_PAGE_SIZE - 1) / EEPROM_PAGE_SIZE * EEPROM_PAGE_SIZE; + + while (len) + { + uint32_t now; + flash_erase_sector(addr); + now = 0x1000; + + addr += now; + len -= now; + } + return true; +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/eeprom.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/eeprom.h new file mode 100644 index 00000000..f9af98bf --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/eeprom.h @@ -0,0 +1,31 @@ +#ifndef _EEPROM_H_ +#define _EEPROM_H_ + +#include +#include + +void eepromRead(uint32_t addr, uint8_t *dst, uint32_t len) ; + +bool eepromWrite(uint32_t addr, uint8_t *src, uint32_t len) ; + +bool eepromErase(uint32_t addr, uint32_t len) ; + +uint32_t eepromGetSize(void); + +#define EEPROM_IMG_VALID (0x494d4721UL) +#include "board.h" + +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 diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd.c new file mode 100644 index 00000000..95b59f97 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd.c @@ -0,0 +1,432 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "eeprom.h" +#include "epd_bw_213.h" +#include "epd_bwr_213.h" +#include "epd_bwr_350.h" +#include "epd_bwy_350.h" +#include "epd_bw_213_ice.h" +#include "epd_bwr_154.h" +#include "powermgt.h" + +#include "OneBitDisplay.h" +extern const uint8_t ucMirror[]; +#include "Roboto_Black_80.h" +#include "font.h" +#include "font_60.h" +#include "font16.h" +#include "font30.h" + +RAM uint8_t epd_model = 0; // 0 = Undetected, 1 = BW213, 2 = BWR213, 3 = BWR154, 4 = BW213ICE, 5 = BWR350 +const char *epd_model_string[] = {"NC", "BW213", "BWR213", "BWR154", "213ICE", "BWR350", "BWY350"}; +RAM uint8_t epd_update_state = 0; + +const char *BLE_conn_string[] = {"", "B"}; +RAM uint8_t epd_temperature_is_read = 0; +RAM uint8_t epd_temperature = 0; + +uint8_t epd_buffer[epd_buffer_size]; +uint8_t epd_temp[epd_buffer_size]; // for OneBitDisplay to draw into +OBDISP obd; // virtual display structure + +// With this we can force a display if it wasnt detected correctly +void set_EPD_model(uint8_t model_nr) +{ + epd_model = model_nr; +} + +// Here we detect what E-Paper display is connected + void EPD_detect_model(void) +{ + epd_model = 6; + return; + EPD_init(); + // system power + EPD_POWER_ON(); + + WaitMs(10); + // Reset the EPD driver IC + gpio_write(EPD_RESET, 0); + WaitMs(10); + gpio_write(EPD_RESET, 1); + WaitMs(10); + + // Here we neeed to detect it + if (EPD_BWR_213_detect()) + { + epd_model = 2; + } + else if (EPD_BWR_154_detect()) // Right now this will never trigger, the 154 is same to 213BWR right now. + { + epd_model = 3; + } + else if (EPD_BW_213_ice_detect()) + { + epd_model = 4; + } + else + { + epd_model = 1; + } + + EPD_POWER_OFF(); +} + + uint8_t EPD_read_temp(void) +{ + if (epd_temperature_is_read) + return epd_temperature; + + if (!epd_model) + EPD_detect_model(); + + EPD_init(); + // system power + EPD_POWER_ON(); + WaitMs(5); + // Reset the EPD driver IC + gpio_write(EPD_RESET, 0); + WaitMs(10); + gpio_write(EPD_RESET, 1); + WaitMs(10); + + if (epd_model == 1) + epd_temperature = EPD_BW_213_read_temp(); + else if (epd_model == 2) + epd_temperature = EPD_BWR_213_read_temp(); + else if (epd_model == 3) + epd_temperature = EPD_BWR_154_read_temp(); + else if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_read_temp(); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_read_temp(); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_read_temp(); + + EPD_POWER_OFF(); + + epd_temperature_is_read = 1; + + return epd_temperature; +} + + void EPD_Display_start(uint8_t full_or_partial) +{ + if (!epd_model) + EPD_detect_model(); + + EPD_init(); + // system power + EPD_POWER_ON(); + WaitMs(5); + // Reset the EPD driver IC + gpio_write(EPD_RESET, 0); + WaitMs(20); + gpio_write(EPD_RESET, 1); + WaitMs(20); + + /*if (epd_model == 1) + epd_temperature = EPD_BW_213_Display_start(full_or_partial); + else if (epd_model == 2) + epd_temperature = EPD_BWR_213_Display_start(full_or_partial); + else if (epd_model == 3) + epd_temperature = EPD_BWR_154_Display_start(full_or_partial); + else if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_Display_start(full_or_partial); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_Display_start(full_or_partial); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_Display_start(full_or_partial);*/ + + if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_Display_start(full_or_partial); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_Display_start(full_or_partial); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_Display_start(full_or_partial); + epd_temperature_is_read = 1; + epd_update_state = 1; +} + + void EPD_Display_byte(uint8_t data) +{ + /*if (epd_model == 1) + epd_temperature = EPD_BW_213_Display_byte(data); + else if (epd_model == 2) + epd_temperature = EPD_BWR_213_Display_byte(data); + else if (epd_model == 3) + epd_temperature = EPD_BWR_154_Display_byte(data); + else if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_Display_byte(data); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_Display_byte(data); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_Display_byte(data);*/ + + if (epd_model == 4) + EPD_BW_213_ice_Display_byte(data); + else if (epd_model == 5) + EPD_BWR_350_Display_byte(data); + else if (epd_model == 6) + EPD_BWY_350_Display_byte(data); +} + + void EPD_Display_buffer(unsigned char *image, int size) +{ + /*if (epd_model == 1) + epd_temperature = EPD_BW_213_Display_buffer(image, size); + else if (epd_model == 2) + epd_temperature = EPD_BWR_213_Display_buffer(image, size); + else if (epd_model == 3) + epd_temperature = EPD_BWR_154_Display_buffer(image, size); + else if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_Display_buffer(image, size); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_Display_buffer(image, size); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_Display_buffer(image, size);*/ + + if (epd_model == 4) + EPD_BW_213_ice_Display_buffer(image, size); + else if (epd_model == 5) + EPD_BWR_350_Display_buffer(image, size); + else if (epd_model == 6) + EPD_BWY_350_Display_buffer(image, size); +} + + void EPD_Display_color_change() +{ + if (epd_model == 5) + EPD_BWR_350_Display_color_change(); + if (epd_model == 6) + EPD_BWY_350_Display_color_change(); +} + + void EPD_Display_end() +{ + /*if (epd_model == 1) + epd_temperature = EPD_BW_213_Display_end(); + else if (epd_model == 2) + epd_temperature = EPD_BWR_213_Display_end(); + else if (epd_model == 3) + epd_temperature = EPD_BWR_154_Display_end(); + else if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_Display_end(); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_Display_end(); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_Display_end();*/ + if (epd_model == 4) + EPD_BW_213_ice_Display_end(); + else if (epd_model == 5) + EPD_BWR_350_Display_end(); + else if (epd_model == 6) + EPD_BWY_350_Display_end(); + uint32_t timeout_counter = 60; // 60 Seconds timeout + while (epd_state_handler()) + { + doSleepGpio(1000, EPD_BUSY); + timeout_counter--; + if (!timeout_counter) + { + epd_set_sleep(); + printf("E-Paper Refresh timeout !!!\r\n"); + break; + } + } +} + + void EPD_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + if (!epd_model) + EPD_detect_model(); + + EPD_init(); + // system power + EPD_POWER_ON(); + WaitMs(5); + // Reset the EPD driver IC + gpio_write(EPD_RESET, 0); + WaitMs(10); + gpio_write(EPD_RESET, 1); + WaitMs(10); + + if (epd_model == 1) + epd_temperature = EPD_BW_213_Display(image, size, full_or_partial); + else if (epd_model == 2) + epd_temperature = EPD_BWR_213_Display(image, size, full_or_partial); + else if (epd_model == 3) + epd_temperature = EPD_BWR_154_Display(image, size, full_or_partial); + else if (epd_model == 4) + epd_temperature = EPD_BW_213_ice_Display(image, size, full_or_partial); + else if (epd_model == 5) + epd_temperature = EPD_BWR_350_Display(image, size, full_or_partial); + else if (epd_model == 6) + epd_temperature = EPD_BWY_350_Display(image, size, full_or_partial); + + epd_temperature_is_read = 1; + epd_update_state = 1; + uint32_t timeout_counter = 60; // 60 Seconds timeout + while (epd_state_handler()) + { + doSleepGpio(1000, EPD_BUSY); + timeout_counter--; + if (!timeout_counter) + { + epd_set_sleep(); + printf("E-Paper Refresh timeout !!!\r\n"); + break; + } + } +} + + void epd_set_sleep(void) +{ + if (!epd_model) + EPD_detect_model(); + + if (epd_model == 1) + EPD_BW_213_set_sleep(); + else if (epd_model == 2) + EPD_BWR_213_set_sleep(); + else if (epd_model == 3) + EPD_BWR_154_set_sleep(); + else if (epd_model == 4) + EPD_BW_213_ice_set_sleep(); + else if (epd_model == 5) + EPD_BWR_350_set_sleep(); + else if (epd_model == 6) + EPD_BWY_350_set_sleep(); + + EPD_POWER_OFF(); + epd_update_state = 0; +} + + uint8_t epd_state_handler(void) +{ + switch (epd_update_state) + { + case 0: + // Nothing todo + break; + case 1: // check if refresh is done and sleep epd if so + if (epd_model == 1 || epd_model == 6) + { + if (!EPD_IS_BUSY()) + epd_set_sleep(); + } + else + { + if (EPD_IS_BUSY()) + epd_set_sleep(); + } + break; + } + return epd_update_state; +} + + void FixBuffer(uint8_t *pSrc, uint8_t *pDst, uint16_t width, uint16_t height) +{ + int x, y; + uint8_t *s, *d; + for (y = 0; y < (height / 8); y++) + { // byte rows + d = &pDst[y]; + s = &pSrc[y * width]; + for (x = 0; x < width; x++) + { + d[x * (height / 8)] = ~ucMirror[s[width - 1 - x]]; // invert and flip + } // for x + } // for y +} + + void epd_display_this() +{ + // test G4 decoder + memset(epd_buffer, 0xff, epd_buffer_size); // clear to white + EPD_Display(epd_buffer, epd_buffer_size, 1); +} + + void epd_display(char *str1, uint16_t battery_mv, char *ownMacStr, uint8_t full_or_partial) +{ + if (epd_update_state) + return; + + if (!epd_model) + { + EPD_detect_model(); + } + uint16_t resolution_w = 250; + uint16_t resolution_h = 128; // 122 real pixel, but needed to have a full byte + if (epd_model == 1) + { + resolution_w = 250; + resolution_h = 128; // 122 real pixel, but needed to have a full byte + } + else if (epd_model == 2) + { + resolution_w = 250; + resolution_h = 128; // 122 real pixel, but needed to have a full byte + } + else if (epd_model == 3) + { + resolution_w = 200; + resolution_h = 200; + } + else if (epd_model == 4) + { + resolution_w = 212; + resolution_h = 104; + } + else if (epd_model == 5) + { // Just as placeholder right now, needs a complete different driving because of RAM limits + resolution_w = 200; + resolution_h = 184; + } + else if (epd_model == 6) + { // Just as placeholder right now, needs a complete different driving because of RAM limits + resolution_w = 210; + resolution_h = 184; + } + + obdCreateVirtualDisplay(&obd, resolution_w, resolution_h, epd_temp); + obdFill(&obd, 0, 0); // fill with white + + char buff[100]; + sprintf(buff, "Compiled:"); + obdWriteString(&obd, 0, 0, 20, (char *)buff, FONT_8x8, 0, 0); + sprintf(buff, "%s %s", __DATE__, __TIME__); + obdWriteString(&obd, 0, 0, 21, (char *)buff, FONT_8x8, 0, 0); + sprintf(buff, "Tag MAC:", ownMacStr); + // obdWriteStringCustom(&obd, FONT_8x8, 0, 18, (char *)buff, 1); + obdWriteString(&obd, 0, 0, 17, (char *)buff, FONT_8x8, 0, 0); + sprintf(buff, "%s", ownMacStr); + // obdWriteStringCustom(&obd, FONT_8x8, 0, 18, (char *)buff, 1); + obdWriteString(&obd, 0, 0, 18, (char *)buff, FONT_8x8, 0, 0); + sprintf(buff, "OpenEpaperLink"); + obdWriteStringCustom(&obd, (GFXfont *)&Dialog_plain_16, 10, 50, (char *)buff, 1); + sprintf(buff, "%s", str1); + obdWriteStringCustom(&obd, (GFXfont *)&Special_Elite_Regular_30, 10, 95, (char *)buff, 1); + sprintf(buff, "Battery %dmV", battery_mv); + obdWriteStringCustom(&obd, (GFXfont *)&Dialog_plain_16, 10, 120, (char *)buff, 1); + FixBuffer(epd_temp, epd_buffer, resolution_w, resolution_h); + EPD_Display(epd_buffer, resolution_w * resolution_h / 8, full_or_partial); +} + + void epd_display_char(uint8_t data) +{ + int i; + for (i = 0; i < epd_buffer_size; i++) + { + epd_buffer[i] = data; + } + EPD_Display(epd_buffer, epd_buffer_size, 1); +} + + void epd_clear(void) +{ + memset(epd_buffer, 0x00, epd_buffer_size); +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd.h new file mode 100644 index 00000000..ea723e08 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd.h @@ -0,0 +1,23 @@ +#pragma once + +#define epd_height 200 +#define epd_width 200 +#define epd_buffer_size ((epd_height / 8) * epd_width) + +void set_EPD_model(uint8_t model_nr); +void init_epd(void); +uint8_t EPD_read_temp(void); + +void EPD_Display_start(uint8_t full_or_partial); +void EPD_Display_byte(uint8_t data); +void EPD_Display_buffer(unsigned char *image, int size); +void EPD_Display_color_change(); +void EPD_Display_end(); + +void EPD_Display(unsigned char *image, int size, uint8_t full_or_partial); +void epd_display_this(); +void epd_display(char *str1, uint16_t battery_mv, char *ownMacStr, uint8_t full_or_partial); +void epd_set_sleep(void); +uint8_t epd_state_handler(void); +void epd_display_char(uint8_t data); +void epd_clear(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213.c new file mode 100644 index 00000000..6f0bff99 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213.c @@ -0,0 +1,121 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "epd_bw_213.h" + +// UC8151C or similar EPD Controller + +#define lut_bw_213_refresh_time 10 +uint8_t lut_bw_213_20_part[] = + { + 0x20, 0x00, lut_bw_213_refresh_time, 0x01, 0x00, 0x00, 0x01, 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 + }; +uint8_t lut_bw_213_22_part[] = + { + 0x22, 0x80, lut_bw_213_refresh_time, 0x01, 0x00, 0x00, 0x01, 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 + }; +uint8_t lut_bw_213_23_part[] = + { + 0x23, 0x40, lut_bw_213_refresh_time, 0x01, 0x00, 0x00, 0x01, 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 + }; + + + uint8_t EPD_BW_213_read_temp(void) +{ + uint8_t epd_temperature = 0 ; + EPD_WriteCmd(0x04); + + // check BUSY pin + EPD_CheckStatus(100); + + EPD_WriteCmd(0x40); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + // power off + EPD_WriteCmd(0x02); + + // deep sleep + EPD_WriteCmd(0x07); + EPD_WriteData(0xa5); + + return epd_temperature; +} + + uint8_t EPD_BW_213_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0 ; + + // Booster soft start + EPD_WriteCmd(0x06); + EPD_WriteData(0x17); + EPD_WriteData(0x17); + EPD_WriteData(0x17); + // power on + EPD_WriteCmd(0x04); + + // check BUSY pin + EPD_CheckStatus(100); + + EPD_WriteCmd(0x40); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + // panel setting + EPD_WriteCmd(0x00); + if (full_or_partial) + EPD_WriteData(0b00011111); + else + EPD_WriteData(0b00111111); + EPD_WriteData(0x0f); + + // resolution setting + EPD_WriteCmd(0x61); + EPD_WriteData(0x80); + EPD_WriteData(0x01); + EPD_WriteData(0x28); + + // Vcom and data interval setting + EPD_WriteCmd(0X50); + EPD_WriteData(0x97); + + if (!full_or_partial) + { + EPD_send_lut(lut_bw_213_20_part, sizeof(lut_bw_213_20_part)); + EPD_send_empty_lut(0x21, 260); + EPD_send_lut(lut_bw_213_22_part, sizeof(lut_bw_213_22_part)); + EPD_send_lut(lut_bw_213_23_part, sizeof(lut_bw_213_23_part)); + EPD_send_empty_lut(0x24, 260); + + EPD_WriteCmd(0x10); + int i; + for (i = 0; i < size; i++) + { + EPD_WriteData(~image[i]); + } + } + // load image data to EPD + EPD_LoadImage(image, size, 0x13); + + // trigger display refresh + EPD_WriteCmd(0x12); + + return epd_temperature; +} + + void EPD_BW_213_set_sleep(void) +{ + // Vcom and data interval setting + EPD_WriteCmd(0x50); + EPD_WriteData(0xf7); + + // power off + EPD_WriteCmd(0x02); + + // deep sleep + EPD_WriteCmd(0x07); + EPD_WriteData(0xa5); + +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213.h new file mode 100644 index 00000000..4019d9cc --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213.h @@ -0,0 +1,5 @@ +#pragma once + +uint8_t EPD_BW_213_read_temp(void); +uint8_t EPD_BW_213_Display(unsigned char *image, int size, uint8_t full_or_partial); +void EPD_BW_213_set_sleep(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213_ice.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213_ice.c new file mode 100644 index 00000000..21fb0fe7 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213_ice.c @@ -0,0 +1,488 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "epd_bw_213_ice.h" + +// SSD1675 mixed with SSD1680 EPD Controller + +#define BW_213_ice_Len 50 +uint8_t LUT_BW_213_ice_part[] = { + + 0x40, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x40, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + + BW_213_ice_Len, + 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, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + +}; + + uint8_t EPD_BW_213_ice_detect(void) +{ + // SW Reset + EPD_WriteCmd(0x12); + WaitMs(10); + + EPD_WriteCmd(0x2F); + if (EPD_SPI_read() != 0x01) + return 0; + return 1; +} + + uint8_t EPD_BW_213_ice_read_temp(void) +{ + uint8_t epd_temperature = 0; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // ACVCOM Setting + EPD_WriteCmd(0x2B); + EPD_WriteData(0x04); + EPD_WriteData(0x63); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0C); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x54); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x01); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xA1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x03); + + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); + + return epd_temperature; +} + + uint8_t EPD_BW_213_ice_Display_start(uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // ACVCOM Setting + EPD_WriteCmd(0x2B); + EPD_WriteData(0x04); + EPD_WriteData(0x63); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0C); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x54); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x01); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xA1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x03); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0x40); + + int i; + if (!full_or_partial) + { + EPD_WriteCmd(0x32); + for (i = 0; i < sizeof(LUT_BW_213_ice_part); i++) + { + EPD_WriteData(LUT_BW_213_ice_part[i]); + } + } + + EPD_WriteCmd(0x24); + + return epd_temperature; +} + + void EPD_BW_213_ice_Display_byte(uint8_t data) +{ + EPD_WriteData(data); +} + + void EPD_BW_213_ice_Display_buffer(unsigned char *image, int size) +{ + for (int i = 0; i < size; i++) + { + EPD_WriteData(image[i]); + } +} + + void EPD_BW_213_ice_Display_end() +{ + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xC7); + + // Master Activation + EPD_WriteCmd(0x20); +} + + uint8_t EPD_BW_213_ice_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // ACVCOM Setting + EPD_WriteCmd(0x2B); + EPD_WriteData(0x04); + EPD_WriteData(0x63); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0C); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x54); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x01); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xA1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x03); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + + EPD_LoadImage(image, size, 0x24); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0x40); + + int i; + if (!full_or_partial) + { + EPD_WriteCmd(0x32); + for (i = 0; i < sizeof(LUT_BW_213_ice_part); i++) + { + EPD_WriteData(LUT_BW_213_ice_part[i]); + } + } + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xC7); + + // Master Activation + EPD_WriteCmd(0x20); + + return epd_temperature; +} + + void EPD_BW_213_ice_set_sleep(void) +{ + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213_ice.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213_ice.h new file mode 100644 index 00000000..1824a291 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bw_213_ice.h @@ -0,0 +1,12 @@ +#pragma once + +uint8_t EPD_BW_213_ice_detect(void); +uint8_t EPD_BW_213_ice_read_temp(void); + +uint8_t EPD_BW_213_ice_Display_start(uint8_t full_or_partial); +void EPD_BW_213_ice_Display_byte(uint8_t data); +void EPD_BW_213_ice_Display_buffer(unsigned char *image, int size); +void EPD_BW_213_ice_Display_end(); + +uint8_t EPD_BW_213_ice_Display(unsigned char *image, int size, uint8_t full_or_partial); +void EPD_BW_213_ice_set_sleep(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_154.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_154.c new file mode 100644 index 00000000..94a2f34d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_154.c @@ -0,0 +1,226 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "epd_bwr_154.h" + +// SSD1675 mixed with SSD1680 EPD Controller + +#define BWR_154_Len 50 +uint8_t LUT_bwr_154_part[] = { + +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + +BWR_154_Len, 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, 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, 0x00, 0x00, 0x00, +0x22, 0x22, 0x22, 0x22, 0x22, 0x22, +0x00, 0x00, 0x00, + +}; + +#define EPD_BWR_154_test_pattern 0xA5 + uint8_t EPD_BWR_154_detect(void) +{ + // SW Reset + EPD_WriteCmd(0x12); + WaitMs(10); + + EPD_WriteCmd(0x32); + int i; + for (i = 0; i < 65; i++)// This controller has a <100 bytes LUT storage so we test if thats existing. + { + EPD_WriteData(EPD_BWR_154_test_pattern); + } + EPD_WriteCmd(0x33); + for (i = 0; i < 65; i++) + { + if(EPD_SPI_read() != EPD_BWR_154_test_pattern) + return 0; + } + return 1; +} + + uint8_t EPD_BWR_154_read_temp(void) +{ + uint8_t epd_temperature = 0 ; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x18); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x61); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x05); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); + + return epd_temperature; +} + + uint8_t EPD_BWR_154_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0 ; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0xc7); + EPD_WriteData(0x00); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x18); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0xc7); + EPD_WriteData(0x00); + EPD_WriteData(0x00); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x05); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0xc7); + EPD_WriteData(0x00); + + EPD_LoadImage(image, size, 0x24); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0xc7); + EPD_WriteData(0x00); + + EPD_WriteCmd(0x26);// RED Color TODO make something out of it :) + int i; + for (i = 0; i < size; i++) + { + EPD_WriteData(0x00); + } + + if (!full_or_partial) + { + EPD_WriteCmd(0x32); + for (i = 0; i < sizeof(LUT_bwr_154_part); i++) + { + EPD_WriteData(LUT_bwr_154_part[i]); + } + } + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xC7); + + // Master Activation + EPD_WriteCmd(0x20); + + return epd_temperature; +} + + void EPD_BWR_154_set_sleep(void) +{ + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); + +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_154.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_154.h new file mode 100644 index 00000000..65ec3c21 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_154.h @@ -0,0 +1,6 @@ +#pragma once + +uint8_t EPD_BWR_154_detect(void); +uint8_t EPD_BWR_154_read_temp(void); +uint8_t EPD_BWR_154_Display(unsigned char *image, int size, uint8_t full_or_partial); +void EPD_BWR_154_set_sleep(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_213.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_213.c new file mode 100644 index 00000000..b438842c --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_213.c @@ -0,0 +1,265 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "epd_bwr_213.h" + +// SSD1675 mixed with SSD1680 EPD Controller + +#define BWR_213_Len 50 +uint8_t LUT_bwr_213_part[] = { + +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + +BWR_213_Len, 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, 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, 0x00, 0x00, 0x00, +0x22, 0x22, 0x22, 0x22, 0x22, 0x22, +0x00, 0x00, 0x00, + +}; + +#define EPD_BWR_213_test_pattern 0xA5 + uint8_t EPD_BWR_213_detect(void) +{ + // SW Reset + EPD_WriteCmd(0x12); + WaitMs(10); + + EPD_WriteCmd(0x32); + int i; + for (i = 0; i < 153; i++)// This model has a 159 bytes LUT storage so we test for that + { + EPD_WriteData(EPD_BWR_213_test_pattern); + } + EPD_WriteCmd(0x33); + for (i = 0; i < 153; i++) + { + if(EPD_SPI_read() != EPD_BWR_213_test_pattern) + return 0; + } + return 1; +} + + uint8_t EPD_BWR_213_read_temp(void) +{ + uint8_t epd_temperature = 0 ; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0F); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x2E); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x05); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x00); + EPD_WriteData(0x80); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); + + return epd_temperature; +} + + uint8_t EPD_BWR_213_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0 ; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0F); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x2E); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x05); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x00); + EPD_WriteData(0x80); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + + EPD_LoadImage(image, size, 0x24); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + + EPD_WriteCmd(0x26);// RED Color TODO make something out of it :) + int i; + for (i = 0; i < size; i++) + { + EPD_WriteData(0x00); + } + + if (!full_or_partial) + { + EPD_WriteCmd(0x32); + for (i = 0; i < sizeof(LUT_bwr_213_part); i++) + { + EPD_WriteData(LUT_bwr_213_part[i]); + } + } + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xC7); + + // Master Activation + EPD_WriteCmd(0x20); + + return epd_temperature; +} + + void EPD_BWR_213_set_sleep(void) +{ + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); + +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_213.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_213.h new file mode 100644 index 00000000..7c781256 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_213.h @@ -0,0 +1,6 @@ +#pragma once + +uint8_t EPD_BWR_213_detect(void); +uint8_t EPD_BWR_213_read_temp(void); +uint8_t EPD_BWR_213_Display(unsigned char *image, int size, uint8_t full_or_partial); +void EPD_BWR_213_set_sleep(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_350.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_350.c new file mode 100644 index 00000000..5fe6de41 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_350.c @@ -0,0 +1,363 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "epd_bwr_350.h" + +// SSD1675 mixed with SSD1680 EPD Controller + +#define BWR_350_Len 50 +uint8_t LUT_bwr_350_part[] = { + + 0x01, 0x10, 0x18, 0x01, 0x32, 0x02, 0x01, 0x10, 0x08, 0x01, 0x03, 0x02, + 0x01, 0x01, 0x01, 0x0A, 0x05, 0x0A, 0x0F, 0x01, 0x01, 0x01, 0x14, 0x0F, + 0x02, 0x02, 0x01, 0x14, 0x01, 0x02, 0x02, 0x04, 0x02, 0x14, 0x12, 0x01, + 0x0A, 0x0F, 0x01, 0x02, 0x01, 0x01, 0x07, 0x05, 0x00, 0x22, 0x02, 0x01, + 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x50, 0x18, 0x01, + 0x72, 0x02, 0x01, 0x10, 0x88, 0x01, 0x43, + 0x02, 0x01, 0x01, 0x01, 0x4A, 0x85, 0x4A, + 0x8F, 0x01, 0x01, 0x01, 0x94, 0x8F, 0x82, + 0x42, 0x01, 0x14, 0x01, 0x82, 0x42, 0x84, + 0x42, 0x14, 0x12, 0x01, 0x4A, 0x4F, 0x01, + 0x02, 0x01, 0x01, 0x07, 0x85, 0x00, 0xE2, + 0x02, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x50, 0x58, 0x81, + 0x72, 0x02, 0x01, 0x10, 0x88, 0x01, 0x43, + 0x42, 0x01, 0x01, 0x01, 0x4A, 0x85, 0x4A, + 0x8F, 0x01, 0x01, 0x01, 0x94, 0x8F, 0x82, + 0x42, 0x01, 0x14, 0x01, 0x82, 0x42, 0x84, + 0x42, 0x14, 0x12, 0x01, 0x4A, 0x4F, 0x01, + 0x02, 0x01, 0x01, 0x07, 0x85, 0x00, 0x22, + 0x02, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x50, 0x58, 0x01, + 0x72, 0x02, 0x01, 0x10, 0x88, 0x81, 0x43, + 0x02, 0x01, 0x01, 0x01, 0x4A, 0x85, 0x4A, + 0x8F, 0x01, 0x01, 0x01, 0x94, 0x8F, 0x82, + 0x42, 0x01, 0x14, 0x01, 0x82, 0x42, 0x84, + 0x42, 0x14, 0x12, 0x01, 0x4A, 0x4F, 0x01, + 0x82, 0x01, 0x01, 0x07, 0x05, 0x00, 0x22, + 0x42, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, + 0x02, 0x00, 0x00, + 0x22, 0x17, 0x41, 0xA8, 0x32, 0x50}; + +#define EPD_BWR_350_test_pattern 0xA5 + uint8_t EPD_BWR_350_detect(void) +{ + // SW Reset + EPD_WriteCmd(0x12); + WaitMs(10); + + EPD_WriteCmd(0x32); + int i; + for (i = 0; i < 153; i++) // This model has a 159 bytes LUT storage so we test for that + { + EPD_WriteData(EPD_BWR_350_test_pattern); + } + EPD_WriteCmd(0x33); + for (i = 0; i < 153; i++) + { + if (EPD_SPI_read() != EPD_BWR_350_test_pattern) + return 0; + } + return 1; +} + + uint8_t EPD_BWR_350_read_temp(void) +{ + uint8_t epd_temperature = 0; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0F); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x2E); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x05); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x00); + EPD_WriteData(0x80); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); + + return epd_temperature; +} + + uint8_t EPD_BWR_350_Display_start(uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + EPD_WriteCmd(0x3c); + EPD_WriteData(0x05); + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + EPD_WriteCmd(0x22); + EPD_WriteData(0xb1); + + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + EPD_WriteCmd(0x21); + EPD_WriteData(0b00001000); + EPD_WriteData(0x00); + + EPD_WriteCmd(0x11); + EPD_WriteData(0x03); + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x01); + EPD_WriteData(0x17); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x00); + EPD_WriteData(0x00); + EPD_WriteData(0x7f); + EPD_WriteData(0x01); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x01); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x00); + EPD_WriteData(0x00); + + EPD_WriteCmd(0x24); + + return epd_temperature; +} + void EPD_BWR_350_Display_byte(uint8_t data) +{ + EPD_WriteData(data); +} + void EPD_BWR_350_Display_buffer(unsigned char *image, int size) +{ + for (int i = 0; i < size; i++) + { + EPD_WriteData(image[i]); + } +} + void EPD_BWR_350_Display_end() +{ + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xC7); + + // Master Activation + EPD_WriteCmd(0x20); +} + void EPD_BWR_350_Display_color_change() +{ + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x01); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x00); + EPD_WriteData(0x00); + + EPD_WriteCmd(0x26); +} + + uint8_t EPD_BWR_350_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0; + + // SW Reset + EPD_WriteCmd(0x12); + + EPD_CheckStatus_inverted(100); + + // Set Analog Block control + EPD_WriteCmd(0x74); + EPD_WriteData(0x54); + // Set Digital Block control + EPD_WriteCmd(0x7E); + EPD_WriteData(0x3B); + + // Booster soft start + EPD_WriteCmd(0x0C); + EPD_WriteData(0x8B); + EPD_WriteData(0x9C); + EPD_WriteData(0x96); + EPD_WriteData(0x0F); + + // Driver output control + EPD_WriteCmd(0x01); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x01); + + // Data entry mode setting + EPD_WriteCmd(0x11); + EPD_WriteData(0x01); + + // Set RAM X- Address Start/End + EPD_WriteCmd(0x44); + EPD_WriteData(0x00); + EPD_WriteData(0x0F); + + // Set RAM Y- Address Start/End + EPD_WriteCmd(0x45); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + EPD_WriteData(0x2E); + EPD_WriteData(0x00); + + // Border waveform control + EPD_WriteCmd(0x3C); + EPD_WriteData(0x05); + + // Display update control + EPD_WriteCmd(0x21); + EPD_WriteData(0x00); + EPD_WriteData(0x80); + + // Temperature sensor control + EPD_WriteCmd(0x18); + EPD_WriteData(0x80); + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xB1); + + // Master Activation + EPD_WriteCmd(0x20); + + EPD_CheckStatus_inverted(100); + + // Temperature sensor read from register + EPD_WriteCmd(0x1B); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + WaitMs(5); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + + EPD_LoadImage(image, size, 0x24); + + // Set RAM X address + EPD_WriteCmd(0x4E); + EPD_WriteData(0x00); + + // Set RAM Y address + EPD_WriteCmd(0x4F); + EPD_WriteData(0x28); + EPD_WriteData(0x01); + + EPD_WriteCmd(0x26); // RED Color TODO make something out of it :) + int i; + for (i = 0; i < size; i++) + { + EPD_WriteData(0x00); + } + + if (!full_or_partial) + { + EPD_WriteCmd(0x32); + for (i = 0; i < sizeof(LUT_bwr_350_part); i++) + { + EPD_WriteData(LUT_bwr_350_part[i]); + } + } + + // Display update control + EPD_WriteCmd(0x22); + EPD_WriteData(0xC7); + + // Master Activation + EPD_WriteCmd(0x20); + + return epd_temperature; +} + + void EPD_BWR_350_set_sleep(void) +{ + // deep sleep + EPD_WriteCmd(0x10); + EPD_WriteData(0x01); +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_350.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_350.h new file mode 100644 index 00000000..89e57d73 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwr_350.h @@ -0,0 +1,13 @@ +#pragma once + +uint8_t EPD_BWR_350_detect(void); +uint8_t EPD_BWR_350_read_temp(void); + +uint8_t EPD_BWR_350_Display_start(uint8_t full_or_partial); +void EPD_BWR_350_Display_byte(uint8_t data); +void EPD_BWR_350_Display_buffer(unsigned char *image, int size); +void EPD_BWR_350_Display_end(); +void EPD_BWR_350_Display_color_change(); + +uint8_t EPD_BWR_350_Display(unsigned char *image, int size, uint8_t full_or_partial); +void EPD_BWR_350_set_sleep(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwy_350.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwy_350.c new file mode 100644 index 00000000..64f2102b --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwy_350.c @@ -0,0 +1,205 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" +#include "epd_bwy_350.h" + +// UC8151C or similar EPD Controller + +enum PSR_FLAGS +{ + RES_96x230 = 0b00000000, + RES_96x252 = 0b01000000, + RES_128x296 = 0b10000000, + RES_160x296 = 0b11000000, + + LUT_OTP = 0b00000000, + LUT_REG = 0b00100000, + + FORMAT_BWR = 0b00000000, + FORMAT_BW = 0b00010000, + + SCAN_DOWN = 0b00000000, + SCAN_UP = 0b00001000, + + SHIFT_LEFT = 0b00000000, + SHIFT_RIGHT = 0b00000100, + + BOOSTER_OFF = 0b00000000, + BOOSTER_ON = 0b00000010, + + RESET_SOFT = 0b00000000, + RESET_NONE = 0b00000001 +}; + +#define lut_bwy_350_refresh_time 10 +uint8_t lut_bwy_350_20_part[] = + { + 0x20, 0x00, lut_bwy_350_refresh_time, 0x01, 0x00, 0x00, 0x01, 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}; +uint8_t lut_bwy_350_22_part[] = + { + 0x22, 0x80, lut_bwy_350_refresh_time, 0x01, 0x00, 0x00, 0x01, 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}; +uint8_t lut_bwy_350_23_part[] = + { + 0x23, 0x40, lut_bwy_350_refresh_time, 0x01, 0x00, 0x00, 0x01, 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}; + +uint8_t EPD_BWY_350_detect(void) +{ + // SW Reset + /*EPD_WriteCmd(0x12); + WaitMs(10); + + EPD_WriteCmd(0x2F); + if (EPD_SPI_read() != 0x01) + return 0; + return 1;*/ + return 0; +} + +uint8_t EPD_BWY_350_read_temp(void) +{ + uint8_t epd_temperature = 0; + EPD_WriteCmd(0x04); + + WaitMs(1); + + EPD_WriteCmd(0x40); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + // power off + EPD_WriteCmd(0x02); + + // deep sleep + EPD_WriteCmd(0x07); + EPD_WriteData(0xa5); + + return epd_temperature; +} + +#define scan_direction (SCAN_UP | RES_160x296 | FORMAT_BWR | BOOSTER_ON | RESET_NONE | LUT_OTP | SHIFT_RIGHT) + +uint8_t EPD_BWY_350_Display_start(uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0; + + // power on + EPD_WriteCmd(0x04); + + WaitMs(1); + + /*EPD_WriteCmd(0X4D); + EPD_WriteData(0x55); + EPD_WriteCmd(0XF3); + EPD_WriteData(0x0A); + EPD_WriteCmd(0X50); + EPD_WriteData(0x57);*/ + + EPD_WriteCmd(0x00); + EPD_WriteData(scan_direction); + EPD_WriteData(0x0f); + + EPD_WriteCmd(0x40); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + EPD_WriteCmd(0x10); + + return epd_temperature; +} +void EPD_BWY_350_Display_byte(uint8_t data) +{ + EPD_WriteData(data); +} +void EPD_BWY_350_Display_buffer(unsigned char *image, int size) +{ + for (int i = 0; i < size; i++) + { + EPD_WriteData(image[i]); + } +} + +void EPD_BWY_350_Display_color_change() +{ + EPD_WriteCmd(0x13); +} + +void EPD_BWY_350_Display_end() +{ + EPD_WriteCmd(0x12); +} + +uint8_t EPD_BWY_350_Display(unsigned char *image, int size, uint8_t full_or_partial) +{ + uint8_t epd_temperature = 0; + + // power on + EPD_WriteCmd(0x04); + + WaitMs(1); + + /*EPD_WriteCmd(0X4D); + EPD_WriteData(0x55); + EPD_WriteCmd(0XF3); + EPD_WriteData(0x0A); + EPD_WriteCmd(0X50); + EPD_WriteData(0x57);*/ + EPD_WriteCmd(0x00); + EPD_WriteData(scan_direction); //| LUT_REG); + EPD_WriteData(0x0f); + + EPD_WriteCmd(0x40); + epd_temperature = EPD_SPI_read(); + EPD_SPI_read(); + + /*EPD_send_lut(lut_bwy_350_20_part, sizeof(lut_bwy_350_20_part)); + EPD_send_empty_lut(0x21, 260); + EPD_send_lut(lut_bwy_350_22_part, sizeof(lut_bwy_350_22_part)); + EPD_send_lut(lut_bwy_350_23_part, sizeof(lut_bwy_350_23_part)); + EPD_send_empty_lut(0x24, 260);*/ + + //////////////////////// This parts clears the full screen + EPD_WriteCmd(0x10); + int i; + for (i = 0; i < 8832; i++) + { + EPD_WriteData(0); + } + + EPD_WriteCmd(0x13); + for (i = 0; i < 8832; i++) + { + EPD_WriteData(0); + } + //////////////////////// This parts clears the full screen + + EPD_WriteCmd(0x10); + for (i = 0; i < size; i++) + { + EPD_WriteData(~image[i]); + } + // load image data to EPD + // EPD_LoadImage(image, size, 0x13); + + // EPD_WriteCmd(0XB6); + // EPD_WriteData(0x12); + // trigger display refresh + EPD_WriteCmd(0x12); + + return epd_temperature; +} + +void EPD_BWY_350_set_sleep(void) +{ + // Vcom and data interval setting + // EPD_WriteCmd(0x50); + // EPD_WriteData(0xf7); + + // power off + EPD_WriteCmd(0x02); + + // deep sleep + EPD_WriteCmd(0x07); + EPD_WriteData(0xa5); +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwy_350.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwy_350.h new file mode 100644 index 00000000..7d24ff80 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_bwy_350.h @@ -0,0 +1,13 @@ +#pragma once + +uint8_t EPD_BWY_350_detect(void); +uint8_t EPD_BWY_350_read_temp(void); + +uint8_t EPD_BWY_350_Display_start(uint8_t full_or_partial); +void EPD_BWY_350_Display_byte(uint8_t data); +void EPD_BWY_350_Display_buffer(unsigned char *image, int size); +void EPD_BWY_350_Display_end(); +void EPD_BWY_350_Display_color_change(); + +uint8_t EPD_BWY_350_Display(unsigned char *image, int size, uint8_t full_or_partial); +void EPD_BWY_350_set_sleep(void); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_spi.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_spi.c new file mode 100644 index 00000000..7dade036 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_spi.c @@ -0,0 +1,152 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "epd.h" +#include "epd_spi.h" + + void EPD_init(void) +{ + gpio_set_func(EPD_RESET, AS_GPIO); + gpio_set_output_en(EPD_RESET, 1); + gpio_setup_up_down_resistor(EPD_RESET, PM_PIN_PULLUP_1M); + + gpio_set_func(EPD_DC, AS_GPIO); + gpio_set_output_en(EPD_DC, 1); + gpio_setup_up_down_resistor(EPD_DC, PM_PIN_PULLUP_1M); + + gpio_set_func(EPD_BUSY, AS_GPIO); + gpio_set_output_en(EPD_BUSY, 0); + gpio_set_input_en(EPD_BUSY, 1); + gpio_setup_up_down_resistor(EPD_BUSY, PM_PIN_PULLUP_1M); + + gpio_set_func(EPD_CS, AS_GPIO); + gpio_set_output_en(EPD_CS, 1); + gpio_setup_up_down_resistor(EPD_CS, PM_PIN_PULLUP_1M); + + gpio_set_func(EPD_CLK, AS_GPIO); + gpio_set_output_en(EPD_CLK, 1); + gpio_setup_up_down_resistor(EPD_CLK, PM_PIN_PULLUP_1M); + + gpio_set_func(EPD_MOSI, AS_GPIO); + gpio_set_output_en(EPD_MOSI, 1); + gpio_setup_up_down_resistor(EPD_MOSI, PM_PIN_PULLUP_1M); + + gpio_set_output_en(EPD_ENABLE, 0); + gpio_set_input_en(EPD_ENABLE, 1); + gpio_setup_up_down_resistor(EPD_ENABLE, PM_PIN_PULLUP_1M); +} + + void EPD_SPI_Write(unsigned char value) +{ + unsigned char i; + + WaitUs(10); + for (i = 0; i < 8; i++) + { + gpio_write(EPD_CLK, 0); + if (value & 0x80) + { + gpio_write(EPD_MOSI, 1); + } + else + { + gpio_write(EPD_MOSI, 0); + } + value = (value << 1); + gpio_write(EPD_CLK, 1); + } +} + + uint8_t EPD_SPI_read(void) +{ + unsigned char i; + uint8_t value = 0; + + gpio_shutdown(EPD_MOSI); + gpio_set_output_en(EPD_MOSI, 0); + gpio_set_input_en(EPD_MOSI, 1); + gpio_write(EPD_CS, 0); + EPD_ENABLE_WRITE_DATA(); + WaitUs(10); + for (i = 0; i < 8; i++) + { + gpio_write(EPD_CLK, 0); + gpio_write(EPD_CLK, 1); + value <<= 1; + if (gpio_read(EPD_MOSI) != 0) + { + value |= 1; + } + } + gpio_set_output_en(EPD_MOSI, 1); + gpio_set_input_en(EPD_MOSI, 0); + gpio_write(EPD_CS, 1); + return value; +} + + void EPD_WriteCmd(unsigned char cmd) +{ + gpio_write(EPD_CS, 0); + EPD_ENABLE_WRITE_CMD(); + EPD_SPI_Write(cmd); + gpio_write(EPD_CS, 1); +} + + void EPD_WriteData(unsigned char data) +{ + gpio_write(EPD_CS, 0); + EPD_ENABLE_WRITE_DATA(); + EPD_SPI_Write(data); + gpio_write(EPD_CS, 1); +} + + void EPD_CheckStatus(int max_ms) +{ + unsigned long timeout_start = clock_time(); + unsigned long timeout_ticks = max_ms * CLOCK_16M_SYS_TIMER_CLK_1MS; + WaitMs(1); + while (EPD_IS_BUSY()) + { + if (clock_time() - timeout_start >= timeout_ticks) + return; // Here we had a timeout + } +} + + void EPD_CheckStatus_inverted(int max_ms) +{ + unsigned long timeout_start = clock_time(); + unsigned long timeout_ticks = max_ms * CLOCK_16M_SYS_TIMER_CLK_1MS; + WaitMs(1); + while (!EPD_IS_BUSY()) + { + if (clock_time() - timeout_start >= timeout_ticks) + return; // Here we had a timeout + } +} + + void EPD_send_lut(uint8_t lut[], int len) +{ + EPD_WriteCmd(lut[0]); + for (int r = 1; r <= len; r++) + { + EPD_WriteData(lut[r]); + } +} + + void EPD_send_empty_lut(uint8_t lut, int len) +{ + EPD_WriteCmd(lut); + for (int r = 0; r <= len; r++) + EPD_WriteData(0x00); +} + + void EPD_LoadImage(unsigned char *image, int size, uint8_t cmd) +{ + int i; + EPD_WriteCmd(cmd); + for (i = 0; i < size; i++) + { + EPD_WriteData(image[i]); + } + WaitMs(2); +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_spi.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_spi.h new file mode 100644 index 00000000..9cbc463d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/epd_spi.h @@ -0,0 +1,22 @@ +#pragma once + +#define EPD_POWER_ON() gpio_write(EPD_ENABLE, 0) + +#define EPD_POWER_OFF() gpio_write(EPD_ENABLE, 1) + +#define EPD_ENABLE_WRITE_CMD() gpio_write(EPD_DC, 0) +#define EPD_ENABLE_WRITE_DATA() gpio_write(EPD_DC, 1) + +#define EPD_IS_BUSY() (!gpio_read(EPD_BUSY)) + + +void EPD_init(void); +void EPD_SPI_Write(unsigned char value); +uint8_t EPD_SPI_read(void); +void EPD_WriteCmd(unsigned char cmd); +void EPD_WriteData(unsigned char data); +void EPD_CheckStatus(int max_ms); +void EPD_CheckStatus_inverted(int max_ms); +void EPD_send_lut(uint8_t lut[], int len); +void EPD_send_empty_lut(uint8_t lut, int len); +void EPD_LoadImage(unsigned char *image, int size, uint8_t cmd); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font.h new file mode 100644 index 00000000..22507207 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font.h @@ -0,0 +1,259 @@ +#pragma once +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 +}; \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font16.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font16.h new file mode 100644 index 00000000..6b8936c8 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font16.h @@ -0,0 +1,199 @@ +// Created by http://oleddisplay.squix.ch/ Consider a donation +// In case of problems make sure that you are using the font file with the correct version! +const uint8_t Dialog_plain_16Bitmaps[] = { + + // Bitmap Data: + 0x00, // ' ' + 0xAA,0xAA,0x0A, // '!' + 0x94,0xA5,0x20, // '"' + 0x0C,0x80,0x88,0x09,0x87,0xFE,0x19,0x01,0x10,0x13,0x0F,0xFC,0x32,0x02,0x20,0x26,0x00, // '#' + 0x10,0x10,0x7C,0xD2,0x90,0x90,0x70,0x1C,0x12,0x12,0x96,0x7C,0x10,0x10, // '$' + 0x70,0x42,0x21,0x08,0x88,0x22,0x60,0x89,0x01,0xC8,0x00,0x27,0x01,0x22,0x0C,0x88,0x22,0x21,0x08,0x84,0x1C, // '%' + 0x3C,0x06,0x20,0x40,0x04,0x00,0x20,0x05,0x00,0x88,0x48,0x44,0x82,0x48,0x18,0x41,0x83,0xE4, // '&' + 0xAA, // ''' + 0x33,0x10,0x88,0x42,0x10,0x84,0x10,0x86,0x18, // '(' + 0xC3,0x08,0x41,0x08,0x42,0x10,0x88,0x46,0x60, // ')' + 0x10,0x10,0x92,0x7C,0x38,0xD6,0x10,0x10, // '*' + 0x08,0x02,0x00,0x80,0x20,0xFF,0x82,0x00,0x80,0x20,0x08,0x00, // '+' + 0x49,0x40, // ',' + 0xF0, // '-' + 0xA0, // '.' + 0x08,0x21,0x04,0x10,0x82,0x08,0x41,0x04,0x30,0x80, // '/' + 0x3C,0x21,0x10,0x90,0x28,0x14,0x0A,0x05,0x02,0x81,0x21,0x10,0x87,0x80, // '0' + 0x70,0xD0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xFE, // '1' + 0x78,0xC4,0x82,0x02,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0xFE, // '2' + 0x7C,0x41,0x80,0x40,0x20,0x31,0xE0,0x0C,0x02,0x01,0x00,0xA0,0x8F,0x80, // '3' + 0x06,0x02,0x80,0xA0,0x48,0x22,0x10,0x84,0x22,0x08,0xFF,0x80,0x80,0x20,0x08, // '4' + 0x7E,0x20,0x10,0x08,0x07,0xC2,0x10,0x04,0x02,0x01,0x00,0xA0,0x8F,0x80, // '5' + 0x1C,0x31,0x10,0x10,0x0B,0xC6,0x12,0x05,0x02,0x81,0x40,0x90,0x87,0x80, // '6' + 0xFF,0x00,0x80,0x80,0x40,0x40,0x20,0x20,0x10,0x08,0x08,0x04,0x04,0x00, // '7' + 0x3C,0x61,0xA0,0x50,0x2C,0x31,0xE3,0x0D,0x02,0x81,0x40,0x90,0x87,0x80, // '8' + 0x3C,0x21,0x20,0x90,0x28,0x14,0x09,0x0C,0x7A,0x01,0x01,0x11,0x87,0x00, // '9' + 0xA0,0x0A, // ':' + 0x48,0x00,0x12,0x50, // ';' + 0x00,0x40,0x70,0x70,0x38,0x08,0x00,0xE0,0x07,0x00,0x1C,0x00,0x40, // '<' + 0xFF,0xC0,0x00,0x00,0x7F,0xE0, // '=' + 0x80,0x0E,0x00,0x38,0x01,0xC0,0x04,0x07,0x03,0x83,0x80,0x80,0x00, // '>' + 0x79,0x08,0x10,0x20,0xC3,0x0C,0x10,0x20,0x00,0x81,0x00, // '?' + 0x0F,0xC0,0x30,0x60,0x80,0x62,0x3D,0x4C,0x86,0x52,0x04,0xA4,0x09,0x48,0x12,0x90,0x25,0x90,0xD1,0x1E,0xC1,0x00,0x01,0x83,0x00,0xFC,0x00, // '@' + 0x04,0x00,0x40,0x0A,0x00,0xA0,0x11,0x01,0x10,0x20,0x82,0x08,0x3F,0x84,0x04,0x40,0x48,0x02, // 'A' + 0xFE,0x20,0x68,0x0A,0x02,0x81,0xBF,0xC8,0x1A,0x02,0x80,0xA0,0x28,0x13,0xF8, // 'B' + 0x1F,0x08,0x64,0x02,0x00,0x80,0x20,0x08,0x02,0x00,0x80,0x10,0x02,0x18,0x7C, // 'C' + 0xFE,0x10,0x62,0x02,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x12,0x0C,0x7F,0x00, // 'D' + 0xFF,0x40,0x20,0x10,0x08,0x07,0xFA,0x01,0x00,0x80,0x40,0x20,0x1F,0xE0, // 'E' + 0xFE,0x80,0x80,0x80,0x80,0xFC,0x80,0x80,0x80,0x80,0x80,0x80, // 'F' + 0x1F,0x84,0x19,0x01,0x40,0x08,0x01,0x00,0x20,0xF4,0x02,0x80,0x48,0x08,0x81,0x0F,0xC0, // 'G' + 0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0xFF,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x20, // 'H' + 0xAA,0xAA,0xAA, // 'I' + 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xC0, // 'J' + 0x81,0x20,0x88,0x42,0x20,0x90,0x38,0x0A,0x02,0x40,0x88,0x21,0x08,0x22,0x04, // 'K' + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xFE, // 'L' + 0xC0,0x6C,0x06,0xA0,0xAA,0x0A,0xA0,0xA9,0x12,0x91,0x28,0xA2,0x8A,0x28,0x42,0x80,0x28,0x02, // 'M' + 0xC0,0x54,0x0A,0x81,0x48,0x28,0x85,0x10,0xA1,0x14,0x12,0x82,0x50,0x2A,0x05,0x40,0x60, // 'N' + 0x1F,0x02,0x08,0x40,0x48,0x02,0x80,0x28,0x02,0x80,0x28,0x02,0x80,0x24,0x04,0x20,0x81,0xF0, // 'O' + 0xFC,0x41,0x20,0x50,0x28,0x14,0x13,0xF1,0x00,0x80,0x40,0x20,0x10,0x00, // 'P' + 0x1F,0x02,0x08,0x40,0x48,0x02,0x80,0x28,0x02,0x80,0x28,0x02,0x80,0x24,0x04,0x20,0xC1,0xF0,0x00,0x80,0x04, // 'Q' + 0xFC,0x10,0x42,0x04,0x40,0x88,0x11,0x04,0x3F,0x84,0x10,0x81,0x10,0x22,0x02,0x40,0x40, // 'R' + 0x3C,0x63,0x20,0x10,0x08,0x03,0x80,0x78,0x06,0x01,0x40,0xB0,0xCF,0x80, // 'S' + 0xFF,0x82,0x00,0x80,0x20,0x08,0x02,0x00,0x80,0x20,0x08,0x02,0x00,0x80,0x20, // 'T' + 0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x09,0x02,0x1F,0x80, // 'U' + 0x80,0x28,0x02,0x40,0x44,0x04,0x20,0x82,0x08,0x11,0x01,0x10,0x11,0x00,0xA0,0x0A,0x00,0x40, // 'V' + 0x81,0x02,0x81,0x02,0x42,0x84,0x42,0x84,0x42,0x84,0x22,0x88,0x24,0x48,0x24,0x48,0x14,0x50,0x14,0x50,0x08,0x20,0x08,0x20, // 'W' + 0xC1,0x90,0x42,0x20,0x88,0x14,0x02,0x00,0x80,0x50,0x22,0x08,0x84,0x12,0x02, // 'X' + 0x80,0x90,0x42,0x20,0x88,0x14,0x02,0x00,0x80,0x20,0x08,0x02,0x00,0x80,0x20, // 'Y' + 0xFF,0xC0,0x08,0x02,0x00,0x80,0x20,0x08,0x02,0x00,0x80,0x20,0x08,0x02,0x00,0x7F,0xE0, // 'Z' + 0xE8,0x88,0x88,0x88,0x88,0x88,0x8E, // '[' + 0x83,0x04,0x10,0x40,0x82,0x08,0x10,0x41,0x02,0x08, // '\' + 0xE2,0x22,0x22,0x22,0x22,0x22,0x2E, // ']' + 0x0C,0x03,0xC0,0x84,0x20,0x40, // '^' + 0xFF,0x00, // '_' + 0xC3,0x0C, // '`' + 0x3C,0x46,0x02,0x7E,0xC2,0x82,0x82,0xC6,0x7A, // 'a' + 0x80,0x40,0x20,0x17,0x8C,0x24,0x0A,0x05,0x02,0x81,0x40,0xB0,0x97,0x80, // 'b' + 0x3C,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3C, // 'c' + 0x01,0x00,0x80,0x47,0xA4,0x34,0x0A,0x05,0x02,0x81,0x40,0x90,0xC7,0xA0, // 'd' + 0x38,0x44,0x82,0x82,0xFE,0x80,0x80,0x42,0x3C, // 'e' + 0x39,0x04,0x3C,0x41,0x04,0x10,0x41,0x04,0x10, // 'f' + 0x3D,0x21,0xA0,0x50,0x28,0x14,0x0A,0x04,0x86,0x3D,0x00,0x90,0x87,0x80, // 'g' + 0x80,0x40,0x20,0x17,0x8C,0x24,0x0A,0x05,0x02,0x81,0x40,0xA0,0x50,0x20, // 'h' + 0xA2,0xAA,0xAA, // 'i' + 0x22,0x02,0x22,0x22,0x22,0x22,0x22,0xC0, // 'j' + 0x80,0x40,0x20,0x10,0x48,0x44,0x42,0x41,0xC0,0x90,0x44,0x21,0x10,0x40, // 'k' + 0xAA,0xAA,0xAA, // 'l' + 0xBC,0xF3,0x1C,0x68,0x20,0xA0,0x82,0x82,0x0A,0x08,0x28,0x20,0xA0,0x82,0x82,0x08, // 'm' + 0xBC,0x61,0x20,0x50,0x28,0x14,0x0A,0x05,0x02,0x81,0x00, // 'n' + 0x3C,0x21,0x20,0x50,0x28,0x14,0x0A,0x04,0x84,0x3C,0x00, // 'o' + 0xBC,0x61,0x20,0x50,0x28,0x14,0x0A,0x05,0x84,0xBC,0x40,0x20,0x10,0x00, // 'p' + 0x3D,0x21,0xA0,0x50,0x28,0x14,0x0A,0x04,0x86,0x3D,0x00,0x80,0x40,0x20, // 'q' + 0xBB,0x08,0x20,0x82,0x08,0x20,0x80, // 'r' + 0x7C,0x82,0x80,0xC0,0x78,0x06,0x02,0x82,0x7C, // 's' + 0x41,0x0F,0x90,0x41,0x04,0x10,0x41,0x03,0x80, // 't' + 0x81,0x40,0xA0,0x50,0x28,0x14,0x0A,0x04,0x86,0x3D,0x00, // 'u' + 0x80,0x90,0x11,0x04,0x20,0x82,0x20,0x44,0x05,0x00,0xE0,0x08,0x00, // 'v' + 0x82,0x0A,0x08,0x24,0x51,0x11,0x44,0x48,0x90,0xA2,0x82,0x8A,0x04,0x10,0x10,0x40, // 'w' + 0xC3,0x21,0x09,0x04,0x81,0x81,0x20,0x90,0x84,0xC3,0x00, // 'x' + 0x80,0x90,0x44,0x10,0x84,0x22,0x08,0x81,0x40,0x50,0x0C,0x02,0x00,0x81,0xC0, // 'y' + 0xFE,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0xFE, // 'z' + 0x18,0x82,0x08,0x20,0x82,0x30,0x20,0x82,0x08,0x20,0x81,0x80, // '{' + 0xAA,0xAA,0xAA,0xAA, // '|' + 0xC0,0x82,0x08,0x20,0x82,0x06,0x20,0x82,0x08,0x20,0x8C,0x00 // '}' +}; +const GFXglyph Dialog_plain_16Glyphs[] = { +// bitmapOffset, width, height, xAdvance, xOffset, yOffset + { 0, 1, 1, 6, 0, 0 }, // ' ' + { 1, 2, 12, 7, 2, -12 }, // '!' + { 4, 5, 4, 7, 1, -12 }, // '"' + { 7, 12, 11, 14, 1, -11 }, // '#' + { 24, 8, 14, 11, 2, -12 }, // '$' + { 38, 14, 12, 16, 1, -12 }, // '%' + { 59, 12, 12, 13, 1, -12 }, // '&' + { 77, 2, 4, 4, 1, -12 }, // ''' + { 78, 5, 14, 7, 1, -12 }, // '(' + { 87, 5, 14, 7, 1, -12 }, // ')' + { 96, 8, 8, 9, 1, -12 }, // '*' + { 104, 10, 9, 14, 2, -9 }, // '+' + { 116, 3, 4, 6, 1, -2 }, // ',' + { 118, 5, 1, 7, 1, -5 }, // '-' + { 119, 2, 2, 6, 2, -2 }, // '.' + { 120, 6, 13, 6, 0, -12 }, // '/' + { 130, 9, 12, 11, 1, -12 }, // '0' + { 144, 8, 12, 11, 2, -12 }, // '1' + { 156, 8, 12, 11, 1, -12 }, // '2' + { 168, 9, 12, 11, 1, -12 }, // '3' + { 182, 10, 12, 11, 1, -12 }, // '4' + { 197, 9, 12, 11, 1, -12 }, // '5' + { 211, 9, 12, 11, 1, -12 }, // '6' + { 225, 9, 12, 11, 1, -12 }, // '7' + { 239, 9, 12, 11, 1, -12 }, // '8' + { 253, 9, 12, 11, 1, -12 }, // '9' + { 267, 2, 8, 6, 2, -8 }, // ':' + { 269, 3, 10, 6, 1, -8 }, // ';' + { 273, 11, 9, 14, 2, -9 }, // '<' + { 286, 11, 4, 14, 2, -7 }, // '=' + { 292, 11, 9, 14, 2, -9 }, // '>' + { 305, 7, 12, 10, 1, -12 }, // '?' + { 316, 15, 14, 17, 1, -12 }, // '@' + { 343, 12, 12, 12, 0, -12 }, // 'A' + { 361, 10, 12, 12, 1, -12 }, // 'B' + { 376, 10, 12, 12, 1, -12 }, // 'C' + { 391, 11, 12, 13, 1, -12 }, // 'D' + { 408, 9, 12, 11, 1, -12 }, // 'E' + { 422, 8, 12, 10, 1, -12 }, // 'F' + { 434, 11, 12, 13, 1, -12 }, // 'G' + { 451, 11, 12, 13, 1, -12 }, // 'H' + { 468, 2, 12, 6, 2, -12 }, // 'I' + { 471, 4, 15, 6, 0, -12 }, // 'J' + { 479, 10, 12, 11, 1, -12 }, // 'K' + { 494, 8, 12, 10, 1, -12 }, // 'L' + { 506, 12, 12, 14, 1, -12 }, // 'M' + { 524, 11, 12, 13, 1, -12 }, // 'N' + { 541, 12, 12, 14, 1, -12 }, // 'O' + { 559, 9, 12, 11, 1, -12 }, // 'P' + { 573, 12, 14, 14, 1, -12 }, // 'Q' + { 594, 11, 12, 12, 1, -12 }, // 'R' + { 611, 9, 12, 11, 1, -12 }, // 'S' + { 625, 10, 12, 10, 0, -12 }, // 'T' + { 640, 11, 12, 13, 1, -12 }, // 'U' + { 657, 12, 12, 12, 0, -12 }, // 'V' + { 675, 16, 12, 18, 1, -12 }, // 'W' + { 699, 10, 12, 12, 1, -12 }, // 'X' + { 714, 10, 12, 10, 0, -12 }, // 'Y' + { 729, 11, 12, 13, 1, -12 }, // 'Z' + { 746, 4, 14, 7, 1, -12 }, // '[' + { 753, 6, 13, 6, 0, -12 }, // '\' + { 763, 4, 14, 7, 2, -12 }, // ']' + { 770, 11, 4, 14, 2, -12 }, // '^' + { 776, 9, 1, 9, 0, 3 }, // '_' + { 778, 5, 3, 9, 1, -13 }, // '`' + { 780, 8, 9, 10, 1, -9 }, // 'a' + { 789, 9, 12, 11, 1, -12 }, // 'b' + { 803, 8, 9, 10, 1, -9 }, // 'c' + { 812, 9, 12, 11, 1, -12 }, // 'd' + { 826, 8, 9, 10, 1, -9 }, // 'e' + { 835, 6, 12, 7, 1, -12 }, // 'f' + { 844, 9, 12, 11, 1, -9 }, // 'g' + { 858, 9, 12, 11, 1, -12 }, // 'h' + { 872, 2, 12, 4, 1, -12 }, // 'i' + { 875, 4, 15, 4, -1, -12 }, // 'j' + { 883, 9, 12, 10, 1, -12 }, // 'k' + { 897, 2, 12, 4, 1, -12 }, // 'l' + { 900, 14, 9, 16, 1, -9 }, // 'm' + { 916, 9, 9, 11, 1, -9 }, // 'n' + { 927, 9, 9, 11, 1, -9 }, // 'o' + { 938, 9, 12, 11, 1, -9 }, // 'p' + { 952, 9, 12, 11, 1, -9 }, // 'q' + { 966, 6, 9, 8, 1, -9 }, // 'r' + { 973, 8, 9, 10, 1, -9 }, // 's' + { 982, 6, 11, 7, 0, -11 }, // 't' + { 991, 9, 9, 11, 1, -9 }, // 'u' + { 1002, 11, 9, 10, 0, -9 }, // 'v' + { 1015, 14, 9, 14, 0, -9 }, // 'w' + { 1031, 9, 9, 11, 1, -9 }, // 'x' + { 1042, 10, 12, 10, 0, -9 }, // 'y' + { 1057, 8, 9, 10, 1, -9 }, // 'z' + { 1066, 6, 15, 11, 2, -12 }, // '{' + { 1078, 2, 16, 6, 2, -12 }, // '|' + { 1082, 6, 15, 11, 2, -12 } // '}' +}; +const GFXfont Dialog_plain_16 = { +(uint8_t *)Dialog_plain_16Bitmaps,(GFXglyph *)Dialog_plain_16Glyphs,0x20, 0x7E, 19}; \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font30.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font30.h new file mode 100644 index 00000000..461ffa7e --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font30.h @@ -0,0 +1,199 @@ +// Created by http://oleddisplay.squix.ch/ Consider a donation +// In case of problems make sure that you are using the font file with the correct version! +const uint8_t Special_Elite_Regular_30Bitmaps[] = { + + // Bitmap Data: + 0x00, // ' ' + 0x63,0xBD,0xE7,0x39,0xCE,0x73,0x98,0xC6,0x31,0x84,0x01,0x39,0xE6,0x00, // '!' + 0x67,0x73,0x99,0xCC,0xE6,0x23,0x19,0x8C,0x44, // '"' + 0x03,0x8C,0x03,0x9C,0x03,0x18,0x03,0x18,0x03,0x18,0x06,0x10,0x06,0x30,0x3E,0xF4,0x7F,0xFE,0x0C,0x60,0x0C,0x60,0x0C,0x40,0xFF,0xFC,0xFF,0xE8,0x10,0x80,0x31,0x80,0x31,0x80,0x71,0x80,0x63,0x00,0x63,0x00,0x63,0x00, // '#' + 0x02,0x00,0x06,0x00,0x0C,0x00,0x38,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x1F,0xE0,0xF6,0xF1,0x8C,0x62,0x19,0xCC,0x33,0x98,0x46,0x30,0x80,0x39,0x00,0x3F,0x00,0x0F,0xE0,0x08,0xE0,0x10,0x6E,0x20,0xDE,0x61,0xB0,0xC3,0x61,0x8C,0x73,0x38,0x7F,0xE0,0x3E,0x00,0x18,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x03,0x00,0x06,0x00, // '$' + 0x00,0x01,0xC0,0x00,0x78,0x00,0x1F,0x00,0x07,0xC0,0x01,0xF0,0x00,0xFE,0x07,0xFD,0x81,0xFC,0x70,0x31,0x8C,0x0E,0x33,0x01,0x86,0x60,0x31,0xD8,0x06,0x32,0x00,0xFC,0xC0,0x0F,0x10,0x00,0x06,0x00,0x01,0xCE,0x00,0x33,0xE0,0x0C,0xC4,0x01,0xB0,0xC0,0x66,0x18,0x0C,0xC7,0x03,0x18,0xC0,0x63,0xF0,0x18,0x3C,0x03,0x00,0x00,0xC0,0x00,0x38,0x00,0x06,0x00,0x01,0xC0,0x00,0x38,0x00,0x02,0x00,0x00, // '%' + 0x03,0xC0,0x00,0xFC,0x00,0x39,0xC0,0x0E,0x18,0x01,0xC3,0x00,0x18,0xE0,0x03,0x98,0x00,0x36,0x00,0x07,0x83,0x81,0xE1,0xF8,0xF6,0x3F,0x38,0xC6,0xCE,0x0C,0x81,0x81,0xB0,0x20,0x1E,0x06,0x03,0x82,0xE0,0x30,0xCC,0x0F,0x19,0xFF,0x7F,0x1F,0xFF,0xC1,0xF8,0x70, // '&' + 0x6E,0x66,0x66,0x62, // ''' + 0x18,0xE3,0x9C,0x71,0x86,0x30,0xC3,0x0C,0x30,0xC3,0x0C,0x30,0xC3,0x06,0x18,0x60,0x83,0x04,0x18, // '(' + 0xE1,0xC1,0xC3,0x83,0x87,0x06,0x0E,0x1C,0x18,0x70,0x60,0xC1,0x83,0x0C,0x18,0x30,0x40,0xC3,0x06,0x18,0x70,0x40, // ')' + 0x18,0x60,0x38,0xC0,0x73,0x80,0x66,0x00,0x78,0x1F,0xFF,0xBF,0xFF,0x03,0xC0,0x0D,0x80,0x39,0x80,0x63,0x80,0xC7,0x00,0x04,0x00, // '*' + 0x02,0x00,0x0C,0x00,0x30,0x00,0xC0,0x03,0x03,0xFF,0xCF,0xFF,0x80,0xC0,0x03,0x00,0x0C,0x00,0x30,0x01,0xC0,0x03,0x00, // '+' + 0x08,0x3E,0x1F,0x0F,0xC7,0xF3,0xF9,0xF8,0x5C,0x0E,0x0E,0x0E,0x0F,0x0F,0x03,0x00, // ',' + 0xCA,0x94,0xBF,0xFE,0xFF,0xFE,0x00,0x0C, // '-' + 0x7C,0xF8,0xFE,0xFE,0xFC,0xFC,0x78, // '.' + 0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0x1C,0x00,0x38,0x00,0x30,0x00,0x70,0x00,0x60,0x00,0xE0,0x00,0xC0,0x01,0xC0,0x01,0x80,0x03,0x00,0x03,0x00,0x06,0x00,0x0E,0x00,0x0C,0x00,0x18,0x00,0x38,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xE0,0x00,0xC0,0x00, // '/' + 0x01,0x00,0x1F,0xE0,0x3C,0x70,0x70,0x38,0x60,0x18,0x60,0x0C,0xC0,0x0C,0xC0,0x04,0x80,0x04,0xC0,0x06,0x80,0x04,0x80,0x06,0x80,0x0C,0xC0,0x0E,0xC0,0x0C,0xC0,0x0C,0xC0,0x1C,0x60,0x1C,0x70,0x30,0x3F,0xF0,0x1F,0xE0,0x07,0xC0, // '0' + 0x7F,0x80,0x7F,0xC0,0x12,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x80,0x01,0x80,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x01,0x80,0x00,0xC0,0x10,0xF3,0x9F,0xFF,0xEF,0xFF,0xF0, // '1' + 0x1F,0xE0,0xF0,0xC1,0x00,0xC6,0x00,0xCE,0x01,0x9E,0x07,0x3C,0x0E,0x00,0x38,0x00,0xE0,0x07,0x80,0x3E,0x01,0xF0,0x03,0x80,0x0E,0x00,0x38,0x00,0x60,0x00,0xFE,0x0D,0xEF,0x1B,0x8F,0xF6,0x07,0x84,0x00,0x00, // '2' + 0x01,0xF8,0x7F,0xF1,0xC0,0xC3,0x03,0x82,0x0C,0x0C,0x30,0x00,0xE0,0x03,0xC0,0x0F,0xC0,0x37,0xE0,0x60,0xE0,0x00,0xC0,0x00,0xC0,0x01,0x98,0x03,0x78,0x06,0xF0,0x1D,0xC0,0x39,0x81,0xE3,0xFF,0x83,0xFF,0x00,0xF0,0x00, // '3' + 0x00,0x38,0x00,0x1E,0x00,0x0F,0x80,0x03,0x60,0x01,0x98,0x00,0xE6,0x00,0x71,0x80,0x38,0x60,0x1C,0x18,0x07,0x06,0x03,0x81,0x81,0xC0,0x60,0x70,0x18,0x3F,0xFF,0xE7,0xFF,0xF8,0x00,0x60,0x00,0x18,0x00,0x0E,0x00,0x0F,0xF8,0x07,0xFE,0x01,0x3B,0x00, // '4' + 0x30,0x20,0xFF,0xE1,0x8F,0x03,0x00,0x02,0x00,0x0E,0x00,0x0C,0x00,0x3B,0xE0,0x7F,0xE0,0xF0,0xE0,0xC0,0xE0,0x00,0xE0,0x00,0xC0,0x01,0x9C,0x03,0x78,0x06,0x70,0x18,0xE0,0x70,0xE1,0xC1,0xFF,0x00,0xFC,0x00, // '5' + 0x01,0xF0,0x0F,0xF8,0x0E,0x1C,0x18,0x1E,0x30,0x3C,0x70,0x1C,0x60,0x00,0x60,0x00,0x67,0xC0,0x6F,0xF8,0x78,0x3C,0xF0,0x1E,0xE0,0x0E,0x60,0x06,0x60,0x06,0x60,0x0E,0x30,0x0E,0x38,0x1E,0x3C,0x7C,0x0F,0xF8,0x07,0xC0, // '6' + 0x03,0xC0,0x1F,0xFB,0x8F,0xFF,0xCE,0x3F,0xE7,0x00,0x73,0x00,0x33,0x80,0x38,0x80,0x18,0x00,0x18,0x00,0x1C,0x00,0x0C,0x00,0x0E,0x00,0x06,0x00,0x07,0x00,0x03,0x00,0x01,0x80,0x01,0xC0,0x00,0xE0,0x00,0xF0,0x00,0x30,0x00,0x38,0x00,0x18,0x00,0x04,0x00, // '7' + 0x03,0x00,0x1F,0xE0,0x3C,0xF0,0x70,0x38,0xE0,0x1C,0xE0,0x0C,0xE0,0x0C,0x60,0x18,0x70,0x18,0x3F,0xF8,0x3F,0xF0,0x78,0x70,0xE0,0x1C,0xC0,0x1C,0xC0,0x0C,0xC0,0x0E,0xC0,0x0C,0xE0,0x1C,0xF0,0x3C,0xFF,0xF8,0x7F,0xF0,0x0F,0x80, // '8' + 0x0F,0xE0,0x1C,0xF0,0x30,0x38,0x60,0x10,0x60,0x0C,0x60,0x0C,0xC0,0x0E,0x60,0x0E,0x60,0x1E,0x78,0x1E,0x1F,0xFE,0x0F,0xEE,0x01,0x0E,0x00,0x0C,0x30,0x0C,0x78,0x18,0x68,0x18,0x7C,0xF0,0x3F,0xE0,0x1F,0xC0,0x0F,0x00, // '9' + 0x20,0x78,0xFC,0xE8,0xFC,0x78,0x10,0x00,0x00,0x7C,0xF8,0xFE,0xFE,0xFC,0xFC,0x78, // ':' + 0x10,0x1E,0x1F,0x8F,0x87,0xE1,0xE0,0x40,0x00,0x08,0x3F,0x1F,0x8F,0xC7,0xF3,0xF9,0xF8,0x5C,0x0E,0x0E,0x0E,0x0F,0x0F,0x03,0x00, // ';' + 0x00,0xE0,0x1E,0x03,0xC0,0xF0,0x3E,0x07,0x80,0xF0,0x0E,0x00,0x70,0x03,0xE0,0x0F,0x00,0x3E,0x00,0xE0, // '<' + 0xFF,0xFE,0xFF,0xFE,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x5E,0xFF,0xFE,0xFF,0xFE, // '=' + 0xE0,0x0F,0x00,0x78,0x01,0xE0,0x0F,0x00,0x3C,0x01,0xE0,0x0E,0x01,0xC0,0xF8,0x3E,0x0F,0x80,0xE0,0x00, // '>' + 0x0E,0x01,0xFC,0x1C,0x79,0xC0,0x4E,0x03,0x78,0x19,0xE0,0xCF,0x06,0x78,0x60,0x0F,0x01,0xE0,0x1E,0x00,0xE0,0x07,0x00,0x38,0x00,0xC0,0x00,0x00,0x00,0x03,0x00,0x3C,0x00,0xF0,0x07,0x00, // '?' + 0x07,0xF8,0x01,0xE3,0x80,0x70,0x18,0x1C,0x01,0x83,0x0C,0x30,0xC7,0xFB,0x18,0xC7,0x63,0x38,0xCC,0xE6,0x19,0x9D,0xC2,0x33,0xB8,0xC6,0x77,0x18,0xC6,0xE7,0x30,0xCF,0xFC,0x18,0xE7,0x31,0x80,0x04,0x38,0x01,0x83,0x80,0xE0,0x1F,0x78,0x00,0xFC,0x00, // '@' + 0x01,0xC0,0x00,0xF8,0x00,0x3E,0x00,0x0F,0x80,0x07,0xE0,0x01,0xF8,0x00,0x76,0x00,0x19,0xC0,0x0E,0x70,0x01,0x8C,0x00,0xE3,0x00,0x38,0xC0,0x0E,0x38,0x03,0xFE,0x00,0xFF,0x80,0x7A,0x60,0x1C,0x18,0x07,0x02,0x01,0x81,0xC1,0xF8,0xFE,0xFE,0x3F,0x00, // 'A' + 0xFF,0xF0,0x7F,0xFC,0x0F,0x8F,0x03,0x01,0xC1,0x80,0x60,0xC0,0x30,0x60,0x18,0x30,0x1C,0x1C,0x3C,0x0F,0xFE,0x07,0xFF,0x03,0x83,0x81,0x80,0xE0,0xC0,0x38,0x60,0x1C,0x30,0x0E,0x18,0x04,0x0C,0x07,0x0E,0x07,0x0F,0xFF,0x07,0xFE,0x00, // 'B' + 0x07,0xCC,0x1F,0xFE,0x3F,0xFE,0x38,0x7E,0x70,0x1E,0x70,0x1E,0x60,0x0E,0x60,0x06,0x60,0x0C,0x60,0x00,0xE0,0x00,0xE0,0x0C,0xE0,0x0E,0x60,0x0E,0x60,0x0E,0x60,0x1C,0x30,0x1C,0x30,0x78,0x1F,0xF8,0x0F,0xF0,0x07,0xC0, // 'C' + 0x7F,0xE0,0x7F,0xF8,0x3F,0xFF,0x07,0x83,0x81,0xC0,0xE0,0xE0,0x30,0x70,0x1C,0x38,0x0E,0x1C,0x07,0x0E,0x01,0x87,0x00,0xC3,0x80,0x61,0xC0,0x30,0xE0,0x38,0x70,0x1C,0x30,0x0E,0x18,0x0E,0x0E,0x0F,0x07,0x9F,0x0F,0xFF,0x07,0xFF,0x00, // 'D' + 0x0E,0xFE,0x3F,0xFF,0xC7,0xFF,0xB0,0xC0,0x0C,0x10,0x03,0x04,0x00,0xC1,0x06,0x38,0x41,0x04,0x10,0x60,0x07,0xF8,0x01,0x7C,0x00,0x7F,0x80,0x18,0x60,0x06,0x18,0xC1,0x86,0x30,0x60,0x0E,0x18,0x03,0x04,0x00,0xC3,0x80,0x71,0xFF,0xFC,0x7F,0xFE,0x00, // 'E' + 0x7F,0xFE,0x3F,0xFF,0xC3,0xC7,0xF0,0x60,0x0C,0x18,0x03,0x86,0x18,0xE1,0x86,0x38,0x61,0x80,0x18,0xE0,0x07,0xF8,0x01,0xFE,0x00,0x7F,0x80,0x18,0x60,0x06,0x18,0x01,0x86,0x00,0x61,0x00,0x18,0x00,0x06,0x00,0x07,0xE0,0x03,0xFC,0x00,0xFF,0x00,0x00, // 'F' + 0x07,0xC4,0x07,0xFF,0x03,0xC7,0xC0,0xE0,0x70,0x70,0x1C,0x18,0x03,0x86,0x00,0xC1,0x80,0x10,0x60,0x00,0x38,0x00,0x0E,0x03,0xF1,0x80,0xFE,0x60,0x1E,0x18,0x03,0x86,0x00,0xE1,0x80,0x38,0x30,0x1E,0x0E,0x07,0x81,0xC7,0xE0,0x3F,0xF8,0x03,0xC6,0x00, // 'G' + 0x74,0x23,0x1F,0xC7,0xF1,0xF0,0x7C,0x0C,0x03,0x01,0x80,0x60,0x30,0x0C,0x06,0x01,0x80,0xC0,0x30,0x18,0x06,0x03,0xF9,0xC0,0x7F,0xF8,0x0F,0xE7,0x01,0x80,0x60,0x30,0x0C,0x06,0x01,0x80,0xC0,0x30,0x18,0x06,0x03,0x00,0xC0,0x70,0x18,0x7F,0x9F,0xCF,0xF3,0xFC,0x00,0x10,0x00, // 'H' + 0x7F,0xFB,0xFF,0xEF,0xBF,0x01,0xC0,0x07,0x00,0x1C,0x00,0x70,0x01,0xC0,0x07,0x00,0x1C,0x00,0x70,0x00,0xC0,0x07,0x00,0x1C,0x00,0x70,0x01,0xC0,0x07,0x00,0x1C,0x00,0x70,0x3F,0xFE,0xFF,0xF9,0x00,0xC0, // 'I' + 0x0F,0xFC,0x0F,0xFE,0x07,0xFE,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0xE0,0xE0,0x60,0xF0,0x60,0xF0,0x60,0xF0,0x60,0xE0,0xC0,0xE1,0x80,0x7F,0x80,0x1F,0x00, // 'J' + 0xFE,0x3E,0x3F,0xDF,0xC3,0xC3,0x80,0x60,0xC0,0x18,0x60,0x06,0x38,0x01,0x9C,0x00,0x67,0x00,0x1B,0x80,0x07,0xE0,0x01,0xFC,0x00,0x73,0x80,0x18,0xE0,0x06,0x18,0x01,0x83,0x00,0x60,0xC0,0x18,0x10,0x06,0x06,0x03,0x81,0x81,0xF8,0xF8,0x7E,0x3F,0x80, // 'K' + 0x02,0x00,0x7F,0xE0,0x3F,0xE0,0x13,0xC0,0x01,0xC0,0x00,0xC0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0C,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x0C,0x38,0x06,0x1C,0x03,0x0E,0x01,0x87,0x00,0xCF,0xFF,0xE7,0xFF,0xF7,0xFF,0xF0, // 'L' + 0x38,0x01,0x07,0xC0,0xFC,0x3C,0x0F,0xC3,0xE0,0xF0,0x3E,0x1F,0x03,0xE0,0xF0,0x1E,0x1F,0x81,0xF1,0xB8,0x13,0x1B,0x81,0xB1,0x90,0x1B,0x13,0x03,0xB1,0x30,0x39,0x11,0x03,0x91,0x30,0x19,0xB1,0x01,0x9F,0x10,0x19,0xF1,0x01,0x1A,0x10,0x78,0xE1,0x0F,0xCE,0x7E,0x7C,0x47,0xC0, // 'M' + 0x78,0x3E,0x3F,0x1F,0xE7,0xE3,0xF0,0xF8,0x38,0x1E,0x0E,0x07,0xC3,0x81,0xB0,0xE0,0x6C,0x18,0x19,0x86,0x06,0x61,0x81,0x88,0x40,0x63,0x18,0x18,0x66,0x06,0x19,0x81,0x86,0x40,0x61,0xD0,0x18,0x36,0x06,0x07,0x81,0x81,0xE1,0xFC,0x78,0xFF,0x0C,0x00, // 'N' + 0x03,0xF0,0x0F,0xFC,0x0F,0xFF,0x07,0x03,0x87,0x00,0xE3,0x80,0x31,0x80,0x19,0xC0,0x0E,0xE0,0x03,0x70,0x01,0x98,0x00,0xCC,0x00,0x66,0x00,0x33,0x00,0x19,0x80,0x0C,0xE0,0x0C,0x38,0x06,0x1E,0x07,0x0F,0x87,0x03,0xFF,0x80,0xFF,0x80,0x1F,0x00, // 'O' + 0x15,0x00,0xFF,0xF0,0x3F,0xF8,0x18,0x1C,0x18,0x0E,0x18,0x0E,0x18,0x0E,0x10,0x0E,0x18,0x0C,0x1C,0xFC,0x1F,0xF8,0x1F,0xE0,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x1C,0x00,0x7E,0x00,0xFF,0x00, // 'P' + 0x0F,0xE0,0x0F,0xF8,0x0E,0x0E,0x0E,0x01,0x86,0x00,0xC3,0x00,0x61,0x80,0x18,0xC0,0x0C,0xE0,0x06,0x60,0x03,0x10,0x00,0x88,0x00,0xC4,0x00,0x63,0x00,0x31,0x8E,0x18,0x6F,0xD8,0x3F,0xFC,0x1F,0x7C,0x07,0xFC,0x01,0xFE,0x00,0x1E,0x10,0x01,0x98,0x00,0xEC,0x00,0x38, // 'Q' + 0x3F,0xFC,0x03,0xFF,0xE0,0x1E,0x0E,0x00,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x70,0x0C,0x1F,0x00,0xFF,0xE0,0x0F,0xFC,0x00,0xE1,0xC0,0x0C,0x0C,0x00,0xC0,0xE0,0x0C,0x0E,0x00,0xC0,0x60,0x0C,0x0E,0x00,0xC0,0x64,0x0F,0x07,0xE7,0xF8,0x7C,0xFF,0x03,0xC0, // 'R' + 0x00,0x10,0x3F,0xE0,0xFF,0xE3,0xC1,0xC6,0x03,0x9C,0x03,0x38,0x06,0x30,0x04,0x78,0x00,0x7F,0xC0,0x3F,0xE0,0x01,0xC8,0x01,0xD0,0x01,0xB0,0x03,0x60,0x06,0xC0,0x0D,0xC0,0x7B,0xC1,0xE7,0xFF,0x0F,0xFC,0x00, // 'S' + 0xFF,0xFE,0x7F,0xF3,0xB0,0x60,0xD8,0x30,0xEC,0x18,0x76,0x0C,0x1B,0x06,0x0D,0x03,0x04,0x01,0x80,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x01,0xC0,0x00,0xE0,0x03,0xFE,0x03,0xFF,0x01,0xF8,0x00, // 'T' + 0xFE,0x7F,0xBF,0x9F,0xE3,0xC3,0xE0,0xE0,0x30,0x30,0x08,0x0C,0x03,0x03,0x00,0xC0,0xC0,0x30,0x30,0x0C,0x0C,0x03,0x03,0x00,0xC0,0xC0,0x30,0x30,0x0C,0x0E,0x03,0x03,0x80,0xC0,0x60,0x30,0x18,0x0C,0x06,0x06,0x01,0xE7,0x80,0x3E,0xC0,0x07,0xE0,0x00, // 'U' + 0x00,0x07,0x1F,0xC7,0xFB,0xF8,0xFF,0x1F,0x0F,0x81,0xC0,0xE0,0x18,0x1C,0x03,0x03,0x00,0x60,0xE0,0x0C,0x1C,0x00,0xC3,0x80,0x38,0xE0,0x03,0x1C,0x00,0x63,0x80,0x0C,0x70,0x00,0xCE,0x00,0x19,0x80,0x03,0xF0,0x00,0x7E,0x00,0x0F,0x80,0x00,0xF0,0x00,0x1E,0x00,0x03,0xC0,0x00, // 'V' + 0x01,0x21,0xDF,0xFF,0xF9,0xC3,0x8F,0x08,0x70,0xC1,0x0E,0x18,0x01,0xE2,0x04,0x38,0x40,0x85,0x98,0x18,0xB3,0x01,0x16,0x60,0x26,0xEC,0x06,0x99,0x80,0xD1,0xA0,0x1B,0x3C,0x03,0xC7,0x80,0x78,0xF0,0x0F,0x1E,0x00,0xE3,0xC0,0x1C,0x78,0x03,0x87,0x00,0x60,0xC0, // 'W' + 0x7E,0x1F,0x3F,0x8F,0xE1,0xC1,0xC0,0x30,0x60,0x06,0x30,0x01,0x8C,0x00,0x36,0x00,0x0F,0x80,0x01,0xE0,0x00,0x70,0x00,0x1C,0x00,0x07,0x00,0x03,0xE0,0x00,0xF8,0x00,0x73,0x00,0x18,0xE0,0x0C,0x18,0x07,0x07,0x03,0xE3,0xFB,0xFC,0xFE,0xFE,0x3F,0x80, // 'X' + 0x1C,0x08,0x8F,0xF7,0xFB,0xFE,0xFF,0x0F,0x87,0xC0,0x60,0xE0,0x0E,0x38,0x00,0xC6,0x00,0x1D,0xC0,0x01,0xF8,0x00,0x3E,0x00,0x03,0xC0,0x00,0x70,0x00,0x06,0x00,0x00,0xC0,0x00,0x18,0x00,0x03,0x00,0x00,0x60,0x00,0x0C,0x00,0x03,0x80,0x03,0xFF,0x01,0xFF,0xF0,0x3F,0xFE,0x00, // 'Y' + 0xBF,0xF8,0xFF,0xF8,0xC0,0xF8,0xC0,0xF8,0xC0,0xF0,0xC1,0xE0,0xC1,0xE0,0x03,0xC0,0x07,0x80,0x07,0x00,0x0F,0x00,0x0E,0x00,0x3C,0x08,0x1C,0x0C,0x78,0x0E,0xF0,0x0C,0xF0,0x0E,0xF4,0x3C,0xFF,0xFC,0xFF,0xFC,0xFF,0xFC, // 'Z' + 0x49,0xFB,0x86,0x0C,0x18,0x30,0x60,0xC1,0xC3,0x06,0x0E,0x18,0x38,0x70,0xC1,0xC3,0x87,0x0E,0x1C,0x30,0x78,0xF8, // '[' + 0xC0,0x00,0xE0,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x38,0x00,0x18,0x00,0x1C,0x00,0x0E,0x00,0x0E,0x00,0x07,0x00,0x03,0x00,0x01,0x80,0x01,0x80,0x00,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x38,0x00,0x1C,0x00,0x1C,0x00,0x0E,0x00,0x06, // '\' + 0x24,0x7C,0x0C,0x0C,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0C,0x7C,0xFC, // ']' + 0x0E,0x00,0x78,0x07,0xC0,0x37,0x03,0x18,0x18,0x61,0x83,0x8C,0x0E,0xC0,0x36,0x01,0x80, // '^' + 0x00,0x90,0xFF,0xFE,0xFF,0xFC, // '_' + 0x80,0xC0,0xF0,0x38,0x0E,0x04, // '`' + 0x0F,0xC0,0x1F,0xF0,0x0F,0x1C,0x0F,0x06,0x07,0x81,0x81,0xC0,0xC0,0x03,0xE0,0x3F,0xF0,0x7F,0x18,0x38,0x0C,0x38,0x06,0x18,0x07,0x0E,0x03,0xB3,0xFF,0xF8,0xFE,0x38, // 'a' + 0x60,0x00,0x3E,0x00,0x07,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x84,0x00,0x3F,0xE0,0x0F,0xFE,0x07,0x81,0x81,0xC0,0x30,0x30,0x0C,0x1C,0x01,0x87,0x00,0x61,0xC0,0x30,0x20,0x0E,0x1C,0x03,0x07,0x01,0xC0,0xE0,0xE0,0x3F,0xF8,0x0B,0xFC,0x00, // 'b' + 0x07,0xE0,0x7F,0xF1,0x7F,0xE3,0xC3,0xE7,0x07,0xCC,0x07,0x98,0x0E,0x70,0x00,0xE0,0x01,0xC0,0x01,0x80,0x63,0x80,0xE3,0x87,0xC3,0xFF,0x03,0xF8,0x00,0x40, // 'c' + 0x00,0xE8,0x00,0x7F,0x00,0x0F,0xC0,0x00,0x70,0x00,0x1C,0x00,0x07,0x00,0x61,0xC0,0x7F,0xF0,0x3F,0xFC,0x1E,0x1F,0x07,0x01,0xC1,0x80,0x70,0xE0,0x0C,0x38,0x03,0x0E,0x01,0xC3,0x00,0x70,0x70,0x1C,0x1C,0x07,0x03,0x87,0xC0,0xFF,0xFE,0x0F,0xEF,0x80,0xE0,0x00, // 'd' + 0x07,0x80,0x3F,0xC0,0xF3,0xC3,0x80,0xC6,0x00,0x9C,0x01,0x9C,0x47,0x7F,0xFE,0xF0,0x09,0xC0,0x01,0x80,0x03,0x80,0x63,0x81,0xC3,0xFF,0x03,0xFC,0x01,0xC0, // 'e' + 0x01,0xF8,0x01,0xFE,0x01,0xEF,0x81,0xC3,0xC0,0xE1,0xF0,0x70,0x70,0x38,0x10,0xFF,0x80,0x7F,0xC0,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x06,0x00,0x03,0x80,0x1F,0xFC,0x0F,0xFE,0x07,0x06,0x00, // 'f' + 0x00,0x06,0x07,0xEF,0x0F,0xFB,0xC7,0x0F,0xE3,0x03,0xC1,0x80,0xC0,0xC0,0xE0,0x70,0x60,0x18,0x70,0x1F,0xF0,0x1F,0xF0,0x0C,0x00,0x06,0x00,0x03,0xF7,0x01,0xFF,0xF0,0xF0,0x3C,0xE0,0x07,0x60,0x03,0xB8,0x01,0xCF,0x07,0xC3,0xFF,0x80,0x3C,0x00, // 'g' + 0xF8,0x00,0x0F,0x00,0x00,0x60,0x00,0x0C,0x00,0x01,0x80,0x00,0x30,0x60,0x06,0x3F,0x00,0xFF,0xE0,0x1F,0x06,0x03,0xC0,0xC0,0x70,0x18,0x0E,0x03,0x01,0xC0,0x60,0x30,0x0C,0x03,0x00,0x80,0x60,0x10,0x1C,0x02,0x03,0x80,0xE1,0x7C,0x7F,0x3F,0x9F,0xE7,0xC1,0x00, // 'h' + 0x07,0x00,0x07,0xC0,0x03,0xE0,0x00,0xE0,0x00,0x00,0x00,0x00,0x01,0xFC,0x01,0xFF,0x00,0x11,0x80,0x00,0xC0,0x00,0x60,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x12,0xFF,0x9F,0xF9,0xE7,0x80,0x20, // 'i' + 0x07,0x81,0xF8,0x1F,0x03,0xA0,0x38,0x00,0x0F,0xE1,0xFE,0x01,0xC0,0x18,0x03,0x00,0x60,0x0C,0x01,0x80,0x30,0x06,0x00,0xC0,0x18,0x03,0x00,0x6E,0x0D,0xE1,0xBC,0x37,0x9E,0xF7,0x8F,0xC0,0xE0,0x00, // 'j' + 0xF8,0x00,0x0F,0x00,0x00,0x60,0x00,0x0C,0x00,0x01,0x80,0x00,0x30,0x00,0x06,0x0F,0xE0,0x41,0xFC,0x08,0x38,0x01,0x0E,0x00,0x23,0x80,0x06,0xE0,0x00,0xFC,0x00,0x1F,0xC0,0x07,0x9C,0x00,0x61,0xC0,0x1C,0x18,0x07,0x83,0x83,0xFC,0xFE,0x3F,0x9F,0xE0,0x01,0xD8, // 'k' + 0xFF,0x00,0x7F,0xC0,0x00,0x60,0x00,0x30,0x00,0x38,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x01,0x80,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x01,0x80,0x01,0xC0,0x3F,0xFF,0xDF,0xFF,0xE7,0xA8,0xE0, // 'l' + 0x01,0x0C,0x0E,0xFF,0xC3,0xFF,0xFC,0x1E,0x7B,0x83,0x8E,0x70,0x61,0xCE,0x0E,0x31,0xC1,0xC6,0x38,0x30,0xC3,0x06,0x18,0x60,0xE3,0x0C,0x1C,0x61,0x83,0x8C,0x70,0xF3,0xEF,0x9F,0x7B,0xF3,0x80,0x1A, // 'm' + 0x20,0x70,0x3E,0x7F,0x0F,0xBF,0xC0,0xFC,0x38,0x1E,0x0E,0x07,0x01,0x81,0x80,0x60,0x60,0x38,0x18,0x0E,0x06,0x03,0x81,0x80,0xE0,0x60,0x18,0x18,0x06,0x1F,0x8F,0xEF,0xF3,0xF8,0xF8,0x28, // 'n' + 0x01,0xC0,0x0F,0xF0,0x3F,0xF8,0x38,0x3C,0x70,0x0E,0x60,0x0E,0xE0,0x0E,0x60,0x0E,0xE0,0x02,0xE0,0x0E,0xE0,0x0E,0x70,0x1E,0x38,0x3C,0x1F,0xF8,0x0F,0xF0,0x03,0xE0, // 'o' + 0x78,0xF0,0x7F,0xFE,0x07,0x83,0x81,0x80,0xC0,0xC0,0x30,0xE0,0x18,0x20,0x04,0x30,0x02,0x1C,0x03,0x06,0x01,0x83,0x00,0xC1,0x80,0xC0,0xF0,0xC0,0x7F,0xE0,0x23,0xC0,0x10,0x00,0x08,0x00,0x04,0x00,0x06,0x00,0x1F,0xE0,0x07,0x60,0x00, // 'p' + 0x02,0x00,0x0F,0xEE,0x0F,0xFF,0x0F,0x0F,0x06,0x01,0x87,0x00,0xE3,0x80,0x71,0xC0,0x30,0xE0,0x18,0x30,0x0C,0x18,0x06,0x0E,0x07,0x03,0x87,0x80,0xFF,0xC0,0x3F,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x07,0xC0,0x07,0xF0, // 'q' + 0x00,0x18,0x7E,0x7F,0x3F,0xFF,0x81,0xF9,0xE0,0xF0,0xF0,0x70,0x70,0x38,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x01,0x80,0x00,0xE0,0x01,0xFE,0x03,0xFD,0x00, // 'r' + 0x1F,0x80,0xFF,0xC7,0x3F,0x1C,0x0C,0x60,0x31,0xC0,0x47,0xFC,0x0D,0xFC,0x00,0x3B,0x00,0x66,0x01,0x98,0x06,0x70,0x79,0xFF,0xC7,0xFE,0x10,0x00, // 's' + 0x04,0x00,0x0C,0x00,0x0E,0x00,0x0E,0x00,0x0C,0x00,0x0E,0x00,0x7F,0xF0,0xFF,0xF8,0x7F,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x0E,0x0E,0x1E,0x0F,0x1C,0x0F,0x1C,0x07,0xFC,0x07,0xF8,0x01,0xE0, // 't' + 0x30,0x02,0x0F,0xC3,0xE0,0x7C,0x3F,0x00,0xC0,0x70,0x0C,0x07,0x00,0xC0,0x70,0x0C,0x07,0x00,0xC0,0x60,0x0C,0x07,0x00,0xC0,0x60,0x0C,0x07,0x00,0xC0,0xE0,0x0C,0x3F,0xC0,0xFF,0xFE,0x07,0xF7,0xE0,0x38,0x1C, // 'u' + 0xFF,0x3F,0xDF,0xE7,0xF8,0x70,0x38,0x06,0x06,0x00,0xC0,0xC0,0x1C,0x30,0x01,0x86,0x00,0x30,0xC0,0x07,0x38,0x00,0x66,0x00,0x0D,0xC0,0x01,0xF8,0x00,0x1E,0x00,0x03,0xC0,0x00,0x30,0x00, // 'v' + 0x00,0x00,0xE7,0xF7,0xFF,0xBF,0xBE,0xFC,0xB1,0xE3,0x81,0x8F,0x18,0x06,0x78,0xC0,0x32,0x46,0x01,0x9B,0x30,0x0C,0xDB,0x80,0x6E,0xF8,0x03,0xE3,0xC0,0x0F,0x1E,0x00,0x78,0xF0,0x03,0xC7,0x80,0x0C,0x18,0x00, // 'w' + 0xFF,0x9F,0xE7,0xF9,0xFE,0x07,0x0E,0x00,0x71,0xC0,0x03,0xB8,0x00,0x1F,0x00,0x00,0xF0,0x00,0x0F,0x00,0x00,0xF0,0x00,0x1F,0x80,0x03,0x9C,0x00,0x70,0xE0,0x3F,0x9F,0xC7,0xF9,0xFE,0x3F,0x0F,0xE0, // 'x' + 0x00,0x01,0x1F,0xE7,0xFB,0xFC,0xFE,0x07,0x07,0x00,0xC0,0xC0,0x0C,0x18,0x01,0x87,0x00,0x18,0xC0,0x03,0x38,0x00,0x66,0x00,0x07,0xC0,0x00,0xF0,0x00,0x1E,0x00,0x01,0x80,0x00,0x30,0x01,0x06,0x00,0x79,0xC0,0x1F,0xB0,0x01,0xFE,0x00,0x3F,0x80,0x03,0xE0,0x00,0x38,0x00,0x00, // 'y' + 0x7F,0xF8,0xFF,0xE1,0x81,0xC3,0x03,0x06,0x0C,0x0C,0x30,0x00,0xC0,0x03,0x00,0x0C,0x18,0x30,0x30,0xE0,0x63,0xC0,0xE7,0xFF,0xDF,0xFF,0x88,0x3E,0x00, // 'z' + 0x08,0x38,0x71,0xC3,0x0E,0x18,0x18,0x10,0x70,0xE7,0x8E,0x0F,0x0E,0x1C,0x30,0x61,0xC3,0x83,0x87,0x07,0x04, // '{' + 0xDB,0x6D,0xB6,0xDB,0x6D,0xB6,0xDB,0x6D,0xB0, // '|' + 0x41,0xC1,0xC1,0x83,0x83,0x0E,0x18,0x70,0xE0,0xE0,0xE1,0xC7,0x9C,0x38,0x30,0x60,0x61,0xC3,0x8E,0x1C,0x30 // '}' +}; +const GFXglyph Special_Elite_Regular_30Glyphs[] = { +// bitmapOffset, width, height, xAdvance, xOffset, yOffset + { 0, 1, 1, 10, 0, 0 }, // ' ' + { 1, 5, 21, 9, 2, -21 }, // '!' + { 15, 9, 8, 12, 1, -21 }, // '"' + { 24, 16, 21, 18, 1, -21 }, // '#' + { 66, 15, 34, 17, 1, -28 }, // '$' + { 130, 19, 32, 21, 1, -26 }, // '%' + { 206, 19, 21, 21, 1, -21 }, // '&' + { 256, 4, 8, 7, 1, -21 }, // ''' + { 260, 6, 25, 9, 2, -23 }, // '(' + { 279, 7, 25, 9, 1, -23 }, // ')' + { 301, 15, 13, 17, 1, -21 }, // '*' + { 326, 14, 13, 16, 1, -17 }, // '+' + { 349, 9, 14, 11, 1, -8 }, // ',' + { 365, 16, 4, 20, 2, -12 }, // '-' + { 373, 8, 7, 11, 2, -7 }, // '.' + { 380, 16, 24, 18, 1, -23 }, // '/' + { 428, 16, 22, 19, 2, -22 }, // '0' + { 472, 17, 21, 18, 1, -21 }, // '1' + { 517, 15, 21, 18, 2, -20 }, // '2' + { 557, 15, 22, 18, 1, -21 }, // '3' + { 599, 18, 21, 19, 0, -21 }, // '4' + { 647, 15, 21, 17, 1, -21 }, // '5' + { 687, 16, 21, 19, 1, -21 }, // '6' + { 729, 17, 23, 18, 0, -22 }, // '7' + { 778, 16, 22, 19, 2, -22 }, // '8' + { 822, 16, 21, 19, 1, -21 }, // '9' + { 864, 8, 16, 11, 2, -16 }, // ':' + { 880, 9, 22, 11, 1, -16 }, // ';' + { 905, 12, 13, 15, 1, -17 }, // '<' + { 925, 16, 9, 20, 2, -15 }, // '=' + { 943, 12, 13, 15, 2, -17 }, // '>' + { 963, 13, 22, 15, 1, -22 }, // '?' + { 999, 19, 20, 21, 1, -20 }, // '@' + { 1047, 18, 21, 18, 0, -21 }, // 'A' + { 1095, 17, 21, 19, 1, -21 }, // 'B' + { 1140, 16, 21, 18, 1, -21 }, // 'C' + { 1182, 17, 21, 20, 1, -21 }, // 'D' + { 1227, 18, 21, 20, 1, -21 }, // 'E' + { 1275, 18, 21, 19, 1, -21 }, // 'F' + { 1323, 18, 21, 19, 1, -21 }, // 'G' + { 1371, 19, 22, 21, 1, -21 }, // 'H' + { 1424, 14, 22, 16, 1, -21 }, // 'I' + { 1463, 16, 21, 17, 1, -21 }, // 'J' + { 1505, 18, 21, 18, 1, -21 }, // 'K' + { 1553, 17, 22, 19, 1, -22 }, // 'L' + { 1600, 20, 21, 22, 1, -21 }, // 'M' + { 1653, 18, 21, 20, 1, -21 }, // 'N' + { 1701, 17, 22, 20, 1, -21 }, // 'O' + { 1748, 16, 21, 18, 1, -21 }, // 'P' + { 1790, 17, 24, 19, 1, -21 }, // 'Q' + { 1841, 20, 21, 20, 0, -21 }, // 'R' + { 1894, 15, 21, 19, 2, -21 }, // 'S' + { 1934, 17, 21, 19, 1, -21 }, // 'T' + { 1979, 18, 21, 20, 1, -21 }, // 'U' + { 2027, 19, 22, 19, 0, -22 }, // 'V' + { 2080, 19, 21, 20, 0, -21 }, // 'W' + { 2130, 18, 21, 18, 0, -21 }, // 'X' + { 2178, 19, 22, 18, -1, -22 }, // 'Y' + { 2231, 16, 21, 19, 2, -21 }, // 'Z' + { 2273, 7, 25, 10, 3, -23 }, // '[' + { 2295, 16, 24, 18, 1, -23 }, // '\' + { 2343, 8, 25, 10, 0, -23 }, // ']' + { 2368, 13, 10, 13, 0, -21 }, // '^' + { 2385, 16, 3, 21, 4, 3 }, // '_' + { 2391, 8, 6, 8, 0, -23 }, // '`' + { 2397, 17, 15, 18, 1, -15 }, // 'a' + { 2429, 18, 21, 18, -1, -21 }, // 'b' + { 2477, 15, 16, 17, 1, -15 }, // 'c' + { 2507, 18, 22, 19, 1, -21 }, // 'd' + { 2557, 15, 16, 17, 1, -15 }, // 'e' + { 2587, 17, 22, 15, 1, -21 }, // 'f' + { 2634, 17, 22, 18, 1, -15 }, // 'g' + { 2681, 19, 21, 20, 0, -20 }, // 'h' + { 2731, 17, 21, 18, 1, -20 }, // 'i' + { 2776, 11, 27, 13, 0, -20 }, // 'j' + { 2814, 19, 21, 20, 0, -20 }, // 'k' + { 2864, 17, 21, 17, 0, -20 }, // 'l' + { 2909, 19, 16, 21, 1, -15 }, // 'm' + { 2947, 18, 16, 20, 1, -15 }, // 'n' + { 2983, 16, 16, 19, 1, -15 }, // 'o' + { 3015, 17, 21, 19, 0, -14 }, // 'p' + { 3060, 17, 21, 18, 1, -15 }, // 'q' + { 3105, 17, 15, 18, 1, -15 }, // 'r' + { 3137, 14, 16, 17, 1, -15 }, // 's' + { 3165, 16, 22, 16, 0, -21 }, // 't' + { 3209, 20, 16, 20, 0, -15 }, // 'u' + { 3249, 19, 15, 19, 0, -14 }, // 'v' + { 3285, 21, 15, 21, 0, -15 }, // 'w' + { 3325, 20, 15, 21, 0, -14 }, // 'x' + { 3363, 19, 22, 19, 0, -15 }, // 'y' + { 3416, 15, 15, 17, 1, -14 }, // 'z' + { 3445, 7, 24, 9, 1, -22 }, // '{' + { 3466, 3, 23, 9, 3, -22 }, // '|' + { 3475, 7, 24, 9, 1, -22 } // '}' +}; +const GFXfont Special_Elite_Regular_30 = { +(uint8_t *)Special_Elite_Regular_30Bitmaps,(GFXglyph *)Special_Elite_Regular_30Glyphs,0x20, 0x7E, 31}; \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font_60.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font_60.h new file mode 100644 index 00000000..5906489d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/font_60.h @@ -0,0 +1,199 @@ +// Created by http://oleddisplay.squix.ch/ Consider a donation +// In case of problems make sure that you are using the font file with the correct version! +const uint8_t DSEG14_Classic_Mini_Regular_40Bitmaps[] = { + + // Bitmap Data: + 0x00, // ' ' + 0x00, // '!' + 0xC0,0x01,0xC0,0x03,0xC0,0x07,0x81,0xEF,0x03,0xDE,0x07,0xBC,0x0F,0x78,0x1E,0xF0,0x3D,0xE0,0x7B,0xC0,0xF7,0x81,0xEF,0x01,0xDE,0x03,0x38,0x02,0x60,0x00, // '"' + 0xFF,0xD0,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x5F,0xF8, // '#' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x03,0xC0,0x03,0xC0,0xF0,0x00,0xF0,0x3C,0x00,0x3C,0x0F,0x00,0x0F,0x03,0xC0,0x03,0xC0,0xF0,0x00,0xF0,0x3C,0x00,0x3C,0x0F,0x00,0x0F,0x03,0xC0,0x03,0xC0,0x70,0x00,0xF0,0x18,0x00,0x38,0x02,0x00,0x0C,0x7C,0x3F,0x00,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x01,0xF0,0xFC,0x60,0x00,0x80,0x38,0x00,0x60,0x1E,0x00,0x1C,0x07,0x80,0x0F,0x01,0xE0,0x03,0xC0,0x78,0x00,0xF0,0x1E,0x00,0x3C,0x07,0x80,0x0F,0x01,0xE0,0x03,0xC0,0x78,0x00,0xF0,0x1E,0x00,0x3C,0x07,0x80,0x0F,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x07,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '$' + 0xC0,0x00,0x00,0x38,0x00,0x00,0x0F,0x00,0x00,0x03,0xC8,0x00,0x80,0xF2,0x00,0x60,0x3C,0xC0,0x18,0x0F,0x30,0x0E,0x03,0xCE,0x03,0x80,0xF3,0x80,0xE0,0x3C,0xE0,0x38,0x0F,0x38,0x0C,0x03,0xC6,0x03,0x00,0xF0,0x80,0x80,0x3C,0x00,0x00,0x0E,0x00,0x00,0x03,0x1F,0x0F,0xC0,0x0F,0xE3,0xF8,0x03,0xF8,0xFE,0x00,0x7C,0x3F,0x18,0x00,0x00,0x0E,0x00,0x00,0x07,0x80,0x20,0x21,0xE0,0x18,0x0C,0x78,0x0E,0x03,0x1E,0x03,0x80,0xE7,0x80,0xE0,0x39,0xE0,0x38,0x0E,0x78,0x0C,0x03,0x9E,0x03,0x00,0x67,0x80,0x80,0x19,0xE0,0x20,0x02,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x00,0xC0, // '%' + 0xFF,0xFF,0xC1,0xFF,0xFF,0xC1,0xFF,0xFF,0x01,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x40,0x08,0x01,0x80,0x18,0x03,0x00,0x30,0x0E,0x00,0x70,0x1C,0x00,0xE0,0x38,0x01,0xC0,0x70,0x03,0x80,0xC0,0x03,0x01,0x80,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x07,0x00,0x00,0x1E,0x04,0x04,0x3C,0x18,0x0C,0x78,0x70,0x18,0xF0,0xE0,0x39,0xE1,0xC0,0x73,0xC3,0x80,0xE7,0x86,0x01,0xCF,0x0C,0x01,0x9E,0x10,0x03,0x3C,0x20,0x02,0x78,0x00,0x00,0xF0,0x00,0x01,0xE3,0xFF,0xF9,0x8F,0xFF,0xF8,0x3F,0xFF,0xF8,0x7F,0xFF,0xE0, // '&' + 0xF7,0xBD,0xEF,0x7B,0xDE,0xF3,0x98,0x40, // ''' + 0x26,0x6E,0xEE,0xEC,0xC8,0x00,0x00,0x00,0x00,0x8C,0xCE,0xEE,0xE6,0x62, // '(' + 0x88,0xCC,0xEE,0xEE,0x62,0x00,0x00,0x00,0x00,0x26,0xEE,0xEE,0xCC,0x88, // ')' + 0x11,0xE1,0x01,0x1E,0x30,0x19,0xE3,0x01,0x9E,0x70,0x1D,0xE7,0x01,0xDE,0x70,0x1D,0xE7,0x01,0xDE,0x60,0x0D,0xE6,0x00,0x4E,0x40,0x00,0xC0,0x00,0x04,0x00,0x3E,0x1F,0x87,0xF1,0xFC,0x7F,0x1F,0xC3,0xE1,0xF8,0x00,0x40,0x00,0x0C,0x00,0x04,0xE4,0x00,0xDE,0x60,0x1D,0xE6,0x01,0xDE,0x70,0x1D,0xE7,0x01,0xDE,0x70,0x19,0xE7,0x01,0x9E,0x30,0x11,0xE3,0x01,0x1E,0x10, // '*' + 0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x0E,0x00,0x00,0xC0,0x00,0x04,0x00,0x3E,0x1F,0x87,0xF1,0xFC,0x7F,0x1F,0xC3,0xE1,0xF8,0x00,0x40,0x00,0x0C,0x00,0x00,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00, // '+' + 0x26,0xEE,0xEE,0xCC,0x88, // ',' + 0x3E,0x1F,0x87,0xF1,0xFC,0x7F,0x1F,0xC3,0xE1,0xF8, // '-' + 0x67,0xBD,0xE6,0x00, // '.' + 0x00,0x08,0x00,0x60,0x01,0x80,0x0E,0x00,0x38,0x00,0xE0,0x03,0x80,0x0C,0x00,0x30,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x18,0x00,0xE0,0x03,0x80,0x0E,0x00,0x38,0x00,0xC0,0x03,0x00,0x08,0x00,0x20,0x00, // '/' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x02,0x7B,0xC0,0x01,0x9E,0xF0,0x00,0x67,0xBC,0x00,0x39,0xEF,0x00,0x0E,0x7B,0xC0,0x03,0x9E,0xF0,0x00,0xE7,0xBC,0x00,0x31,0xEF,0x00,0x0C,0x7B,0xC0,0x02,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x80,0x07,0xBC,0x60,0x01,0xEF,0x38,0x00,0x7B,0xCE,0x00,0x1E,0xF3,0x80,0x07,0xBC,0xE0,0x01,0xEF,0x30,0x00,0x7B,0xCC,0x00,0x1E,0xF2,0x00,0x07,0xBC,0x80,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '0' + 0x67,0xBD,0xEF,0x7B,0xDE,0xF7,0xBD,0xEF,0x79,0xC6,0x00,0x0C,0xEF,0x7B,0xDE,0xF7,0xBD,0xEF,0x7B,0xDE,0xF3,0x00, // '1' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x80,0x1F,0xFF,0xCC,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x00,0xE0,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x0E,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0x80,0x00,0x00,0xC7,0xFF,0xF0,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '2' + 0xFF,0xFF,0xC1,0xFF,0xFF,0xC1,0xFF,0xFF,0x01,0xFF,0xFC,0xC0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x38,0xF8,0x7E,0x33,0xF8,0xFE,0x07,0xF1,0xFC,0x07,0xC3,0xF1,0x80,0x00,0x07,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE3,0xFF,0xF9,0x8F,0xFF,0xF8,0x3F,0xFF,0xF8,0x7F,0xFF,0xE0, // '3' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x1F,0x0F,0xC6,0x0F,0xE3,0xF8,0x03,0xF8,0xFE,0x00,0x7C,0x3F,0x18,0x00,0x00,0x0E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x00,0xC0, // '4' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x38,0x00,0x00,0x0C,0x7C,0x3F,0x00,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x01,0xF0,0xFC,0x60,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x07,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '5' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x38,0x00,0x00,0x0C,0x7C,0x3F,0x00,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '6' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x03,0x00, // '7' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '8' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x01,0xF0,0xFC,0x60,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x07,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // '9' + 0xF7,0xBD,0xE6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0xBD,0xEF,0x00, // ':' + 0xFF,0xD0,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x5F,0xF8, // ';' + 0x00,0x01,0x00,0x00,0x30,0x00,0x03,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x60,0x00,0x06,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x18,0x00,0x01,0x80,0x00,0x10,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // '<' + 0x3E,0x1F,0x87,0xF1,0xFC,0x7F,0x1F,0xC3,0xE1,0xF8,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,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // '=' + 0x10,0x00,0x01,0x00,0x00,0x18,0x00,0x01,0x80,0x00,0x1C,0x00,0x01,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x0C,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x60,0x00,0x06,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x30,0x00,0x03,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // '>' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x3F,0x18,0x00,0x0F,0xE0,0x00,0x03,0xF8,0x00,0x00,0xFC,0x00,0x00,0x80,0x00,0x00,0x60,0x00,0x00,0x1C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00, // '?' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0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0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0x70,0x1E,0x00,0xC0,0x3C,0x00,0x80,0x38,0x00,0x7E,0x30,0x00,0xFE,0x00,0x01,0xFC,0x00,0x03,0xF1,0x80,0x10,0x07,0x00,0x60,0x1E,0x00,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x00,0x00,0xF0,0x00,0x01,0xE3,0xFF,0xF9,0x8F,0xFF,0xF8,0x3F,0xFF,0xF8,0x7F,0xFF,0xE0, // 'B' + 0x1F,0xFF,0xF8,0x3F,0xFF,0xF8,0x3F,0xFF,0xE6,0x3F,0xFF,0x8E,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xC0,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x0C,0x7F,0xFF,0x01,0xFF,0xFF,0x07,0xFF,0xFF,0x0F,0xFF,0xFC, // 'C' + 0xFF,0xFF,0xC1,0xFF,0xFF,0xC1,0xFF,0xFF,0x01,0xFF,0xFC,0xC0,0x00,0x03,0xC0,0x00,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0x70,0x1E,0x00,0xC0,0x3C,0x00,0x80,0x38,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x10,0x07,0x00,0x60,0x1E,0x00,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x00,0x00,0xF0,0x00,0x01,0xE3,0xFF,0xF9,0x8F,0xFF,0xF8,0x3F,0xFF,0xF8,0x7F,0xFF,0xE0, // 'D' + 0x1F,0xFF,0xF8,0x3F,0xFF,0xF8,0x3F,0xFF,0xE6,0x3F,0xFF,0x8E,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xC0,0x00,0x03,0x1F,0x0F,0xC0,0x7F,0x1F,0xC0,0xFE,0x3F,0x98,0xF8,0x7E,0x38,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x0C,0x7F,0xFF,0x01,0xFF,0xFF,0x07,0xFF,0xFF,0x0F,0xFF,0xFC, // 'E' + 0x1F,0xFF,0xF8,0x3F,0xFF,0xF8,0x3F,0xFF,0xE6,0x3F,0xFF,0x8E,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xC0,0x00,0x03,0x1F,0x0F,0xC0,0x7F,0x1F,0xC0,0xFE,0x3F,0x98,0xF8,0x7E,0x38,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x0C,0x00,0x00,0x00, // 'F' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x38,0x00,0x00,0x0C,0x00,0x3F,0x00,0x00,0x0F,0xE0,0x00,0x03,0xF8,0x30,0x00,0xFC,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'G' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x1F,0x0F,0xC6,0x0F,0xE3,0xF8,0x03,0xF8,0xFE,0x0C,0x7C,0x3F,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'H' + 0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xC3,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x0E,0x00,0x00,0xC0,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x0C,0x00,0x00,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // 'I' + 0x00,0x00,0x03,0x00,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x38,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB1,0xFF,0xFC,0xC0,0xFF,0xFF,0x80,0x7F,0xFF,0xF0,0x1F,0xFF,0xF8,0x00, // 'J' + 0xC0,0x00,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x00,0x02,0xF0,0x00,0x6F,0x00,0x06,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xCF,0x00,0x0C,0xF0,0x00,0x8F,0x00,0x00,0xE0,0x00,0x0C,0x7C,0x00,0x0F,0xE0,0x00,0xFE,0x00,0xC7,0xC0,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x00,0x08,0xF0,0x00,0xCF,0x00,0x0C,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0x6F,0x00,0x06,0xF0,0x00,0x2F,0x00,0x00,0xE0,0x00,0x0C,0x00,0x00, // 'K' + 0xC0,0x00,0x01,0xC0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x38,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x07,0x00,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xE0,0x00,0x01,0x8F,0xFF,0xE0,0x3F,0xFF,0xE0,0xFF,0xFF,0xE1,0xFF,0xFF,0x80, // 'L' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC8,0x00,0x9E,0xF2,0x00,0x67,0xBC,0xC0,0x19,0xEF,0x30,0x0E,0x7B,0xCE,0x03,0x9E,0xF3,0x80,0xE7,0xBC,0xE0,0x39,0xEF,0x38,0x0C,0x7B,0xC6,0x03,0x1E,0xF0,0x80,0x87,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x20,0x0E,0xF0,0x18,0x07,0xBC,0x07,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'M' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC8,0x00,0x1E,0xF2,0x00,0x07,0xBC,0xC0,0x01,0xEF,0x30,0x00,0x7B,0xCE,0x00,0x1E,0xF3,0x80,0x07,0xBC,0xE0,0x01,0xEF,0x38,0x00,0x7B,0xC6,0x00,0x1E,0xF0,0x80,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x21,0xEF,0x00,0x0C,0x7B,0xC0,0x03,0x1E,0xF0,0x00,0xE7,0xBC,0x00,0x39,0xEF,0x00,0x0E,0x7B,0xC0,0x03,0x9E,0xF0,0x00,0x67,0xBC,0x00,0x19,0xEF,0x00,0x02,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'N' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'O' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x0E,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0x80,0x00,0x00,0xC0,0x00,0x00,0x00, // 'P' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x87,0xBC,0x00,0x31,0xEF,0x00,0x0C,0x7B,0xC0,0x03,0x9E,0xF0,0x00,0xE7,0xBC,0x00,0x39,0xEF,0x00,0x0E,0x7B,0xC0,0x01,0x9E,0xF0,0x00,0x67,0xBC,0x00,0x09,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'Q' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x0E,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x80,0x3C,0x00,0x30,0x0F,0x00,0x0C,0x03,0xC0,0x03,0x80,0xF0,0x00,0xE0,0x3C,0x00,0x38,0x0F,0x00,0x0E,0x03,0xC0,0x01,0x80,0xF0,0x00,0x60,0x3C,0x00,0x08,0x0F,0x00,0x00,0x03,0x80,0x00,0x00,0xC0,0x00,0x00,0x00, // 'R' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x20,0x00,0x03,0xC8,0x00,0x00,0xF3,0x00,0x00,0x3C,0xC0,0x00,0x0F,0x38,0x00,0x03,0xCE,0x00,0x00,0xF3,0x80,0x00,0x3C,0xE0,0x00,0x0F,0x18,0x00,0x03,0xC2,0x00,0x00,0xF0,0x00,0x00,0x38,0x00,0x00,0x0C,0x7C,0x3F,0x00,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x01,0xF0,0xFC,0x60,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x87,0x80,0x00,0x31,0xE0,0x00,0x0C,0x78,0x00,0x03,0x9E,0x00,0x00,0xE7,0x80,0x00,0x39,0xE0,0x00,0x0E,0x78,0x00,0x01,0x9E,0x00,0x00,0x67,0x80,0x00,0x09,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x07,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'S' + 0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xC3,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x0E,0x00,0x00,0xC0,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x0C,0x00,0x00,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00, // 'T' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB1,0xFF,0xFC,0xC0,0xFF,0xFF,0x80,0x7F,0xFF,0xF0,0x1F,0xFF,0xF8,0x00, // 'U' + 0xC0,0x00,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x00,0x02,0xF0,0x00,0x6F,0x00,0x06,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xCF,0x00,0x0C,0xF0,0x00,0x8F,0x00,0x00,0xE0,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x08,0x00,0xF1,0x80,0x0F,0x38,0x00,0xF3,0x80,0x0F,0x38,0x00,0xF3,0x80,0x0F,0x30,0x00,0xF3,0x00,0x0F,0x20,0x00,0xF2,0x00,0x0F,0x00,0x00,0xE0,0x00,0x0C,0x00,0x00, // 'V' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x1C,0x07,0xBC,0x06,0x01,0xEE,0x00,0x80,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x20,0x21,0xEF,0x18,0x0C,0x7B,0xCE,0x03,0x1E,0xF3,0x80,0xE7,0xBC,0xE0,0x39,0xEF,0x38,0x0E,0x7B,0xCC,0x03,0x9E,0xF3,0x00,0x67,0xBC,0x80,0x19,0xEF,0x20,0x02,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'W' + 0x80,0x0A,0x00,0x6C,0x01,0xB0,0x0E,0xE0,0x3B,0x80,0xEE,0x03,0xB8,0x0C,0x60,0x30,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x18,0x0C,0xE0,0x33,0x80,0xEE,0x03,0xB8,0x0E,0xC0,0x3B,0x00,0x68,0x01,0xA0,0x02, // 'X' + 0x80,0x0A,0x00,0x6C,0x01,0xB0,0x0E,0xE0,0x3B,0x80,0xEE,0x03,0xB8,0x0C,0x60,0x30,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x18,0x00,0x70,0x03,0xC0,0x0F,0x00,0x3C,0x00,0xF0,0x03,0xC0,0x0F,0x00,0x3C,0x00,0xF0,0x03,0xC0, // 'Y' + 0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xC3,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x30,0x00,0x03,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x60,0x00,0x06,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x18,0x00,0x01,0x80,0x00,0x10,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // 'Z' + 0xFF,0xD0,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x5F,0xF8, // '[' + 0x80,0x02,0x00,0x0C,0x00,0x30,0x00,0xE0,0x03,0x80,0x0E,0x00,0x38,0x00,0x60,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0C,0x00,0x30,0x00,0xE0,0x03,0x80,0x0E,0x00,0x38,0x00,0x60,0x01,0x80,0x02, // '\' + 0xFF,0xD0,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x5F,0xF8, // ']' + 0xC0,0x38,0x0F,0x03,0xC8,0xF2,0x3C,0xCF,0x33,0xCE,0xF3,0xBC,0xEF,0x3B,0xC6,0xF0,0xBC,0x0E,0x03,0x00, // '^' + 0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // '_' + 0x88,0xCC,0xEE,0xEE,0x62, // '`' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC0,0x00,0x03,0x00, // 'a' + 0xFF,0xFF,0xC1,0xFF,0xFF,0xC1,0xFF,0xFF,0x01,0xFF,0xFC,0xC0,0x00,0x03,0xC0,0x00,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0x70,0x1E,0x00,0xC0,0x3C,0x00,0x80,0x38,0x00,0x7E,0x30,0x00,0xFE,0x00,0x01,0xFC,0x00,0x03,0xF1,0x80,0x10,0x07,0x00,0x60,0x1E,0x00,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x00,0x00,0xF0,0x00,0x01,0xE3,0xFF,0xF9,0x8F,0xFF,0xF8,0x3F,0xFF,0xF8,0x7F,0xFF,0xE0, // 'b' + 0x1F,0xFF,0xF8,0x3F,0xFF,0xF8,0x3F,0xFF,0xE6,0x3F,0xFF,0x8E,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xC0,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x0C,0x7F,0xFF,0x01,0xFF,0xFF,0x07,0xFF,0xFF,0x0F,0xFF,0xFC, // 'c' + 0xFF,0xFF,0xC1,0xFF,0xFF,0xC1,0xFF,0xFF,0x01,0xFF,0xFC,0xC0,0x00,0x03,0xC0,0x00,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0x70,0x1E,0x00,0xC0,0x3C,0x00,0x80,0x38,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x10,0x07,0x00,0x60,0x1E,0x00,0xE0,0x3C,0x03,0xC0,0x78,0x07,0x80,0xF0,0x0F,0x01,0xE0,0x1E,0x03,0xC0,0x3C,0x07,0x80,0x78,0x0F,0x00,0xF0,0x1E,0x01,0xE0,0x3C,0x03,0xC0,0x78,0x00,0x00,0xF0,0x00,0x01,0xE3,0xFF,0xF9,0x8F,0xFF,0xF8,0x3F,0xFF,0xF8,0x7F,0xFF,0xE0, // 'd' + 0x1F,0xFF,0xF8,0x3F,0xFF,0xF8,0x3F,0xFF,0xE6,0x3F,0xFF,0x8E,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xC0,0x00,0x03,0x1F,0x0F,0xC0,0x7F,0x1F,0xC0,0xFE,0x3F,0x98,0xF8,0x7E,0x38,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x0C,0x7F,0xFF,0x01,0xFF,0xFF,0x07,0xFF,0xFF,0x0F,0xFF,0xFC, // 'e' + 0x1F,0xFF,0xF8,0x3F,0xFF,0xF8,0x3F,0xFF,0xE6,0x3F,0xFF,0x8E,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xC0,0x00,0x03,0x1F,0x0F,0xC0,0x7F,0x1F,0xC0,0xFE,0x3F,0x98,0xF8,0x7E,0x38,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x0C,0x00,0x00,0x00, // 'f' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x38,0x00,0x00,0x0C,0x00,0x3F,0x00,0x00,0x0F,0xE0,0x00,0x03,0xF8,0x30,0x00,0xFC,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'g' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x1F,0x0F,0xC6,0x0F,0xE3,0xF8,0x03,0xF8,0xFE,0x0C,0x7C,0x3F,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'h' + 0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xC3,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x0E,0x00,0x00,0xC0,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x0C,0x00,0x00,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // 'i' + 0x00,0x00,0x03,0x00,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,0x00,0x07,0x80,0x00,0x01,0xE0,0x00,0x00,0x38,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB1,0xFF,0xFC,0xC0,0xFF,0xFF,0x80,0x7F,0xFF,0xF0,0x1F,0xFF,0xF8,0x00, // 'j' + 0xC0,0x00,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x00,0x02,0xF0,0x00,0x6F,0x00,0x06,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xCF,0x00,0x0C,0xF0,0x00,0x8F,0x00,0x00,0xE0,0x00,0x0C,0x7C,0x00,0x0F,0xE0,0x00,0xFE,0x00,0xC7,0xC0,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x00,0x08,0xF0,0x00,0xCF,0x00,0x0C,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0x6F,0x00,0x06,0xF0,0x00,0x2F,0x00,0x00,0xE0,0x00,0x0C,0x00,0x00, // 'k' + 0xC0,0x00,0x01,0xC0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x38,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x07,0x00,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x0F,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xE0,0x00,0x01,0x8F,0xFF,0xE0,0x3F,0xFF,0xE0,0xFF,0xFF,0xE1,0xFF,0xFF,0x80, // 'l' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC8,0x00,0x9E,0xF2,0x00,0x67,0xBC,0xC0,0x19,0xEF,0x30,0x0E,0x7B,0xCE,0x03,0x9E,0xF3,0x80,0xE7,0xBC,0xE0,0x39,0xEF,0x38,0x0C,0x7B,0xC6,0x03,0x1E,0xF0,0x80,0x87,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x20,0x0E,0xF0,0x18,0x07,0xBC,0x07,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'm' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC8,0x00,0x1E,0xF2,0x00,0x07,0xBC,0xC0,0x01,0xEF,0x30,0x00,0x7B,0xCE,0x00,0x1E,0xF3,0x80,0x07,0xBC,0xE0,0x01,0xEF,0x38,0x00,0x7B,0xC6,0x00,0x1E,0xF0,0x80,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x21,0xEF,0x00,0x0C,0x7B,0xC0,0x03,0x1E,0xF0,0x00,0xE7,0xBC,0x00,0x39,0xEF,0x00,0x0E,0x7B,0xC0,0x03,0x9E,0xF0,0x00,0x67,0xBC,0x00,0x19,0xEF,0x00,0x02,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'n' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'o' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x0E,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x00,0x00,0x03,0x80,0x00,0x00,0xC0,0x00,0x00,0x00, // 'p' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x6E,0x00,0x00,0x3B,0xC0,0x00,0x1E,0xF0,0x00,0x87,0xBC,0x00,0x31,0xEF,0x00,0x0C,0x7B,0xC0,0x03,0x9E,0xF0,0x00,0xE7,0xBC,0x00,0x39,0xEF,0x00,0x0E,0x7B,0xC0,0x01,0x9E,0xF0,0x00,0x67,0xBC,0x00,0x09,0xEF,0x00,0x00,0x7B,0x80,0x00,0x1E,0xC7,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 'q' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xCC,0xE0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xB8,0x00,0x00,0xEC,0x7C,0x3F,0x18,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x31,0xF0,0xFC,0x0E,0x00,0x00,0x03,0xC0,0x00,0x00,0xF0,0x00,0x80,0x3C,0x00,0x30,0x0F,0x00,0x0C,0x03,0xC0,0x03,0x80,0xF0,0x00,0xE0,0x3C,0x00,0x38,0x0F,0x00,0x0E,0x03,0xC0,0x01,0x80,0xF0,0x00,0x60,0x3C,0x00,0x08,0x0F,0x00,0x00,0x03,0x80,0x00,0x00,0xC0,0x00,0x00,0x00, // 'r' + 0x1F,0xFF,0xF8,0x07,0xFF,0xFF,0x00,0xFF,0xFF,0x83,0x1F,0xFF,0xC0,0xE0,0x00,0x00,0x3C,0x00,0x00,0x0F,0x20,0x00,0x03,0xC8,0x00,0x00,0xF3,0x00,0x00,0x3C,0xC0,0x00,0x0F,0x38,0x00,0x03,0xCE,0x00,0x00,0xF3,0x80,0x00,0x3C,0xE0,0x00,0x0F,0x18,0x00,0x03,0xC2,0x00,0x00,0xF0,0x00,0x00,0x38,0x00,0x00,0x0C,0x7C,0x3F,0x00,0x3F,0x8F,0xE0,0x0F,0xE3,0xF8,0x01,0xF0,0xFC,0x60,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x87,0x80,0x00,0x31,0xE0,0x00,0x0C,0x78,0x00,0x03,0x9E,0x00,0x00,0xE7,0x80,0x00,0x39,0xE0,0x00,0x0E,0x78,0x00,0x01,0x9E,0x00,0x00,0x67,0x80,0x00,0x09,0xE0,0x00,0x00,0x78,0x00,0x00,0x1E,0x07,0xFF,0xF3,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0xE0, // 's' + 0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xC3,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x0E,0x00,0x00,0xC0,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x0C,0x00,0x00,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00,0x01,0xE0,0x00,0x1E,0x00, // 't' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEE,0x00,0x00,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xF0,0x00,0x07,0xBC,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB1,0xFF,0xFC,0xC0,0xFF,0xFF,0x80,0x7F,0xFF,0xF0,0x1F,0xFF,0xF8,0x00, // 'u' + 0xC0,0x00,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x00,0x02,0xF0,0x00,0x6F,0x00,0x06,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xEF,0x00,0x0E,0xF0,0x00,0xCF,0x00,0x0C,0xF0,0x00,0x8F,0x00,0x00,0xE0,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x0E,0x00,0x00,0xF0,0x00,0x0F,0x08,0x00,0xF1,0x80,0x0F,0x38,0x00,0xF3,0x80,0x0F,0x38,0x00,0xF3,0x80,0x0F,0x30,0x00,0xF3,0x00,0x0F,0x20,0x00,0xF2,0x00,0x0F,0x00,0x00,0xE0,0x00,0x0C,0x00,0x00, // 'v' + 0xC0,0x00,0x03,0x38,0x00,0x01,0xEF,0x00,0x00,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x3C,0x07,0xBC,0x0F,0x01,0xEF,0x03,0xC0,0x7B,0xC0,0xF0,0x1E,0xF0,0x1C,0x07,0xBC,0x06,0x01,0xEE,0x00,0x80,0x3B,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x1B,0x80,0x00,0x0E,0xF0,0x00,0x07,0xBC,0x20,0x21,0xEF,0x18,0x0C,0x7B,0xCE,0x03,0x1E,0xF3,0x80,0xE7,0xBC,0xE0,0x39,0xEF,0x38,0x0E,0x7B,0xCC,0x03,0x9E,0xF3,0x00,0x67,0xBC,0x80,0x19,0xEF,0x20,0x02,0x7B,0xC0,0x00,0x1E,0xE0,0x00,0x07,0xB0,0x00,0x00,0xC0, // 'w' + 0x80,0x0A,0x00,0x6C,0x01,0xB0,0x0E,0xE0,0x3B,0x80,0xEE,0x03,0xB8,0x0C,0x60,0x30,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x18,0x0C,0xE0,0x33,0x80,0xEE,0x03,0xB8,0x0E,0xC0,0x3B,0x00,0x68,0x01,0xA0,0x02, // 'x' + 0x80,0x0A,0x00,0x6C,0x01,0xB0,0x0E,0xE0,0x3B,0x80,0xEE,0x03,0xB8,0x0C,0x60,0x30,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x18,0x00,0x70,0x03,0xC0,0x0F,0x00,0x3C,0x00,0xF0,0x03,0xC0,0x0F,0x00,0x3C,0x00,0xF0,0x03,0xC0, // 'y' + 0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xC3,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x30,0x00,0x03,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x70,0x00,0x07,0x00,0x00,0x60,0x00,0x06,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x1C,0x00,0x01,0xC0,0x00,0x18,0x00,0x01,0x80,0x00,0x10,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xFC,0xFF,0xFF,0xEF,0xFF,0xFC, // 'z' + 0xFF,0xD0,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x5F,0xF8, // '{' + 0xF7,0xBD,0xEF,0x7B,0xDE,0xF3,0x98,0x40,0x00,0x00,0x23,0x1D,0xEF,0x7B,0xDE,0xF7,0xBD,0xE0, // '|' + 0xFF,0xD0,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x50,0x0A,0x01,0x40,0x28,0x05,0x00,0xA0,0x14,0x02,0x80,0x5F,0xF8 // '}' +}; +const GFXglyph DSEG14_Classic_Mini_Regular_40Glyphs[] = { +// bitmapOffset, width, height, xAdvance, xOffset, yOffset + { 0, 1, 1, 9, 0, 0 }, // ' ' + { 1, 1, 1, 34, 0, 0 }, // '!' + { 2, 15, 16, 34, 4, -37 }, // '"' + { 32, 11, 26, 16, 1, -26 }, // '#' + { 68, 26, 40, 34, 4, -40 }, // '$' + { 198, 26, 34, 34, 4, -37 }, // '%' + { 309, 23, 40, 34, 7, -40 }, // '&' + { 424, 5, 12, 34, 14, -34 }, // ''' + { 432, 4, 28, 34, 20, -34 }, // '(' + { 446, 4, 28, 34, 10, -34 }, // ')' + { 460, 20, 28, 34, 7, -34 }, // '*' + { 530, 20, 28, 34, 7, -34 }, // '+' + { 600, 4, 10, 34, 10, -16 }, // ',' + { 605, 20, 4, 34, 7, -22 }, // '-' + { 615, 5, 5, 1, -2, -5 }, // '.' + { 619, 14, 28, 34, 10, -34 }, // '/' + { 668, 26, 40, 34, 4, -40 }, // '0' + { 798, 5, 34, 34, 25, -37 }, // '1' + { 820, 26, 40, 34, 4, -40 }, // '2' + { 950, 23, 40, 34, 7, -40 }, // '3' + { 1065, 26, 34, 34, 4, -37 }, // '4' + { 1176, 26, 40, 34, 4, -40 }, // '5' + { 1306, 26, 40, 34, 4, -40 }, // '6' + { 1436, 26, 37, 34, 4, -40 }, // '7' + { 1557, 26, 40, 34, 4, -40 }, // '8' + { 1687, 26, 40, 34, 4, -40 }, // '9' + { 1817, 5, 21, 9, 2, -30 }, // ':' + { 1831, 11, 26, 16, 1, -26 }, // ';' + { 1867, 20, 34, 34, 7, -34 }, // '<' + { 1952, 20, 22, 34, 7, -22 }, // '=' + { 2007, 20, 34, 34, 7, -34 }, // '>' + { 2092, 26, 34, 34, 4, -40 }, // '?' + { 2203, 26, 40, 34, 4, -40 }, // '@' + { 2333, 26, 37, 34, 4, -40 }, // 'A' + { 2454, 23, 40, 34, 7, -40 }, // 'B' + { 2569, 23, 40, 34, 4, -40 }, // 'C' + { 2684, 23, 40, 34, 7, -40 }, // 'D' + { 2799, 23, 40, 34, 4, -40 }, // 'E' + { 2914, 23, 37, 34, 4, -40 }, // 'F' + { 3021, 26, 40, 34, 4, -40 }, // 'G' + { 3151, 26, 34, 34, 4, -37 }, // 'H' + { 3262, 20, 40, 34, 7, -40 }, // 'I' + { 3362, 26, 37, 34, 4, -37 }, // 'J' + { 3483, 20, 34, 34, 4, -37 }, // 'K' + { 3568, 23, 37, 34, 4, -37 }, // 'L' + { 3675, 26, 34, 34, 4, -37 }, // 'M' + { 3786, 26, 34, 34, 4, -37 }, // 'N' + { 3897, 26, 40, 34, 4, -40 }, // 'O' + { 4027, 26, 37, 34, 4, -40 }, // 'P' + { 4148, 26, 40, 34, 4, -40 }, // 'Q' + { 4278, 26, 37, 34, 4, -40 }, // 'R' + { 4399, 26, 40, 34, 4, -40 }, // 'S' + { 4529, 20, 34, 34, 7, -40 }, // 'T' + { 4614, 26, 37, 34, 4, -37 }, // 'U' + { 4735, 20, 34, 34, 4, -37 }, // 'V' + { 4820, 26, 34, 34, 4, -37 }, // 'W' + { 4931, 14, 28, 34, 10, -34 }, // 'X' + { 4980, 14, 28, 34, 10, -34 }, // 'Y' + { 5029, 20, 40, 34, 7, -40 }, // 'Z' + { 5129, 11, 26, 16, 1, -26 }, // '[' + { 5165, 14, 28, 34, 10, -34 }, // '\' + { 5214, 11, 26, 16, 1, -26 }, // ']' + { 5250, 10, 16, 34, 4, -37 }, // '^' + { 5270, 20, 4, 34, 7, -4 }, // '_' + { 5280, 4, 10, 34, 10, -34 }, // '`' + { 5285, 26, 37, 34, 4, -40 }, // 'a' + { 5406, 23, 40, 34, 7, -40 }, // 'b' + { 5521, 23, 40, 34, 4, -40 }, // 'c' + { 5636, 23, 40, 34, 7, -40 }, // 'd' + { 5751, 23, 40, 34, 4, -40 }, // 'e' + { 5866, 23, 37, 34, 4, -40 }, // 'f' + { 5973, 26, 40, 34, 4, -40 }, // 'g' + { 6103, 26, 34, 34, 4, -37 }, // 'h' + { 6214, 20, 40, 34, 7, -40 }, // 'i' + { 6314, 26, 37, 34, 4, -37 }, // 'j' + { 6435, 20, 34, 34, 4, -37 }, // 'k' + { 6520, 23, 37, 34, 4, -37 }, // 'l' + { 6627, 26, 34, 34, 4, -37 }, // 'm' + { 6738, 26, 34, 34, 4, -37 }, // 'n' + { 6849, 26, 40, 34, 4, -40 }, // 'o' + { 6979, 26, 37, 34, 4, -40 }, // 'p' + { 7100, 26, 40, 34, 4, -40 }, // 'q' + { 7230, 26, 37, 34, 4, -40 }, // 'r' + { 7351, 26, 40, 34, 4, -40 }, // 's' + { 7481, 20, 34, 34, 7, -40 }, // 't' + { 7566, 26, 37, 34, 4, -37 }, // 'u' + { 7687, 20, 34, 34, 4, -37 }, // 'v' + { 7772, 26, 34, 34, 4, -37 }, // 'w' + { 7883, 14, 28, 34, 10, -34 }, // 'x' + { 7932, 14, 28, 34, 10, -34 }, // 'y' + { 7981, 20, 40, 34, 7, -40 }, // 'z' + { 8081, 11, 26, 16, 1, -26 }, // '{' + { 8117, 5, 28, 34, 14, -34 }, // '|' + { 8135, 11, 26, 16, 1, -26 } // '}' +}; +const GFXfont DSEG14_Classic_Mini_Regular_40 = { +(uint8_t *)DSEG14_Classic_Mini_Regular_40Bitmaps,(GFXglyph *)DSEG14_Classic_Mini_Regular_40Glyphs,0x20, 0x7E, 44}; \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/i2c.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/i2c.c new file mode 100644 index 00000000..9fe08f9b --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/i2c.c @@ -0,0 +1,36 @@ +#include +#include "tl_common.h" +#include "main.h" +#include "i2c.h" + +RAM bool i2c_sending; + +void init_i2c(void) +{ + i2c_gpio_set(I2C_GPIO_GROUP_C0C1); + i2c_master_init((uint8_t)(CLOCK_SYS_CLOCK_HZ / (4 * 400000))); + i2c_set_id(0x78); +} + +void send_i2c(uint8_t device_id, uint8_t *buffer, int dataLen) +{ + if (i2c_sending) + return; + i2c_sending = true; + i2c_set_id(device_id); + i2c_write_series(0, 0, (uint8_t *)buffer, dataLen); + i2c_sending = false; +} + +uint8_t test_i2c_device(uint8_t address) +{ + reg_i2c_id = address << 1; + reg_i2c_ctrl = FLD_I2C_CMD_START | FLD_I2C_CMD_ID; + while (reg_i2c_status & FLD_I2C_CMD_BUSY) + ; + reg_i2c_ctrl = FLD_I2C_CMD_STOP; + while (reg_i2c_status & FLD_I2C_CMD_BUSY) + ; + + return (reg_i2c_status & FLD_I2C_NAK) ? 0 : 1; +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/i2c.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/i2c.h new file mode 100644 index 00000000..ed4388a9 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/i2c.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +void init_i2c(void); +void send_i2c(uint8_t device_id, uint8_t *buffer, int dataLen); +uint8_t test_i2c_device(uint8_t address); + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/led.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/led.c new file mode 100644 index 00000000..6933b8f7 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/led.c @@ -0,0 +1,52 @@ +#include +#include "tl_common.h" +#include "led.h" +#include "main.h" + + void init_led(void) +{ + gpio_setup_up_down_resistor(LED_BLUE, PM_PIN_PULLUP_1M); + gpio_write(LED_BLUE, 1); + gpio_set_func(LED_BLUE, AS_GPIO); + gpio_set_output_en(LED_BLUE, 1); + gpio_set_input_en(LED_BLUE, 0); + + gpio_write(LED_RED, 1); + gpio_setup_up_down_resistor(LED_RED, PM_PIN_PULLUP_1M); + gpio_set_func(LED_RED, AS_GPIO); + gpio_set_output_en(LED_RED, 1); + gpio_set_input_en(LED_RED, 0); + + gpio_setup_up_down_resistor(LED_GREEN, PM_PIN_PULLUP_1M); + gpio_write(LED_GREEN, 1); + gpio_set_func(LED_GREEN, AS_GPIO); + gpio_set_output_en(LED_GREEN, 1); + gpio_set_input_en(LED_GREEN, 0); +} + + void set_led_color(uint8_t color) +{ + switch (color) + { + case 1: + gpio_write(LED_BLUE, 1); + gpio_write(LED_RED, 0); + gpio_write(LED_GREEN, 1); + break; + case 2: + gpio_write(LED_BLUE, 1); + gpio_write(LED_RED, 1); + gpio_write(LED_GREEN, 0); + break; + case 3: + gpio_write(LED_BLUE, 0); + gpio_write(LED_RED, 1); + gpio_write(LED_GREEN, 1); + break; + default: + gpio_write(LED_BLUE, 1); + gpio_write(LED_RED, 1); + gpio_write(LED_GREEN, 1); + break; + } +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/led.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/led.h new file mode 100644 index 00000000..a84afc9c --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/led.h @@ -0,0 +1,4 @@ +#pragma once + +void init_led(void); +void set_led_color(uint8_t color); diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/lut.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/lut.h new file mode 100644 index 00000000..af49e59d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/lut.h @@ -0,0 +1,53 @@ +#pragma once +#include "screen.h" + +#define LUTGROUP_NEGATIVE 0 +#define LUTGROUP_FASTBLINK 1 +#define LUTGROUP_SLOWBLINK 2 +#define LUTGROUP_SET 3 +#define LUTGROUP_IMPROVE_SHARPNESS 4 +#define LUTGROUP_IMPROVE_REDS 5 +#define LUTGROUP_UNUSED 6 + +#define LUTGROUP_UNKNOWN 7 +#define LUTGROUP_UNUSED3 8 +#define LUTGROUP_UNUSED4 9 + + +struct vgroup { + uint8_t A : 2; + uint8_t B : 2; + uint8_t C : 2; + uint8_t D : 2; +}; + +struct lut { + struct vgroup group[7]; +}; + +struct lut10 { + struct vgroup group[10]; +} ; + +struct group { + uint8_t phaselength[4]; + uint8_t repeat; +} ; + +struct waveform { + struct lut lut[5]; + struct group group[7]; + uint8_t gatelevel; + uint8_t sourcelevel[3]; + uint8_t dummyline; + uint8_t gatewidth; +} ; + +struct waveform10 { + struct lut10 lut[5]; + struct group group[10]; + uint8_t gatelevel; + uint8_t sourcelevel[3]; + uint8_t dummyline; + uint8_t gatewidth; +} ; \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/main.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/main.c new file mode 100644 index 00000000..07eb7612 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/main.c @@ -0,0 +1,259 @@ +#include "tl_common.h" +#include "main.h" +#include "led.h" +#include "epd.h" +#include "uart.h" +#include "zigbee.h" +#include "nfc.h" + +#include "proto.h" +#include "syncedproto.h" +#include "powermgt.h" +#include "comms.h" +#include "drawing.h" +#include "wdt.h" +#include "battery.h" + +extern uint8_t our_ch; +RAM u8 ourmac[8] = {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x02, 0x00, 0x00}; +extern RAM uint8_t mSelfMac[8]; +RAM char ownMacString[100] = ""; + + uint8_t showChannelSelect() +{ // returns 0 if no accesspoints were found + uint8_t result[sizeof(channelList)]; + memset(result, 0, sizeof(result)); + for (uint8_t i = 0; i < 4; i++) + { + for (uint8_t c = 0; c < sizeof(channelList); c++) + { + if (detectAP(channelList[c])) + { + if (mLastLqi > result[c]) + result[c] = mLastLqi; + printf("Channel: %d - LQI: %d RSSI %d\r\n", channelList[c], mLastLqi, mLastRSSI); + } + } + } + + uint8_t highestLqi = 0; + uint8_t highestSlot = 0; + for (uint8_t c = 0; c < sizeof(result); c++) + { + if (result[c] > highestLqi) + { + highestSlot = channelList[c]; + highestLqi = result[c]; + } + } + mLastLqi = highestLqi; + return highestSlot; +} + + uint8_t channelSelect() +{ // returns 0 if no accesspoints were found + uint8_t result[16]; + memset(result, 0, sizeof(result)); + + for (uint8_t i = 0; i < 2; i++) + { + for (uint8_t c = 0; c < sizeof(channelList); c++) + { + if (detectAP(channelList[c])) + { + if (mLastLqi > result[c]) + result[c] = mLastLqi; + } + } + } + + uint8_t highestLqi = 0; + uint8_t highestSlot = 0; + for (uint8_t c = 0; c < sizeof(result); c++) + { + if (result[c] > highestLqi) + { + highestSlot = channelList[c]; + highestLqi = result[c]; + } + } + + mLastLqi = highestLqi; + return highestSlot; +} + + int main(void) +{ + startup_state_e state = drv_platform_init(); + u8 isRetention = (state == SYSTEM_DEEP_RETENTION) ? 1 : 0; + isRetention = 0;// keep the compiler happy + drv_enable_irq(); + init_led(); + init_uart(); + init_nfc(); + + printf("\r\n\r\n\r\nSTARTING\r\n\r\n\r\n\r\n"); + + u32 flash_mid = 0; + u8 flash_uid[16] = {0}; + printf("Reading UID"); + int flag = flash_read_mid_uid_with_check(&flash_mid, flash_uid); + if (flag) + { + for (int i = 0; i < 16; i++) + { + printf(" %02X", flash_uid[i]); + } + printf("\r\n"); + for (int i = 0; i < 8; i++) + { + mSelfMac[i] = flash_uid[i + 8]; + } + } + else + { + printf(" - Failed!\r\n"); + } + + sprintf(ownMacString, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]); + + batteryVoltage = get_battery_mv(); + + printf("Battery mv: %d Millis: %d\r\n", batteryVoltage, getMillis()); + + // epd_display("Boot", batteryVoltage, ownMacString, 1); + + initializeProto(); + + currentChannel = showChannelSelect(); + + wdt10s(); + + if (currentChannel) + { + our_ch = currentChannel; + printf("AP Found\r\n"); + epd_display("AP Found", batteryVoltage, ownMacString, 1); + initPowerSaving(INTERVAL_BASE); + doSleep(5000UL); + } + else + { + printf("No AP found\r\n"); + epd_display("No AP Found", batteryVoltage, ownMacString, 1); + initPowerSaving(INTERVAL_AT_MAX_ATTEMPTS); + doSleep(120000UL); + } + while (1) + { + batteryVoltage = get_battery_mv(); + uint32_t before = getMillis(); + printf("Battery mv: %d Millis before: %d Uptime: %d\r\n", batteryVoltage, before, (getMillis() / 1000) / 60); + wdt10s(); + if (currentChannel) + { + struct AvailDataInfo *avail; + avail = getAvailDataInfo(); + // avail = getShortAvailDataInfo(); + addAverageValue(); + + if (avail == NULL) + { + set_led_color(1); + printf("No data\r\n"); + set_led_color(0); + // no data :( + nextCheckInFromAP = 0; // let the power-saving algorithm determine the next sleep period + } + else + { + nextCheckInFromAP = avail->nextCheckIn; + // got some data from the AP! + if (avail->dataType != DATATYPE_NOUPDATE) + { + set_led_color(2); + printf("Got data transfer\r\n"); + set_led_color(0); + // data transfer + if (processAvailDataInfo(avail)) + { + // succesful transfer, next wake time is determined by the NextCheckin; + } + else + { + // failed transfer, let the algorithm determine next sleep interval (not the AP) + nextCheckInFromAP = 0; + } + } + else + { + set_led_color(3); + printf("No data transfer\r\n"); + set_led_color(0); + wakeUpReason = WAKEUP_REASON_TIMED; // Only one successfully AP communication we can have timed wakeups + // no data transfer, just sleep. + } + } + + uint16_t nextCheckin = getNextSleep(); + longDataReqCounter += nextCheckin; + if (nextCheckin == INTERVAL_AT_MAX_ATTEMPTS) + { + // disconnected, obviously... + currentChannel = 0; + } + + doSleep(40 * 1000UL); + /*// if the AP told us to sleep for a specific period, do so. + if (nextCheckInFromAP) + { + doSleep(nextCheckInFromAP * 60000UL); + } + else + { + doSleep(getNextSleep() * 1000UL); + }*/ + } + else + { + set_led_color(3); + // We sacrifice 10ms here to show a basic LED status as the scan itself takes more than a second + WaitMs(10); + set_led_color(0); + currentChannel = channelSelect(); + + if ((!currentChannel) || (lowBattery) || (scanAttempts == (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS - 1))) + { + wdt60s(); + if (curImgSlot != 0xFF) + { + drawImageFromEeprom(curImgSlot); + } + else if ((scanAttempts >= (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS - 1))) + { + epd_display("Sleep", batteryVoltage, ownMacString, 1); + } + else + { + epd_display("No AP", batteryVoltage, ownMacString, 1); + } + } + // did we find a working channel? + if (currentChannel) + { + // now associated! + our_ch = currentChannel; + scanAttempts = 0; + wakeUpReason = WAKEUP_REASON_NETWORK_SCAN; + initPowerSaving(INTERVAL_BASE); + doSleep(40 * 1000UL); + } + else + { + // still not associated + doSleep(15 * 60 * 1000UL); + } + } + } + return 0; +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/main.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/main.h new file mode 100644 index 00000000..081b0ad6 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/main.h @@ -0,0 +1,24 @@ +#pragma once +#include + +#define LED_BLUE GPIO_PA7 +#define LED_RED GPIO_PD2 +#define LED_GREEN GPIO_PD3 + +#define RXD GPIO_PA0 +#define TXD GPIO_PB1 + +#define EPD_RESET GPIO_PD4 +#define EPD_DC GPIO_PD7 +#define EPD_BUSY GPIO_PA1 +#define EPD_CS GPIO_PB4 +#define EPD_CLK GPIO_PB5 +#define EPD_MOSI GPIO_PB6 +#define EPD_ENABLE GPIO_PC5 + +#define NFC_SDA GPIO_PC0 +#define NFC_SCL GPIO_PC1 +#define NFC_CS GPIO_PC6 +#define NFC_IRQ GPIO_PC4 + + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/nfc.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/nfc.c new file mode 100644 index 00000000..3fa77380 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/nfc.c @@ -0,0 +1,26 @@ +#include +#include "tl_common.h" +#include "nfc.h" +#include "main.h" +#include "i2c.h" + +uint8_t nfc_reset[] = {0x03, 0xb5, 0xa0}; + + void init_nfc(void) +{ + gpio_write(NFC_CS, 1); + gpio_set_func(NFC_CS, AS_GPIO); + gpio_set_output_en(NFC_CS, 1); + gpio_set_input_en(NFC_CS, 0); + gpio_setup_up_down_resistor(NFC_CS, PM_PIN_PULLUP_10K); + + gpio_set_func(NFC_IRQ, AS_GPIO); + gpio_set_output_en(NFC_IRQ, 0); + gpio_set_input_en(NFC_IRQ, 1); + gpio_setup_up_down_resistor(NFC_IRQ, PM_PIN_PULLUP_10K); + + gpio_write(NFC_CS, 0); + sleep_us(500); + send_i2c(0xae, nfc_reset, sizeof(nfc_reset)); + gpio_write(NFC_CS, 1); +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/nfc.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/nfc.h new file mode 100644 index 00000000..49fef1d6 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/nfc.h @@ -0,0 +1,5 @@ +#pragma once +#include +#include "main.h" + +void init_nfc(void); diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/obd.inl b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/obd.inl new file mode 100644 index 00000000..bac1c4b6 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/obd.inl @@ -0,0 +1,2459 @@ +// +// obd.inl +// Drawing code for OneBitDisplay library +// +#ifdef _LINUX_ +#define PROGMEM +#define false 0 +#define true 1 +#define LOW 0 +#define HIGH 1 +#define memcpy_P memcpy +#ifndef I2C_SLAVE +#define I2C_SLAVE 0 +#endif +static void digitalWrite(int iPin, int iState) { +} +//static int digitalRead(int iPin) +//{ +// return AIOReadGPIO(iPin); +//} /* digitalRead() */ + +#endif +void obdSetDCMode(OBDISP *pOBD, int iMode); +void InvertBytes(uint8_t *pData, uint8_t bLen); +void SPI_BitBang(OBDISP *pOBD, uint8_t *pData, int iLen, uint8_t iMOSIPin, uint8_t iSCKPin); + +const uint8_t ucMirror[256] PROGMEM = + {0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240, + 8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248, + 4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244, + 12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, + 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242, + 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, + 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246, + 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, + 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241, + 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, + 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245, + 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, + 3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243, + 11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251, + 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247, + 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255}; + +const uint8_t ucFont[]PROGMEM = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5f,0x5f,0x06,0x00, + 0x00,0x07,0x07,0x00,0x07,0x07,0x00,0x14,0x7f,0x7f,0x14,0x7f,0x7f,0x14, + 0x24,0x2e,0x2a,0x6b,0x6b,0x3a,0x12,0x46,0x66,0x30,0x18,0x0c,0x66,0x62, + 0x30,0x7a,0x4f,0x5d,0x37,0x7a,0x48,0x00,0x04,0x07,0x03,0x00,0x00,0x00, + 0x00,0x1c,0x3e,0x63,0x41,0x00,0x00,0x00,0x41,0x63,0x3e,0x1c,0x00,0x00, + 0x08,0x2a,0x3e,0x1c,0x3e,0x2a,0x08,0x00,0x08,0x08,0x3e,0x3e,0x08,0x08, + 0x00,0x00,0x80,0xe0,0x60,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08, + 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x03,0x01, + 0x3e,0x7f,0x59,0x4d,0x47,0x7f,0x3e,0x40,0x42,0x7f,0x7f,0x40,0x40,0x00, + 0x62,0x73,0x59,0x49,0x6f,0x66,0x00,0x22,0x63,0x49,0x49,0x7f,0x36,0x00, + 0x18,0x1c,0x16,0x53,0x7f,0x7f,0x50,0x27,0x67,0x45,0x45,0x7d,0x39,0x00, + 0x3c,0x7e,0x4b,0x49,0x79,0x30,0x00,0x03,0x03,0x71,0x79,0x0f,0x07,0x00, + 0x36,0x7f,0x49,0x49,0x7f,0x36,0x00,0x06,0x4f,0x49,0x69,0x3f,0x1e,0x00, + 0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x00,0x00,0x80,0xe6,0x66,0x00,0x00, + 0x08,0x1c,0x36,0x63,0x41,0x00,0x00,0x00,0x14,0x14,0x14,0x14,0x14,0x14, + 0x00,0x41,0x63,0x36,0x1c,0x08,0x00,0x00,0x02,0x03,0x59,0x5d,0x07,0x02, + 0x3e,0x7f,0x41,0x5d,0x5d,0x5f,0x0e,0x7c,0x7e,0x13,0x13,0x7e,0x7c,0x00, + 0x41,0x7f,0x7f,0x49,0x49,0x7f,0x36,0x1c,0x3e,0x63,0x41,0x41,0x63,0x22, + 0x41,0x7f,0x7f,0x41,0x63,0x3e,0x1c,0x41,0x7f,0x7f,0x49,0x5d,0x41,0x63, + 0x41,0x7f,0x7f,0x49,0x1d,0x01,0x03,0x1c,0x3e,0x63,0x41,0x51,0x33,0x72, + 0x7f,0x7f,0x08,0x08,0x7f,0x7f,0x00,0x00,0x41,0x7f,0x7f,0x41,0x00,0x00, + 0x30,0x70,0x40,0x41,0x7f,0x3f,0x01,0x41,0x7f,0x7f,0x08,0x1c,0x77,0x63, + 0x41,0x7f,0x7f,0x41,0x40,0x60,0x70,0x7f,0x7f,0x0e,0x1c,0x0e,0x7f,0x7f, + 0x7f,0x7f,0x06,0x0c,0x18,0x7f,0x7f,0x1c,0x3e,0x63,0x41,0x63,0x3e,0x1c, + 0x41,0x7f,0x7f,0x49,0x09,0x0f,0x06,0x1e,0x3f,0x21,0x31,0x61,0x7f,0x5e, + 0x41,0x7f,0x7f,0x09,0x19,0x7f,0x66,0x26,0x6f,0x4d,0x49,0x59,0x73,0x32, + 0x03,0x41,0x7f,0x7f,0x41,0x03,0x00,0x7f,0x7f,0x40,0x40,0x7f,0x7f,0x00, + 0x1f,0x3f,0x60,0x60,0x3f,0x1f,0x00,0x3f,0x7f,0x60,0x30,0x60,0x7f,0x3f, + 0x63,0x77,0x1c,0x08,0x1c,0x77,0x63,0x07,0x4f,0x78,0x78,0x4f,0x07,0x00, + 0x47,0x63,0x71,0x59,0x4d,0x67,0x73,0x00,0x7f,0x7f,0x41,0x41,0x00,0x00, + 0x01,0x03,0x06,0x0c,0x18,0x30,0x60,0x00,0x41,0x41,0x7f,0x7f,0x00,0x00, + 0x08,0x0c,0x06,0x03,0x06,0x0c,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x00,0x00,0x03,0x07,0x04,0x00,0x00,0x20,0x74,0x54,0x54,0x3c,0x78,0x40, + 0x41,0x7f,0x3f,0x48,0x48,0x78,0x30,0x38,0x7c,0x44,0x44,0x6c,0x28,0x00, + 0x30,0x78,0x48,0x49,0x3f,0x7f,0x40,0x38,0x7c,0x54,0x54,0x5c,0x18,0x00, + 0x48,0x7e,0x7f,0x49,0x03,0x06,0x00,0x98,0xbc,0xa4,0xa4,0xf8,0x7c,0x04, + 0x41,0x7f,0x7f,0x08,0x04,0x7c,0x78,0x00,0x44,0x7d,0x7d,0x40,0x00,0x00, + 0x60,0xe0,0x80,0x84,0xfd,0x7d,0x00,0x41,0x7f,0x7f,0x10,0x38,0x6c,0x44, + 0x00,0x41,0x7f,0x7f,0x40,0x00,0x00,0x7c,0x7c,0x18,0x78,0x1c,0x7c,0x78, + 0x7c,0x78,0x04,0x04,0x7c,0x78,0x00,0x38,0x7c,0x44,0x44,0x7c,0x38,0x00, + 0x84,0xfc,0xf8,0xa4,0x24,0x3c,0x18,0x18,0x3c,0x24,0xa4,0xf8,0xfc,0x84, + 0x44,0x7c,0x78,0x4c,0x04,0x0c,0x18,0x48,0x5c,0x54,0x74,0x64,0x24,0x00, + 0x04,0x04,0x3e,0x7f,0x44,0x24,0x00,0x3c,0x7c,0x40,0x40,0x3c,0x7c,0x40, + 0x1c,0x3c,0x60,0x60,0x3c,0x1c,0x00,0x3c,0x7c,0x60,0x30,0x60,0x7c,0x3c, + 0x44,0x6c,0x38,0x10,0x38,0x6c,0x44,0x9c,0xbc,0xa0,0xa0,0xfc,0x7c,0x00, + 0x4c,0x64,0x74,0x5c,0x4c,0x64,0x00,0x08,0x08,0x3e,0x77,0x41,0x41,0x00, + 0x00,0x00,0x00,0x77,0x77,0x00,0x00,0x41,0x41,0x77,0x3e,0x08,0x08,0x00, + 0x02,0x03,0x01,0x03,0x02,0x03,0x01,0x70,0x78,0x4c,0x46,0x4c,0x78,0x70}; +// AVR MCUs have very little memory; save 6K of FLASH by stretching the 'normal' +// font instead of using this large font +#ifndef __AVR__ +const uint8_t ucBigFont[]PROGMEM = { + 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,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,0xfc,0xfc,0xff,0xff,0xff,0xff,0xfc,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x3f,0x3f,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0x0f,0x0f,0x3f,0x3f,0x00,0x00,0x00,0x00,0x3f,0x3f,0x0f,0x0f,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xfc,0xfc,0xfc,0xfc,0xc0,0xc0,0xfc,0xfc,0xfc,0xfc,0xc0,0xc0,0x00,0x00, + 0xc0,0xc0,0xff,0xff,0xff,0xff,0xc0,0xc0,0xff,0xff,0xff,0xff,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x0f,0x0f,0x3c,0x3c,0x00,0x00, + 0xf0,0xf0,0xc3,0xc3,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0x03,0x03,0x03,0x03,0x3f,0x3f,0x3f,0x3f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xf0,0xf0,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x3c,0x3c,0xff,0xff,0xc3,0xc3,0xff,0xff,0x3c,0x3c,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x0f,0x0f,0xfc,0xfc,0xff,0xff,0x03,0x03,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x30,0x30,0x3f,0x3f,0x0f,0x0f,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, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xf0,0xfc,0xfc,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,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,0x03,0x03,0x0f,0x0f,0xfc,0xfc,0xf0,0xf0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0x0c,0x0c,0xcc,0xcc,0xff,0xff,0x3f,0x3f,0x3f,0x3f,0xff,0xff,0xcc,0xcc,0x0c,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,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0c,0x0c,0x0c,0x0c,0xff,0xff,0xff,0xff,0x0c,0x0c,0x0c,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x30,0x30,0x3f,0x3f,0x0f,0x0f,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, + 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,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,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,0x0f,0x0f,0x0f,0x0f,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,0xc0,0xc0,0xf0,0xf0,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x03,0x03,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, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0xc3,0xc3,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0xff,0xff,0xff,0xff,0x30,0x30,0x0f,0x0f,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x30,0x30,0x3c,0x3c,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x03,0x03,0xc3,0xc3,0xff,0xff,0x3c,0x3c,0x00,0x00, + 0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0xff,0xff,0xff,0xff,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00, + 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0f,0x0f,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xf0,0xfc,0xfc,0x0f,0x0f,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xf0,0xfc,0xfc,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,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,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,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,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x03,0x03,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,0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x0c,0x0c,0x3f,0x3f,0xf3,0xf3,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,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, + 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,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,0x0c,0x0c,0x3c,0x3c,0xf0,0xf0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xf3,0xf3,0x3f,0x3f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x3c,0x3c,0x3f,0x3f,0x03,0x03,0x03,0x03,0xc3,0xc3,0xff,0xff,0x3c,0x3c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x3f,0x3f,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xf0,0xfc,0xfc,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0xfc,0xfc,0xf0,0xf0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x3f,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0x0f,0x0f,0x3c,0x3c,0xf0,0xf0,0xc0,0xc0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xf0,0xfc,0xfc,0x0f,0x0f,0x03,0x03,0x03,0x03,0x0f,0x0f,0x3c,0x3c,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x0f,0x0f,0xfc,0xfc,0xf0,0xf0,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0xc3,0xc3,0x0f,0x0f,0x3f,0x3f,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x0f,0x0f,0x00,0x00,0xc0,0xc0,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0xc3,0xc3,0x0f,0x0f,0x3f,0x3f,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,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, + 0xf0,0xf0,0xfc,0xfc,0x0f,0x0f,0x03,0x03,0x03,0x03,0x0f,0x0f,0x3c,0x3c,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x0c,0x0c,0x0c,0x0c,0xfc,0xfc,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x03,0x03,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,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,0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00, + 0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00,0xf0,0xf0,0xff,0xff,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x0f,0x0f,0x3f,0x3f,0xf0,0xf0,0xc0,0xc0,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xfc,0xfc,0xf0,0xf0,0xfc,0xfc,0xff,0xff,0xff,0xff,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x03,0x03,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xfc,0xfc,0xf0,0xf0,0xc0,0xc0,0xff,0xff,0xff,0xff,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x03,0x03,0x0f,0x0f,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xf0,0xfc,0xfc,0x0f,0x0f,0x03,0x03,0x0f,0x0f,0xfc,0xfc,0xf0,0xf0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,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, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0xc0,0xc0,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0f,0x0f,0xff,0xff,0xff,0xff,0xc3,0xc3,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x0f,0x0f,0xff,0xff,0xf0,0xf0,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x3c,0x3c,0xff,0xff,0xc3,0xc3,0x03,0x03,0x03,0x03,0x3f,0x3f,0x3c,0x3c,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x03,0x03,0x03,0x03,0x0f,0x0f,0xfc,0xfc,0xf0,0xf0,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x3f,0x3f,0x0f,0x0f,0xff,0xff,0xff,0xff,0x0f,0x0f,0x3f,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x3f,0x3f,0xff,0xff,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xff,0xff,0x3f,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0xff,0xff,0xff,0xff,0xc0,0xc0,0xfc,0xfc,0xc0,0xc0,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0xff,0xff,0xf0,0xf0,0x00,0x00,0xf0,0xf0,0xff,0xff,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0xf0,0xf0,0xff,0xff,0x0f,0x0f,0xff,0xff,0xf0,0xf0,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x3f,0x3f,0x0f,0x0f,0x03,0x03,0x03,0x03,0xc3,0xc3,0xff,0xff,0x3f,0x3f,0x00,0x00, + 0xc0,0xc0,0xf0,0xf0,0x3c,0x3c,0x0f,0x0f,0x03,0x03,0x00,0x00,0xc0,0xc0,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xf0,0xf0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x03,0x03,0x0f,0x0f,0x3f,0x3f,0xfc,0xfc,0xf0,0xf0,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xc0,0xf0,0xf0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,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,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,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xf0,0xfc,0xfc,0x0c,0x0c,0x0c,0x0c,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xc0,0xc3,0xc3,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xfc,0xff,0xff,0x03,0x03,0x0f,0x0f,0x3c,0x3c,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,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,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0xc3,0xc3,0xcf,0xcf,0x0c,0x0c,0x0c,0x0c,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xc0,0xcf,0xcf,0xcf,0xcf,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,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,0xc0,0xc0,0xcf,0xcf,0xcf,0xcf,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00, + 0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x3c,0x3c,0xff,0xff,0xc3,0xc3,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x03,0x03,0xff,0xff,0x03,0x03,0xff,0xff,0xff,0xff,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x03,0x03,0x00,0x00,0x03,0x03,0x0f,0x0f,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x0c,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,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x3c,0x3c,0x30,0x30,0xf0,0xf0,0xc3,0xc3,0x03,0x03,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0xfc,0xfc,0xff,0xff,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0xf0,0xf0,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0f,0x0f,0x03,0x03,0x0f,0x0f,0x0f,0x0f,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0x00,0x00,0x03,0x03,0xff,0xff,0xfc,0xfc,0xff,0xff,0x03,0x03,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00, + 0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xff,0xff,0x3f,0x3f,0x00,0x00, + 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00, + 0x03,0x03,0xc3,0xc3,0xf0,0xf0,0x3c,0x3c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00, + 0x0f,0x0f,0x0f,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x0f,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x00,0x00, + 0x00,0x00,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0c,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,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x03,0x03,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0x03,0x03,0x03,0x03,0x00,0x00, + 0x00,0x00,0x0c,0x0c,0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0c,0x0c,0x0f,0x0f,0x03,0x03,0x0f,0x0f,0x0c,0x0c,0x0f,0x0f,0x03,0x03,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xc0,0xf0,0xf0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0x03,0x03,0x00,0x00,0x03,0x03,0xff,0xff,0xfc,0xfc,0x00,0x00, + 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +#endif // !__AVR__ + + // 5x7 font (in 6x8 cell) +const uint8_t ucSmallFont[]PROGMEM = { +0x00,0x00,0x00,0x00,0x00, +0x00,0x06,0x5f,0x06,0x00, +0x07,0x03,0x00,0x07,0x03, +0x24,0x7e,0x24,0x7e,0x24, +0x24,0x2b,0x6a,0x12,0x00, +0x63,0x13,0x08,0x64,0x63, +0x36,0x49,0x56,0x20,0x50, +0x00,0x07,0x03,0x00,0x00, +0x00,0x3e,0x41,0x00,0x00, +0x00,0x41,0x3e,0x00,0x00, +0x08,0x3e,0x1c,0x3e,0x08, +0x08,0x08,0x3e,0x08,0x08, +0x00,0xe0,0x60,0x00,0x00, +0x08,0x08,0x08,0x08,0x08, +0x00,0x60,0x60,0x00,0x00, +0x20,0x10,0x08,0x04,0x02, +0x3e,0x51,0x49,0x45,0x3e, +0x00,0x42,0x7f,0x40,0x00, +0x62,0x51,0x49,0x49,0x46, +0x22,0x49,0x49,0x49,0x36, +0x18,0x14,0x12,0x7f,0x10, +0x2f,0x49,0x49,0x49,0x31, +0x3c,0x4a,0x49,0x49,0x30, +0x01,0x71,0x09,0x05,0x03, +0x36,0x49,0x49,0x49,0x36, +0x06,0x49,0x49,0x29,0x1e, +0x00,0x6c,0x6c,0x00,0x00, +0x00,0xec,0x6c,0x00,0x00, +0x08,0x14,0x22,0x41,0x00, +0x24,0x24,0x24,0x24,0x24, +0x00,0x41,0x22,0x14,0x08, +0x02,0x01,0x59,0x09,0x06, +0x3e,0x41,0x5d,0x55,0x1e, +0x7e,0x11,0x11,0x11,0x7e, +0x7f,0x49,0x49,0x49,0x36, +0x3e,0x41,0x41,0x41,0x22, +0x7f,0x41,0x41,0x41,0x3e, +0x7f,0x49,0x49,0x49,0x41, +0x7f,0x09,0x09,0x09,0x01, +0x3e,0x41,0x49,0x49,0x7a, +0x7f,0x08,0x08,0x08,0x7f, +0x00,0x41,0x7f,0x41,0x00, +0x30,0x40,0x40,0x40,0x3f, +0x7f,0x08,0x14,0x22,0x41, +0x7f,0x40,0x40,0x40,0x40, +0x7f,0x02,0x04,0x02,0x7f, +0x7f,0x02,0x04,0x08,0x7f, +0x3e,0x41,0x41,0x41,0x3e, +0x7f,0x09,0x09,0x09,0x06, +0x3e,0x41,0x51,0x21,0x5e, +0x7f,0x09,0x09,0x19,0x66, +0x26,0x49,0x49,0x49,0x32, +0x01,0x01,0x7f,0x01,0x01, +0x3f,0x40,0x40,0x40,0x3f, +0x1f,0x20,0x40,0x20,0x1f, +0x3f,0x40,0x3c,0x40,0x3f, +0x63,0x14,0x08,0x14,0x63, +0x07,0x08,0x70,0x08,0x07, +0x71,0x49,0x45,0x43,0x00, +0x00,0x7f,0x41,0x41,0x00, +0x02,0x04,0x08,0x10,0x20, +0x00,0x41,0x41,0x7f,0x00, +0x04,0x02,0x01,0x02,0x04, +0x80,0x80,0x80,0x80,0x80, +0x00,0x03,0x07,0x00,0x00, +0x20,0x54,0x54,0x54,0x78, +0x7f,0x44,0x44,0x44,0x38, +0x38,0x44,0x44,0x44,0x28, +0x38,0x44,0x44,0x44,0x7f, +0x38,0x54,0x54,0x54,0x08, +0x08,0x7e,0x09,0x09,0x00, +0x18,0xa4,0xa4,0xa4,0x7c, +0x7f,0x04,0x04,0x78,0x00, +0x00,0x00,0x7d,0x40,0x00, +0x40,0x80,0x84,0x7d,0x00, +0x7f,0x10,0x28,0x44,0x00, +0x00,0x00,0x7f,0x40,0x00, +0x7c,0x04,0x18,0x04,0x78, +0x7c,0x04,0x04,0x78,0x00, +0x38,0x44,0x44,0x44,0x38, +0xfc,0x44,0x44,0x44,0x38, +0x38,0x44,0x44,0x44,0xfc, +0x44,0x78,0x44,0x04,0x08, +0x08,0x54,0x54,0x54,0x20, +0x04,0x3e,0x44,0x24,0x00, +0x3c,0x40,0x20,0x7c,0x00, +0x1c,0x20,0x40,0x20,0x1c, +0x3c,0x60,0x30,0x60,0x3c, +0x6c,0x10,0x10,0x6c,0x00, +0x9c,0xa0,0x60,0x3c,0x00, +0x64,0x54,0x54,0x4c,0x00, +0x08,0x3e,0x41,0x41,0x00, +0x00,0x00,0x77,0x00,0x00, +0x00,0x41,0x41,0x3e,0x08, +0x02,0x01,0x02,0x01,0x00, +0x3c,0x26,0x23,0x26,0x3c}; + +#define MAX_CACHE 192 +static uint8_t u8Cache[MAX_CACHE]; // for faster character drawing +static volatile uint8_t u8End = 0; + +static void obdCachedFlush(OBDISP *pOBD, int bRender) +{ + if (u8End > 0) { + obdWriteDataBlock(pOBD, u8Cache, u8End, bRender); + u8End = 0; + } +} /* obdCachedFlush() */ + +static void obdCachedWrite(OBDISP *pOBD, uint8_t *pData, uint8_t u8Len, int bRender) +{ + if (u8End + u8Len > MAX_CACHE) // need to flush it + { + obdCachedFlush(pOBD, bRender); // write the old data + } + memcpy(&u8Cache[u8End], pData, u8Len); + u8End += u8Len; + +} /* obdCachedWrite() */ +// wrapper/adapter functions to make the code work on Linux +#ifdef _LINUX_ +static uint8_t pgm_read_byte(const uint8_t *ptr) +{ + return *ptr; +} +static int16_t pgm_read_word(const uint8_t *ptr) +{ + return ptr[0] + (ptr[1]<<8); +} +// Wrapper function to write I2C data +static void _I2CWrite(OBDISP *pOBD, unsigned char *pData, int iLen) +{ +} +#else // Arduino +static void _I2CWrite(OBDISP *pOBD, unsigned char *pData, int iLen) +{ +#if !defined( __AVR_ATtiny85__ ) + if (pOBD->com_mode == COM_SPI) // we're writing to SPI, treat it differently + { + if (pOBD->iDCPin != 0xff) + { + digitalWrite(pOBD->iDCPin, (pData[0] == 0) ? LOW : HIGH); // data versus command + digitalWrite(pOBD->iCSPin, LOW); + } +#ifdef HAL_ESP32_HAL_H_ + { + uint8_t ucTemp[1024]; + SPI.transferBytes(&pData[1], ucTemp, iLen-1); + } +#else + SPI.transfer(&pData[1], iLen-1); +#endif + if (pOBD->type < SHARP_144x168) + digitalWrite(pOBD->iCSPin, HIGH); + } + else // must be I2C +#endif // !ATtiny85 + { + if (pOBD->bbi2c.bWire && iLen > 32) // Hardware I2C has write length limits + { + iLen--; // don't count the 0x40 byte the first time through + while (iLen >= 31) // max 31 data byes + data introducer + { + I2CWrite(&pOBD->bbi2c, pOBD->oled_addr, pData, 32); + iLen -= 31; + pData += 31; + pData[0] = 0x40; + } + if (iLen) iLen++; // If remaining data, add the last 0x40 byte + } + if (iLen) // if any data remaining + { + I2CWrite(&pOBD->bbi2c, pOBD->oled_addr, pData, iLen); + } + } // I2C +} /* _I2CWrite() */ +#endif // _LINUX_ + +// Send a single byte command to the OLED controller +void obdWriteCommand(OBDISP *pOBD, unsigned char c) +{ +} /* obdWriteCommand() */ + +// +// Byte operands for compressing the data +// The first 2 bits are the type, followed by the counts +#define OP_MASK 0xc0 +#define OP_SKIPCOPY 0x00 +#define OP_COPYSKIP 0x40 +#define OP_REPEATSKIP 0x80 +#define OP_REPEAT 0xc0 +// +// Write a block of flash memory to the display +// +void oledWriteFlashBlock(OBDISP *pOBD, uint8_t *s, int iLen) +{ +int j; +int iWidthMask = pOBD->width -1; +int iSizeMask = ((pOBD->width * pOBD->height)/8) - 1; +int iWidthShift = (pOBD->width == 128) ? 7:6; // assume 128 or 64 wide +uint8_t ucTemp[128]; + + while (((pOBD->iScreenOffset & iWidthMask) + iLen) >= pOBD->width) // if it will hit the page end + { + j = pOBD->width - (pOBD->iScreenOffset & iWidthMask); // amount we can write in one shot + memcpy_P(ucTemp, s, j); + obdWriteDataBlock(pOBD, ucTemp, j, 1); + s += j; + iLen -= j; + pOBD->iScreenOffset = (pOBD->iScreenOffset + j) & iSizeMask; + obdSetPosition(pOBD, pOBD->iScreenOffset & iWidthMask, (pOBD->iScreenOffset >> iWidthShift), 1); + } // while it needs some help + memcpy_P(ucTemp, s, iLen); + obdWriteDataBlock(pOBD, ucTemp, iLen, 1); + pOBD->iScreenOffset = (pOBD->iScreenOffset + iLen) & iSizeMask; +} /* oledWriteFlashBlock() */ + +// +// Create a virtual display of any size +// The memory buffer must be provided at the time of creation +// +void obdCreateVirtualDisplay(OBDISP *pOBD, int width, int height, uint8_t *buffer) +{ + if (pOBD != NULL && buffer != NULL) + { + pOBD->width = width; + pOBD->height = height; + pOBD->type = LCD_VIRTUAL; + pOBD->ucScreen = buffer; + pOBD->iCursorX = pOBD->iCursorY = 0; + pOBD->iScreenOffset = 0; + } +} /* obdCreateVirtualDisplay() */ +// +// Scroll the internal buffer by 1 scanline (up/down) +// width is in pixels, lines is group of 8 rows +// +int obdScrollBuffer(OBDISP *pOBD, int iStartCol, int iEndCol, int iStartRow, int iEndRow, int bUp) +{ + uint8_t b, *s; + int col, row; + int iPitch; + + if (iStartCol < 0 || iStartCol >= pOBD->width || iEndCol < 0 || iEndCol > pOBD->width || iStartCol > iEndCol) // invalid + return -1; + if (iStartRow < 0 || iStartRow >= (pOBD->height/8) || iEndRow < 0 || iEndRow >= (pOBD->height/8) || iStartRow > iEndRow) + return -1; + iPitch = pOBD->width; + if (bUp) + { + for (row=iStartRow; row<=iEndRow; row++) + { + s = &pOBD->ucScreen[(row * iPitch) + iStartCol]; + for (col=iStartCol; col<=iEndCol; col++) + { + b = *s; + b >>= 1; // scroll pixels 'up' + if (row < iEndRow) + b |= (s[iPitch] << 7); // capture pixel of row below, except for last row + *s++ = b; + } // for col + } // for row + } // up + else // down + { + for (row=iEndRow; row>=iStartRow; row--) + { + s = &pOBD->ucScreen[(row * iPitch)+iStartCol]; + for (col=iStartCol; col<=iEndCol; col++) + { + b = *s; + b <<= 1; // scroll down + if (row > iStartRow) + b |= (s[-iPitch] >> 7); // capture pixel of row above + *s++ = b; + } // for col + } // for row + } + return 0; +} /* obdScrollBuffer() */ +// +// Send commands to position the "cursor" (aka memory write address) +// to the given row and column +// +void obdSetPosition(OBDISP *pOBD, int x, int y, int bRender) +{ +unsigned char buf[4]; +int iPitch = pOBD->width; + + obdCachedFlush(pOBD, bRender); // flush any cached data first + + pOBD->iScreenOffset = (y*iPitch)+x; + + if (pOBD->type == LCD_VIRTUAL || pOBD->type >= SHARP_144x168) + return; // nothing to do + if (!bRender) + return; // don't send the commands to the OLED if we're not rendering the graphics now + if (pOBD->type == LCD_NOKIA5110) + { + obdWriteCommand(pOBD, 0x40 | y); + obdWriteCommand(pOBD, 0x80 | x); + return; + } + if (pOBD->type == OLED_64x32) // visible display starts at column 32, row 4 + { + x += 32; // display is centered in VRAM, so this is always true + if (pOBD->flip == 0) // non-flipped display starts from line 4 + y += 4; + } + else if (pOBD->type == LCD_UC1701 && pOBD->flip) + { + x += 4; + } + else if (pOBD->type == OLED_132x64) // SH1106 has 128 pixels centered in 132 + { + x += 2; + } + else if (pOBD->type == OLED_96x16) // visible display starts at line 2 + { // mapping is a bit strange on the 96x16 OLED + if (pOBD->flip) + x += 32; + else + y += 2; + } + else if (pOBD->type == OLED_72x40) // starts at x=28,y=3 + { + x += 28; + if (!pOBD->flip) + { + y += 3; + } + } + if (pOBD->com_mode == COM_I2C) { // I2C device + buf[0] = 0x00; // command introducer + buf[1] = 0xb0 | y; // set page to Y + buf[2] = x & 0xf; // lower column address + buf[3] = 0x10 | (x >> 4); // upper column addr + _I2CWrite(pOBD, buf, 4); + } else { // SPI mode + obdWriteCommand(pOBD, 0xb0 | y); // set Y + obdWriteCommand(pOBD, 0x10 | (x >> 4)); // set X MSB + obdWriteCommand(pOBD, 0x00 | (x & 0xf)); // set X LSB + } +} /* obdSetPosition() */ + +// +// Write a block of pixel data to the OLED +// Length can be anything from 1 to 1024 (whole display) +// +void obdWriteDataBlock(OBDISP *pOBD, unsigned char *ucBuf, int iLen, int bRender) +{ +int iPitch, iBufferSize; + + iPitch = pOBD->width; + iBufferSize = iPitch * (pOBD->height / 8); + +// Keep a copy in local buffer +if (pOBD->ucScreen && (iLen + pOBD->iScreenOffset) <= iBufferSize) +{ + memcpy(&pOBD->ucScreen[pOBD->iScreenOffset], ucBuf, iLen); + pOBD->iScreenOffset += iLen; + // wrap around ? + if (pOBD->iScreenOffset >= iBufferSize) + pOBD->iScreenOffset -= iBufferSize; +} +if (pOBD->type == LCD_VIRTUAL || pOBD->type >= SHARP_144x168) + return; // nothing else to do +} /* obdWriteDataBlock() */ +// +// Write a repeating byte to the display +// +void obdRepeatByte(OBDISP *pOBD, uint8_t b, int iLen) +{ +int j; +int iWidthMask = pOBD->width -1; +int iWidthShift = (pOBD->width == 128) ? 7:6; // assume 128 or 64 pixels wide +int iSizeMask = ((pOBD->width * pOBD->height)/8) -1; +uint8_t ucTemp[128]; + + memset(ucTemp, b, (iLen > 128) ? 128:iLen); + while (((pOBD->iScreenOffset & iWidthMask) + iLen) >= pOBD->width) // if it will hit the page end + { + j = pOBD->width - (pOBD->iScreenOffset & iWidthMask); // amount we can write in one shot + obdWriteDataBlock(pOBD, ucTemp, j, 1); + iLen -= j; + pOBD->iScreenOffset = (pOBD->iScreenOffset + j) & iSizeMask; + obdSetPosition(pOBD, pOBD->iScreenOffset & iWidthMask, (pOBD->iScreenOffset >> iWidthShift), 1); + } // while it needs some help + obdWriteDataBlock(pOBD, ucTemp, iLen, 1); + pOBD->iScreenOffset += iLen; +} /* obdRepeatByte() */ + +// +// Play a frame of animation data +// The animation data is assumed to be encoded for a full frame of the display +// Given the pointer to the start of the compressed data, +// it returns the pointer to the start of the next frame +// Frame rate control is up to the calling program to manage +// When it finishes the last frame, it will start again from the beginning +// +uint8_t * obdPlayAnimFrame(OBDISP *pOBD, uint8_t *pAnimation, uint8_t *pCurrent, int iLen) +{ +uint8_t *s; +int i, j; +unsigned char b, bCode; +int iBufferSize = (pOBD->width * pOBD->height)/8; // size in bytes of the display devce +int iWidthMask, iWidthShift; + + iWidthMask = pOBD->width - 1; + iWidthShift = (pOBD->width == 128) ? 7:6; // 128 or 64 pixels wide + if (pCurrent == NULL || pCurrent > pAnimation + iLen) + return NULL; // invalid starting point + + s = (uint8_t *)pCurrent; // start of animation data + i = 0; + obdSetPosition(pOBD, 0,0,1); + while (i < iBufferSize) // run one frame + { + bCode = pgm_read_byte(s++); + switch (bCode & OP_MASK) // different compression types + { + case OP_SKIPCOPY: // skip/copy + if (bCode == OP_SKIPCOPY) // big skip + { + b = pgm_read_byte(s++); + i += b + 1; + obdSetPosition(pOBD, i & iWidthMask, (i >> iWidthShift), 1); + } + else // skip/copy + { + if (bCode & 0x38) + { + i += ((bCode & 0x38) >> 3); // skip amount + obdSetPosition(pOBD, i & iWidthMask, (i >> iWidthShift), 1); + } + if (bCode & 7) + { + oledWriteFlashBlock(pOBD, s, bCode & 7); + s += (bCode & 7); + i += bCode & 7; + } + } + break; + case OP_COPYSKIP: // copy/skip + if (bCode == OP_COPYSKIP) // big copy + { + b = pgm_read_byte(s++); + j = b + 1; + oledWriteFlashBlock(pOBD, s, j); + s += j; + i += j; + } + else + { + j = ((bCode & 0x38) >> 3); + if (j) + { + oledWriteFlashBlock(pOBD, s, j); + s += j; + i += j; + } + if (bCode & 7) + { + i += (bCode & 7); // skip + obdSetPosition(pOBD, i & iWidthMask, (i >> iWidthShift), 1); + } + } + break; + case OP_REPEATSKIP: // repeat/skip + j = (bCode & 0x38) >> 3; // repeat count + b = pgm_read_byte(s++); + obdRepeatByte(pOBD, b, j); + i += j; + if (bCode & 7) + { + i += (bCode & 7); // skip amount + obdSetPosition(pOBD, i & iWidthMask, (i >> iWidthShift), 1); + } + break; + + case OP_REPEAT: + j = (bCode & 0x3f) + 1; + b = pgm_read_byte(s++); + obdRepeatByte(pOBD, b, j); + i += j; + break; + } // switch on code type + } // while rendering a frame + if (s >= pAnimation + iLen) // we've hit the end, restart from the beginning + s = pAnimation; + return s; // return pointer to start of next frame +} /* obdPlayAnimFrame() */ +// +// Draw a sprite of any size in any position +// If it goes beyond the left/right or top/bottom edges +// it's trimmed to show the valid parts +// This function requires a back buffer to be defined +// The priority color (0 or 1) determines which color is painted +// when a 1 is encountered in the source image. +// +void obdDrawSprite(OBDISP *pOBD, uint8_t *pSprite, int cx, int cy, int iPitch, int x, int y, uint8_t iPriority) +{ + int tx, ty, dx, dy, iStartX; + uint8_t *s, *d, uc, pix, ucSrcMask, ucDstMask; + int iLocalPitch; + + iLocalPitch = pOBD->width; + + if (x+cx < 0 || y+cy < 0 || x >= pOBD->width || y >= pOBD->height || pOBD->ucScreen == NULL) + return; // no backbuffer or out of bounds + dy = y; // destination y + if (y < 0) // skip the invisible parts + { + cy += y; + y = -y; + pSprite += (y * iPitch); + dy = 0; + } + if (y + cy > pOBD->height) + cy = pOBD->height - y; + iStartX = 0; + dx = x; + if (x < 0) + { + cx += x; + x = -x; + iStartX = x; + dx = 0; + } + if (x + cx > pOBD->width) + cx = pOBD->width - x; + for (ty=0; ty> 3]; + d = &pOBD->ucScreen[(dy>>3) * iLocalPitch + dx]; + ucSrcMask = 0x80 >> (iStartX & 7); + pix = *s++; + ucDstMask = 1 << (dy & 7); + if (iPriority) // priority color is 1 + { + for (tx=0; tx>= 1; + if (ucSrcMask == 0) // read next byte + { + ucSrcMask = 0x80; + pix = *s++; + } + } // for tx + } // priorty color 1 + else + { + for (tx=0; tx>= 1; + if (ucSrcMask == 0) // read next byte + { + ucSrcMask = 0x80; + pix = *s++; + } + } // for tx + } // priority color 0 + dy++; + pSprite += iPitch; + } // for ty +} /* obdDrawSprite() */ +// +// Draw a 16x16 tile in any of 4 rotated positions +// Assumes input image is laid out like "normal" graphics with +// the MSB on the left and 2 bytes per line +// On AVR, the source image is assumed to be in FLASH memory +// The function can draw the tile on byte boundaries, so the x value +// can be from 0 to width-16 and y can be from 0 to (height/8)-2 +// +void obdDrawTile(OBDISP *pOBD, const uint8_t *pTile, int x, int y, int iRotation, int bInvert, int bRender) +{ + uint8_t ucTemp[32]; // prepare LCD data here + uint8_t i, j, k, iOffset, ucMask, uc, ucPixels; + uint8_t bFlipX=0, bFlipY=0; + + if (x < 0 || y < 0 || y > (pOBD->height/8)-2 || x > pOBD->width-16) + return; // out of bounds + if (pTile == NULL) return; // bad pointer; really? :( + if (iRotation == ANGLE_180 || iRotation == ANGLE_270 || iRotation == ANGLE_FLIPX) + bFlipX = 1; + if (iRotation == ANGLE_180 || iRotation == ANGLE_270 || iRotation == ANGLE_FLIPY) + bFlipY = 1; + + memset(ucTemp, 0, sizeof(ucTemp)); // we only set white pixels, so start from black + if (iRotation == ANGLE_0 || iRotation == ANGLE_180 || iRotation == ANGLE_FLIPX || iRotation == ANGLE_FLIPY) + { + for (j=0; j<16; j++) // y + { + for (i=0; i<16; i+=8) // x + { + ucPixels = pgm_read_byte((uint8_t*)pTile++); + ucMask = 0x80; // MSB is the first source pixel + for (k=0; k<8; k++) + { + if (ucPixels & ucMask) // translate the pixel + { + if (bFlipY) + uc = 0x80 >> (j & 7); + else + uc = 1 << (j & 7); + iOffset = i+k; + if (bFlipX) iOffset = 15-iOffset; + iOffset += (j & 8)<<1; // top/bottom half of output + if (bFlipY) + iOffset ^= 16; + ucTemp[iOffset] |= uc; + } + ucMask >>= 1; + } // for k + } // for i + } // for j + } + else // rotated 90/270 + { + for (j=0; j<16; j++) // y + { + for (i=0; i<16; i+=8) // x + { + ucPixels = pgm_read_byte((uint8_t*)pTile++); + ucMask = 0x80; // MSB is the first source pixel + for (k=0; k<8; k++) + { + if (ucPixels & ucMask) // translate the pixel + { + if (bFlipY) + uc = 0x80 >> k; + else + uc = 1 << k; + iOffset = 15-j; + if (bFlipX) iOffset = 15-iOffset; + iOffset += i<<1; // top/bottom half of output + if (bFlipY) + iOffset ^= 16; + ucTemp[iOffset] |= uc; + } + ucMask >>= 1; + } // for k + } // for i + } // for j + } + if (bInvert) InvertBytes(ucTemp, 32); + // Send the data to the display + obdSetPosition(pOBD, x, y, bRender); + obdWriteDataBlock(pOBD, ucTemp, 16, bRender); // top half + obdSetPosition(pOBD, x,y+1, bRender); + obdWriteDataBlock(pOBD, &ucTemp[16], 16, bRender); // bottom half +} /* obdDrawTile() */ + +// Set (or clear) an individual pixel +// The local copy of the frame buffer is used to avoid +// reading data from the display controller +int obdSetPixel(OBDISP *pOBD, int x, int y, unsigned char ucColor, int bRender) +{ +int i; +unsigned char uc, ucOld; +int iPitch, iSize; + + iPitch = pOBD->width; + iSize = iPitch * (pOBD->height/8); + + i = ((y >> 3) * iPitch) + x; + if (i < 0 || i > iSize-1) // off the screen + return -1; + obdSetPosition(pOBD, x, y>>3, bRender); + + if (pOBD->ucScreen) + uc = ucOld = pOBD->ucScreen[i]; + else + uc = ucOld = 0; + + uc &= ~(0x1 << (y & 7)); + if (ucColor) + { + uc |= (0x1 << (y & 7)); + } + if (uc != ucOld) // pixel changed + { +// obdSetPosition(x, y>>3); + if (pOBD->ucScreen) + { + obdWriteDataBlock(pOBD, &uc, 1, bRender); + pOBD->ucScreen[i] = uc; + } + } + return 0; +} /* obdSetPixel() */ + +// +// Invert font data +// +void InvertBytes(uint8_t *pData, uint8_t bLen) +{ +uint8_t i; + for (i=0; iwidth; + i16 = pgm_read_word(pBMP); + if (i16 != 0x4d42) // must start with 'BM' + return -1; // not a BMP file + cx = pgm_read_word(pBMP + 18); + if (cx + dx > pOBD->width) // must fit on the display + return -1; + cy = pgm_read_word(pBMP + 22); + if (cy < 0) cy = -cy; + else bFlipped = true; + if (cy + dy > pOBD->height) // must fit on the display + return -1; + i16 = pgm_read_word(pBMP + 28); + if (i16 != 1) // must be 1 bit per pixel + return -1; + iOffBits = pgm_read_word(pBMP + 10); + iPitch = (((cx+7)>>3) + 3) & 0xfffc; // must be DWORD aligned + if (bFlipped) + { + iOffBits += ((cy-1) * iPitch); // start from bottom + iPitch = -iPitch; + } + + for (y=0; yucScreen) + d = &pOBD->ucScreen[(((y+dy)>>3)*iDestPitch)+dx]; + else + { + d = u8Cache; + if ((y & 7) == 0) + memset(u8Cache, 0, sizeof(u8Cache)); + } + s = &pBMP[iOffBits + (y*iPitch)]; + src_mask = 0; + for (x=0; x>= 1; + } // for x + if (pOBD->ucScreen == NULL && ((y & 7) == 7 || y == cy-1)) // dump to LCD + { + obdSetPosition(pOBD, dx, (y+dy)>>3, 1); + obdWriteDataBlock(pOBD, u8Cache, cx, 1); + } + } // for y + return 0; +} /* obdLoadBMP() */ +// +// Set the current cursor position +// The column represents the pixel column (0-127) +// The row represents the text row (0-7) +// +void obdSetCursor(OBDISP *pOBD, int x, int y) +{ + pOBD->iCursorX = x; + pOBD->iCursorY = y; +} /* obdSetCursor() */ +// +// Turn text wrap on or off for the oldWriteString() function +// +void obdSetTextWrap(OBDISP *pOBD, int bWrap) +{ + pOBD->wrap = bWrap; +} /* obdSetTextWrap() */ +// +// Draw a string with a fractional scale in both dimensions +// the scale is a 16-bit integer with and 8-bit fraction and 8-bit mantissa +// To draw at 1x scale, set the scale factor to 256. To draw at 2x, use 512 +// The output must be drawn into a memory buffer, not directly to the display +// +int obdScaledString(OBDISP *pOBD, int x, int y, char *szMsg, int iSize, int bInvert, int iXScale, int iYScale, int iRotation) +{ +uint32_t row, col, dx, dy; +uint32_t sx, sy; +uint8_t c, uc, color, *d; +const uint8_t *s; +uint8_t ucTemp[16]; +int tx, ty, bit, iFontOff; +int iPitch; +int iFontWidth; + + if (iXScale == 0 || iYScale == 0 || szMsg == NULL || pOBD == NULL || pOBD->ucScreen == NULL || x < 0 || y < 0 || x >= pOBD->width-1 || y >= pOBD->height-1) + return -1; // invalid display structure + if (iSize != FONT_8x8 && iSize != FONT_6x8) + return -1; // only on the small fonts (for now) + iFontWidth = (iSize == FONT_6x8) ? 6:8; + s = (iSize == FONT_6x8) ? ucSmallFont : ucFont; + iPitch = pOBD->width; + dx = (iFontWidth * iXScale) >> 8; // width of each character + dy = (8 * iYScale) >> 8; // height of each character + sx = 65536 / iXScale; // turn the scale into an accumulator value + sy = 65536 / iYScale; + while (*szMsg) { + c = *szMsg++; // debug - start with normal font + iFontOff = (int)(c-32) * (iFontWidth-1); + // we can't directly use the pointer to FLASH memory, so copy to a local buffer + ucTemp[0] = 0; // first column is blank + memcpy_P(&ucTemp[1], &s[iFontOff], iFontWidth-1); + if (bInvert) InvertBytes(ucTemp, iFontWidth); + col = 0; + for (tx=0; tx<(int)dx; tx++) { + row = 0; + uc = ucTemp[col >> 8]; + for (ty=0; ty<(int)dy; ty++) { + int nx=0, ny=0; + bit = row >> 8; + color = (uc & (1 << bit)); // set or clear the pixel + switch (iRotation) { + case ROT_0: + nx = x + tx; + ny = y + ty; + break; + case ROT_90: + nx = x - ty; + ny = y + tx; + break; + case ROT_180: + nx = x - tx; + ny = y - ty; + break; + case ROT_270: + nx = x + ty; + ny = y - tx; + break; + } // switch on rotation direction + // plot the pixel if it's within the image boundaries + if (nx >= 0 && ny >= 0 && nx < pOBD->width && ny < pOBD->height) { + d = &pOBD->ucScreen[(ny >> 3) * iPitch + nx]; + if (color) + d[0] |= (1 << (ny & 7)); + else + d[0] &= ~(1 << (ny & 7)); + } + row += sy; // add fractional increment to source row of character + } // for ty + col += sx; // add fractional increment to source column + } // for tx + // update the 'cursor' position + switch (iRotation) { + case ROT_0: + x += dx; + break; + case ROT_90: + y += dx; + break; + case ROT_180: + x -= dx; + break; + case ROT_270: + y -= dx; + break; + } // switch on rotation + } // while (*szMsg) + return 0; +} /* obdScaledString() */ + +// +// Draw a string of normal (8x8), small (6x8) or large (16x32) characters +// At the given col+row +// +int obdWriteString(OBDISP *pOBD, int iScroll, int x, int y, char *szMsg, int iSize, int bInvert, int bRender) +{ +int i, iFontOff, iLen, iFontSkip; +unsigned char c, *s, ucTemp[40]; + + if (x == -1 || y == -1) // use the cursor position + { + x = pOBD->iCursorX; y = pOBD->iCursorY; + } + else + { + pOBD->iCursorX = x; pOBD->iCursorY = y; // set the new cursor position + } + if (pOBD->iCursorX >= pOBD->width || pOBD->iCursorY >= pOBD->height / 8) + return -1; // can't draw off the display + + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + if (iSize == FONT_8x8) // 8x8 font + { + i = 0; + iFontSkip = iScroll & 7; // number of columns to initially skip + while (pOBD->iCursorX < pOBD->width && szMsg[i] != 0 && pOBD->iCursorY < pOBD->height / 8) + { + if (iScroll < 8) // only display visible characters + { + c = (unsigned char)szMsg[i]; + iFontOff = (int)(c-32) * 7; + // we can't directly use the pointer to FLASH memory, so copy to a local buffer + ucTemp[0] = 0; // first column is blank + memcpy_P(&ucTemp[1], &ucFont[iFontOff], 7); + if (bInvert) InvertBytes(ucTemp, 8); + iLen = 8 - iFontSkip; + if (pOBD->iCursorX + iLen > pOBD->width) // clip right edge + iLen = pOBD->width - pOBD->iCursorX; + obdCachedWrite(pOBD, &ucTemp[iFontSkip], iLen, bRender); +// obdWriteDataBlock(pOBD, &ucTemp[iFontSkip], iLen, bRender); // write character pattern + pOBD->iCursorX += iLen; + if (pOBD->iCursorX >= pOBD->width-7 && pOBD->wrap) // word wrap enabled? + { + pOBD->iCursorX = 0; // start at the beginning of the next line + pOBD->iCursorY++; + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + } + iFontSkip = 0; + } + iScroll -= 8; + i++; + } // while + obdCachedFlush(pOBD, bRender); // write any remaining data + return 0; + } // 8x8 +#ifndef __AVR__ + else if (iSize == FONT_16x32) + { + i = 0; + iFontSkip = iScroll & 15; // number of columns to initially skip + while (pOBD->iCursorX < pOBD->width && pOBD->iCursorY < (pOBD->height / 8)-3 && szMsg[i] != 0) + { + if (iScroll < 16) // if characters are visible + { + s = (unsigned char *)&ucBigFont[(unsigned char)(szMsg[i]-32)*64]; + iLen = 16 - iFontSkip; + if (pOBD->iCursorX + iLen > pOBD->width) // clip right edge + iLen = pOBD->width - pOBD->iCursorX; + // we can't directly use the pointer to FLASH memory, so copy to a local buffer + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + memcpy_P(ucTemp, s, 16); + if (bInvert) InvertBytes(ucTemp, 16); + obdWriteDataBlock(pOBD, &ucTemp[iFontSkip], iLen, bRender); // write character pattern + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY+1, bRender); + memcpy_P(ucTemp, s+16, 16); + if (bInvert) InvertBytes(ucTemp, 16); + obdWriteDataBlock(pOBD, &ucTemp[iFontSkip], iLen, bRender); // write character pattern +// if (pOBD->iCursorY <= 5) + { + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY+2, bRender); + memcpy_P(ucTemp, s+32, 16); + if (bInvert) InvertBytes(ucTemp, 16); + obdWriteDataBlock(pOBD, &ucTemp[iFontSkip], iLen, bRender); // write character pattern + } +// if (pOBD->iCursorY <= 4) + { + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY+3, bRender); + memcpy_P(ucTemp, s+48, 16); + if (bInvert) InvertBytes(ucTemp, 16); + obdWriteDataBlock(pOBD, &ucTemp[iFontSkip], iLen, bRender); // write character pattern + } + pOBD->iCursorX += iLen; + if (pOBD->iCursorX >= pOBD->width-15 && pOBD->wrap) // word wrap enabled? + { + pOBD->iCursorX = 0; // start at the beginning of the next line + pOBD->iCursorY+=4; + } + iFontSkip = 0; + } // if character visible from scrolling + iScroll -= 16; + i++; + } // while + return 0; + } // 16x32 +#endif // !__AVR__ + else if (iSize == FONT_16x16) // 8x8 stretched to 16x16 + { + i = 0; + iFontSkip = iScroll & 15; // number of columns to initially skip + while (pOBD->iCursorX < pOBD->width && pOBD->iCursorY < (pOBD->height/8)-1 && szMsg[i] != 0) + { +// stretch the 'normal' font instead of using the big font + if (iScroll < 16) // if characters are visible + { + int tx, ty; + c = szMsg[i] - 32; + unsigned char uc1, uc2, ucMask, *pDest; + s = (unsigned char *)&ucFont[(int)c*7]; + ucTemp[0] = 0; // first column is blank + memcpy_P(&ucTemp[1], s, 7); + if (bInvert) + InvertBytes(ucTemp, 8); + // Stretch the font to double width + double height + memset(&ucTemp[8], 0, 32); // write 32 new bytes + for (tx=0; tx<8; tx++) + { + ucMask = 3; + pDest = &ucTemp[8+tx*2]; + uc1 = uc2 = 0; + c = ucTemp[tx]; + for (ty=0; ty<4; ty++) + { + if (c & (1 << ty)) // a bit is set + uc1 |= ucMask; + if (c & (1 << (ty + 4))) + uc2 |= ucMask; + ucMask <<= 2; + } + pDest[0] = uc1; + pDest[1] = uc1; // double width + pDest[16] = uc2; + pDest[17] = uc2; + } + iLen = 16 - iFontSkip; + if (pOBD->iCursorX + iLen > pOBD->width) // clip right edge + iLen = pOBD->width - pOBD->iCursorX; + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + obdWriteDataBlock(pOBD, &ucTemp[8+iFontSkip], iLen, bRender); + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY+1, bRender); + obdWriteDataBlock(pOBD, &ucTemp[24+iFontSkip], iLen, bRender); + pOBD->iCursorX += iLen; + if (pOBD->iCursorX >= pOBD->width-15 && pOBD->wrap) // word wrap enabled? + { + pOBD->iCursorX = 0; // start at the beginning of the next line + pOBD->iCursorY += 2; + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + } + iFontSkip = 0; + } // if characters are visible + iScroll -= 16; + i++; + } // while + return 0; + } // 16x16 + else if (iSize == FONT_12x16) // 6x8 stretched to 12x16 + { + i = 0; + iFontSkip = iScroll % 12; // number of columns to initially skip + while (pOBD->iCursorX < pOBD->width && pOBD->iCursorY < (pOBD->height/8)-1 && szMsg[i] != 0) + { +// stretch the 'normal' font instead of using the big font + if (iScroll < 12) // if characters are visible + { + int tx, ty; + c = szMsg[i] - 32; + unsigned char uc1, uc2, ucMask, *pDest; + s = (unsigned char *)&ucSmallFont[(int)c*5]; + ucTemp[0] = 0; // first column is blank + memcpy_P(&ucTemp[1], s, 6); + if (bInvert) + InvertBytes(ucTemp, 6); + // Stretch the font to double width + double height + memset(&ucTemp[6], 0, 24); // write 24 new bytes + for (tx=0; tx<6; tx++) + { + ucMask = 3; + pDest = &ucTemp[6+tx*2]; + uc1 = uc2 = 0; + c = ucTemp[tx]; + for (ty=0; ty<4; ty++) + { + if (c & (1 << ty)) // a bit is set + uc1 |= ucMask; + if (c & (1 << (ty + 4))) + uc2 |= ucMask; + ucMask <<= 2; + } + pDest[0] = uc1; + pDest[1] = uc1; // double width + pDest[12] = uc2; + pDest[13] = uc2; + } + // smooth the diagonal lines + for (tx=0; tx<5; tx++) + { + uint8_t c0, c1, ucMask2; + c0 = ucTemp[tx]; + c1 = ucTemp[tx+1]; + pDest = &ucTemp[6+tx*2]; + ucMask = 1; + ucMask2 = 2; + for (ty=0; ty<7; ty++) + { + if (((c0 & ucMask) && !(c1 & ucMask) && !(c0 & ucMask2) && (c1 & ucMask2)) || (!(c0 & ucMask) && (c1 & ucMask) && (c0 & ucMask2) && !(c1 & ucMask2))) + { + if (ty < 3) // top half + { + if (bInvert) { + pDest[1] &= ~(1 << ((ty * 2)+1)); + pDest[2] &= ~(1 << ((ty * 2)+1)); + pDest[1] &= ~(1 << ((ty+1) * 2)); + pDest[2] &= ~(1 << ((ty+1) * 2)); + } else { + pDest[1] |= (1 << ((ty * 2)+1)); + pDest[2] |= (1 << ((ty * 2)+1)); + pDest[1] |= (1 << ((ty+1) * 2)); + pDest[2] |= (1 << ((ty+1) * 2)); + } + } + else if (ty == 3) // on the border + { + if (bInvert) { + pDest[1] &= ~0x80; pDest[2] &= ~0x80; + pDest[13] &= ~1; pDest[14] &= ~1; + } else { + pDest[1] |= 0x80; pDest[2] |= 0x80; + pDest[13] |= 1; pDest[14] |= 1; + } + } + else // bottom half + { + if (bInvert) { + pDest[13] &= ~(1 << (2*(ty-4)+1)); + pDest[14] &= ~(1 << (2*(ty-4)+1)); + pDest[13] &= ~(1 << ((ty-3) * 2)); + pDest[14] &= ~(1 << ((ty-3) * 2)); + } else { + pDest[13] |= (1 << (2*(ty-4)+1)); + pDest[14] |= (1 << (2*(ty-4)+1)); + pDest[13] |= (1 << ((ty-3) * 2)); + pDest[14] |= (1 << ((ty-3) * 2)); + } + } + } + else if (!(c0 & ucMask) && (c1 & ucMask) && (c0 & ucMask2) && !(c1 & ucMask2)) + { + if (ty < 4) // top half + { + if (bInvert) { + pDest[1] &= ~(1 << ((ty * 2)+1)); + pDest[2] &= ~(1 << ((ty+1) * 2)); + } else { + pDest[1] |= (1 << ((ty * 2)+1)); + pDest[2] |= (1 << ((ty+1) * 2)); + } + } + else + { + if (bInvert) { + pDest[13] &= ~(1 << (2*(ty-4)+1)); + pDest[14] &= ~(1 << ((ty-3) * 2)); + } else { + pDest[13] |= (1 << (2*(ty-4)+1)); + pDest[14] |= (1 << ((ty-3) * 2)); + } + } + } + ucMask <<= 1; ucMask2 <<= 1; + } + } + iLen = 12 - iFontSkip; + if (pOBD->iCursorX + iLen > pOBD->width) // clip right edge + iLen = pOBD->width - pOBD->iCursorX; + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + obdWriteDataBlock(pOBD, &ucTemp[6+iFontSkip], iLen, bRender); + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY+1, bRender); + obdWriteDataBlock(pOBD, &ucTemp[18+iFontSkip], iLen, bRender); + pOBD->iCursorX += iLen; + if (pOBD->iCursorX >= pOBD->width-11 && pOBD->wrap) // word wrap enabled? + { + pOBD->iCursorX = 0; // start at the beginning of the next line + pOBD->iCursorY += 2; + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + } + iFontSkip = 0; + } // if characters are visible + iScroll -= 12; + i++; + } // while + return 0; + } // 12x16 + else if (iSize == FONT_6x8) + { + i = 0; + iFontSkip = iScroll % 6; + while (pOBD->iCursorX < pOBD->width && pOBD->iCursorY < (pOBD->height/8) && szMsg[i] != 0) + { + if (iScroll < 6) // if characters are visible + { + c = szMsg[i] - 32; + // we can't directly use the pointer to FLASH memory, so copy to a local buffer + ucTemp[0] = 0; // first column is blank + memcpy_P(&ucTemp[1], &ucSmallFont[(int)c*5], 5); + if (bInvert) InvertBytes(ucTemp, 6); + iLen = 6 - iFontSkip; + if (pOBD->iCursorX + iLen > pOBD->width) // clip right edge + iLen = pOBD->width - pOBD->iCursorX; + obdCachedWrite(pOBD, &ucTemp[iFontSkip], iLen, bRender); +// obdWriteDataBlock(pOBD, &ucTemp[iFontSkip], iLen, bRender); // write character pattern + pOBD->iCursorX += iLen; + iFontSkip = 0; + if (pOBD->iCursorX >= pOBD->width-5 && pOBD->wrap) // word wrap enabled? + { + pOBD->iCursorX = 0; // start at the beginning of the next line + pOBD->iCursorY++; + obdSetPosition(pOBD, pOBD->iCursorX, pOBD->iCursorY, bRender); + } + } // if characters are visible + iScroll -= 6; + i++; + } + obdCachedFlush(pOBD, bRender); // write any remaining data + return 0; + } // 6x8 + return -1; // invalid size +} /* obdWriteString() */ +// +// Get the width of text in a custom font +// +void obdGetStringBox(GFXfont *pFont, char *szMsg, int *width, int *top, int *bottom) +{ +int cx = 0; +int c, i = 0; +GFXglyph *pGlyph; +int miny, maxy; + + if (width == NULL || top == NULL || bottom == NULL || pFont == NULL || szMsg == NULL) return; // bad pointers + miny = 100; maxy = 0; + while (szMsg[i]) { + c = szMsg[i++]; + if (c < pFont->first || c > pFont->last) // undefined character + continue; // skip it + c -= pFont->first; // first char of font defined + pGlyph = &pFont->glyph[c]; + cx += pGlyph->xAdvance; + if (pGlyph->yOffset < miny) miny = pGlyph->yOffset; + if (pGlyph->height+pGlyph->yOffset > maxy) maxy = pGlyph->height+pGlyph->yOffset; + } + *width = cx; + *top = miny; + *bottom = maxy; +} /* obdGetStringBox() */ + +// +// Draw a string of characters in a custom font +// A back buffer must be defined +// +int obdWriteStringCustom(OBDISP *pOBD, GFXfont *pFont, int x, int y, char *szMsg, uint8_t ucColor) +{ +int i, end_y, dx, dy, tx, ty, c, iBitOff; +uint8_t *s, *d, bits, ucMask, ucClr, uc; +GFXfont font; +GFXglyph glyph, *pGlyph; +int iPitch; + + if (pOBD == NULL || pFont == NULL || pOBD->ucScreen == NULL || x < 0) + return -1; + iPitch = pOBD->width; + // in case of running on AVR, get copy of data from FLASH + memcpy_P(&font, pFont, sizeof(font)); + pGlyph = &glyph; + + i = 0; + while (szMsg[i] && x < pOBD->width) + { + c = szMsg[i++]; + if (c < font.first || c > font.last) // undefined character + continue; // skip it + c -= font.first; // first char of font defined + memcpy_P(&glyph, &font.glyph[c], sizeof(glyph)); + dx = x + pGlyph->xOffset; // offset from character UL to start drawing + dy = y + pGlyph->yOffset; + s = font.bitmap + pGlyph->bitmapOffset; // start of bitmap data + // Bitmap drawing loop. Image is MSB first and each pixel is packed next + // to the next (continuing on to the next character line) + iBitOff = 0; // bitmap offset (in bits) + bits = uc = 0; // bits left in this font byte + end_y = dy + pGlyph->height; + if (dy < 0) { // skip these lines + iBitOff += (pGlyph->width * (-dy)); + dy = 0; + } + for (ty=dy; tyheight; ty++) { + ucMask = 1<<(ty & 7); // destination bit number for this line + ucClr = (ucColor) ? ucMask : 0; + d = &pOBD->ucScreen[(ty >> 3) * iPitch + dx]; // internal buffer dest + for (tx=0; txwidth; tx++) { + if (uc == 0) { // need to read more font data + tx += bits; // skip any remaining 0 bits + uc = pgm_read_byte(&s[iBitOff>>3]); // get more font bitmap data + bits = 8 - (iBitOff & 7); // we might not be on a byte boundary + iBitOff += bits; // because of a clipped line + uc <<= (8-bits); + if (tx >= pGlyph->width) { + while(tx >= pGlyph->width) { // rolls into next line(s) + tx -= pGlyph->width; + ty++; + } + if (ty >= end_y || ty >= pOBD->height) { // we're past the end + tx = pGlyph->width; + continue; // exit this character cleanly + } + // need to recalculate mask and offset in case Y changed + ucMask = 1<<(ty & 7); // destination bit number for this line + ucClr = (ucColor) ? ucMask : 0; + d = &pOBD->ucScreen[(ty >> 3) * iPitch + dx]; // internal buffer dest + } + } // if we ran out of bits + if (uc & 0x80) { // set pixel + if (ucClr) + d[tx] |= ucMask; + else + d[tx] &= ~ucMask; + } + bits--; // next bit + uc <<= 1; + } // for x + } // for y + x += pGlyph->xAdvance; // width of this character + } // while drawing characters + return 0; +} /* obdWriteStringCustom() */ + +// +// Render a sprite/rectangle of pixels from a provided buffer to the display. +// The row values refer to byte rows, not pixel rows due to the memory +// layout of OLEDs and LCDs. +// returns 0 for success, -1 for invalid parameter +// +int obdDrawGFX(OBDISP *pOBD, uint8_t *pBuffer, int iSrcCol, int iSrcRow, int iDestCol, int iDestRow, int iWidth, int iHeight, int iSrcPitch) +{ + int y; + + if (iSrcCol < 0 || iSrcCol >= pOBD->width || iSrcRow < 0 || iSrcRow > (pOBD->height/8)-1 || iDestCol < 0 || iDestCol >= pOBD->width || iDestRow < 0 || iDestRow >= (pOBD->height >> 3) || iSrcPitch <= 0) + return -1; // invalid + + for (y=iSrcRow; yiCursorX = pOBD->iCursorY = 0; + if (pOBD->type == LCD_VIRTUAL || pOBD->type >= SHARP_144x168) // pure memory, handle it differently + { + if (pOBD->ucScreen) + memset(pOBD->ucScreen, ucData, pOBD->width * (pOBD->height/8)); + return; + } + iLines = pOBD->height >> 3; + memset(u8Cache, ucData, pOBD->width); + + for (y=0; ywidth, bRender); + } // for y + if (pOBD->ucScreen) + memset(pOBD->ucScreen, ucData, (pOBD->width * pOBD->height)/8); +} /* obdFill() */ + +// +// Provide or revoke a back buffer for your OLED graphics +// This allows you to manage the RAM used by ss_oled on tiny +// embedded platforms like the ATmega series +// Pass NULL to revoke the buffer. Make sure you provide a buffer +// large enough for your display (e.g. 128x64 needs 1K - 1024 bytes) +// +void obdSetBackBuffer(OBDISP *pOBD, uint8_t *pBuffer) +{ + pOBD->ucScreen = pBuffer; +} /* obdSetBackBuffer() */ + +void obdDrawLine(OBDISP *pOBD, int x1, int y1, int x2, int y2, uint8_t ucColor, int bRender) +{ + int temp; + int dx = x2 - x1; + int dy = y2 - y1; + int error; + uint8_t *p, *pStart, mask, bOld, bNew; + int xinc, yinc; + int y, x; + int iPitch = pOBD->width; + + if (x1 < 0 || x2 < 0 || y1 < 0 || y2 < 0 || x1 >= pOBD->width || x2 >= pOBD->width || y1 >= pOBD->height || y2 >= pOBD->height) + return; + + if(abs(dx) > abs(dy)) { + // X major case + if(x2 < x1) { + dx = -dx; + temp = x1; + x1 = x2; + x2 = temp; + temp = y1; + y1 = y2; + y2 = temp; + } + + y = y1; + dy = (y2 - y1); + error = dx >> 1; + yinc = 1; + if (dy < 0) + { + dy = -dy; + yinc = -1; + } + p = pStart = &pOBD->ucScreen[x1 + ((y >> 3) * iPitch)]; // point to current spot in back buffer + mask = 1 << (y & 7); // current bit offset + for(x=x1; x1 <= x2; x1++) { + if (ucColor) + *p++ |= mask; // set pixel and increment x pointer + else + *p++ &= ~mask; + error -= dy; + if (error < 0) + { + error += dx; + if (yinc > 0) + mask <<= 1; + else + mask >>= 1; + if (mask == 0) // we've moved outside the current row, write the data we changed + { + obdSetPosition(pOBD, x, y>>3, bRender); + obdWriteDataBlock(pOBD, pStart, (int)(p-pStart), bRender); // write the row we changed + x = x1+1; // we've already written the byte at x1 + y1 = y+yinc; + p += (yinc > 0) ? iPitch : -iPitch; + pStart = p; + mask = 1 << (y1 & 7); + } + y += yinc; + } + } // for x1 + if (p != pStart) // some data needs to be written + { + obdSetPosition(pOBD, x, y>>3, bRender); + obdWriteDataBlock(pOBD, pStart, (int)(p-pStart), bRender); + } + } + else { + // Y major case + if(y1 > y2) { + dy = -dy; + temp = x1; + x1 = x2; + x2 = temp; + temp = y1; + y1 = y2; + y2 = temp; + } + + p = &pOBD->ucScreen[x1 + ((y1 >> 3) * iPitch)]; // point to current spot in back buffer + bOld = bNew = p[0]; // current data at that address + mask = 1 << (y1 & 7); // current bit offset + dx = (x2 - x1); + error = dy >> 1; + xinc = 1; + if (dx < 0) + { + dx = -dx; + xinc = -1; + } + for(x = x1; y1 <= y2; y1++) { + if (ucColor) + bNew |= mask; // set the pixel + else + bNew &= ~mask; + error -= dx; + mask <<= 1; // y1++ + if (mask == 0) // we're done with this byte, write it if necessary + { + if (bOld != bNew) + { + p[0] = bNew; // save to RAM + obdSetPosition(pOBD, x, y1>>3, bRender); + obdWriteDataBlock(pOBD, &bNew, 1, bRender); + } + p += iPitch; // next line + bOld = bNew = p[0]; + mask = 1; // start at LSB again + } + if (error < 0) + { + error += dy; + if (bOld != bNew) // write the last byte we modified if it changed + { + p[0] = bNew; // save to RAM + obdSetPosition(pOBD, x, y1>>3, bRender); + obdWriteDataBlock(pOBD, &bNew, 1, bRender); + } + p += xinc; + x += xinc; + bOld = bNew = p[0]; + } + } // for y + if (bOld != bNew) // write the last byte we modified if it changed + { + p[0] = bNew; // save to RAM + obdSetPosition(pOBD, x, y2>>3, bRender); + obdWriteDataBlock(pOBD, &bNew, 1, bRender); + } + } // y major case +} /* obdDrawLine() */ + +// +// For drawing ellipses, a circle is drawn and the x and y pixels are scaled by a 16-bit integer fraction +// This function draws a single pixel and scales its position based on the x/y fraction of the ellipse +// +static void DrawScaledPixel(OBDISP *pOBD, int iCX, int iCY, int x, int y, int32_t iXFrac, int32_t iYFrac, uint8_t ucColor) +{ + uint8_t *d, ucMask; + int iPitch; + + iPitch = pOBD->width; + if (iXFrac != 0x10000) x = ((x * iXFrac) >> 16); + if (iYFrac != 0x10000) y = ((y * iYFrac) >> 16); + x += iCX; y += iCY; + if (x < 0 || x >= pOBD->width || y < 0 || y >= pOBD->height) + return; // off the screen + d = &pOBD->ucScreen[((y >> 3)*iPitch) + x]; + ucMask = 1 << (y & 7); + if (ucColor) + *d |= ucMask; + else + *d &= ~ucMask; +} /* DrawScaledPixel() */ +// +// For drawing filled ellipses +// +static void DrawScaledLine(OBDISP *pOBD, int iCX, int iCY, int x, int y, int32_t iXFrac, int32_t iYFrac, uint8_t ucColor) +{ + int iLen, x2; + uint8_t *d, ucMask; + int iPitch; + + iPitch = pOBD->width; + if (iXFrac != 0x10000) x = ((x * iXFrac) >> 16); + if (iYFrac != 0x10000) y = ((y * iYFrac) >> 16); + iLen = x*2; + x = iCX - x; y += iCY; + x2 = x + iLen; + if (y < 0 || y >= pOBD->height) + return; // completely off the screen + if (x < 0) x = 0; + if (x2 >= pOBD->width) x2 = pOBD->width-1; + iLen = x2 - x + 1; // new length + d = &pOBD->ucScreen[((y >> 3)*iPitch) + x]; + ucMask = 1 << (y & 7); + if (ucColor) // white + { + for (; iLen > 0; iLen--) + *d++ |= ucMask; + } + else // black + { + for (; iLen > 0; iLen--) + *d++ &= ~ucMask; + } +} /* DrawScaledLine() */ +// +// Draw the 8 pixels around the Bresenham circle +// (scaled to make an ellipse) +// +static void BresenhamCircle(OBDISP *pOBD, int iCX, int iCY, int x, int y, int32_t iXFrac, int32_t iYFrac, uint8_t ucColor, uint8_t bFill) +{ + if (bFill) // draw a filled ellipse + { + // for a filled ellipse, draw 4 lines instead of 8 pixels + DrawScaledLine(pOBD, iCX, iCY, x, y, iXFrac, iYFrac, ucColor); + DrawScaledLine(pOBD, iCX, iCY, x, -y, iXFrac, iYFrac, ucColor); + DrawScaledLine(pOBD, iCX, iCY, y, x, iXFrac, iYFrac, ucColor); + DrawScaledLine(pOBD, iCX, iCY, y, -x, iXFrac, iYFrac, ucColor); + } + else // draw 8 pixels around the edges + { + DrawScaledPixel(pOBD, iCX, iCY, x, y, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, -x, y, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, x, -y, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, -x, -y, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, y, x, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, -y, x, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, y, -x, iXFrac, iYFrac, ucColor); + DrawScaledPixel(pOBD, iCX, iCY, -y, -x, iXFrac, iYFrac, ucColor); + } +} /* BresenhamCircle() */ + +// +// Draw an outline or filled ellipse +// +void obdEllipse(OBDISP *pOBD, int iCenterX, int iCenterY, int32_t iRadiusX, int32_t iRadiusY, uint8_t ucColor, uint8_t bFilled) +{ + int32_t iXFrac, iYFrac; + int iRadius, iDelta, x, y; + + if (pOBD == NULL || pOBD->ucScreen == NULL) + return; // must have back buffer defined + if (iRadiusX <= 0 || iRadiusY <= 0) return; // invalid radii + + if (iRadiusX > iRadiusY) // use X as the primary radius + { + iRadius = iRadiusX; + iXFrac = 65536; + iYFrac = (iRadiusY * 65536) / iRadiusX; + } + else + { + iRadius = iRadiusY; + iXFrac = (iRadiusX * 65536) / iRadiusY; + iYFrac = 65536; + } + iDelta = 3 - (2 * iRadius); + x = 0; y = iRadius; + while (x <= y) + { + BresenhamCircle(pOBD, iCenterX, iCenterY, x, y, iXFrac, iYFrac, ucColor, bFilled); + x++; + if (iDelta < 0) + { + iDelta += (4*x) + 6; + } + else + { + iDelta += 4 * (x-y) + 10; + y--; + } + } +} /* obdEllipse() */ +// +// Draw an outline or filled rectangle +// +void obdRectangle(OBDISP *pOBD, int x1, int y1, int x2, int y2, uint8_t ucColor, uint8_t bFilled) +{ + uint8_t *d, ucMask, ucMask2; + int tmp, iOff; + int iPitch; + + if (pOBD == NULL || pOBD->ucScreen == NULL) + return; // only works with a back buffer + if (x1 < 0 || y1 < 0 || x2 < 0 || y2 < 0 || + x1 >= pOBD->width || y1 >= pOBD->height || x2 >= pOBD->width || y2 >= pOBD->height) return; // invalid coordinates + iPitch = pOBD->width; + // Make sure that X1/Y1 is above and to the left of X2/Y2 + // swap coordinates as needed to make this true + if (x2 < x1) + { + tmp = x1; + x1 = x2; + x2 = tmp; + } + if (y2 < y1) + { + tmp = y1; + y1 = y2; + y2 = tmp; + } + if (bFilled) + { + int x, y, iMiddle; + iMiddle = (y2 >> 3) - (y1 >> 3); + ucMask = 0xff << (y1 & 7); + if (iMiddle == 0) // top and bottom lines are in the same row + ucMask &= (0xff >> (7-(y2 & 7))); + d = &pOBD->ucScreen[(y1 >> 3)*iPitch + x1]; + // Draw top + for (x = x1; x <= x2; x++) + { + if (ucColor) + *d |= ucMask; + else + *d &= ~ucMask; + d++; + } + if (iMiddle > 1) // need to draw middle part + { + ucMask = (ucColor) ? 0xff : 0x00; + for (y=1; yucScreen[(y1 >> 3)*iPitch + x1 + (y*iPitch)]; + for (x = x1; x <= x2; x++) + *d++ = ucMask; + } + } + if (iMiddle >= 1) // need to draw bottom part + { + ucMask = 0xff >> (7-(y2 & 7)); + d = &pOBD->ucScreen[(y2 >> 3)*iPitch + x1]; + for (x = x1; x <= x2; x++) + { + if (ucColor) + *d++ |= ucMask; + else + *d++ &= ~ucMask; + } + } + } + else // outline + { + // see if top and bottom lines are within the same byte rows + d = &pOBD->ucScreen[(y1 >> 3)*iPitch + x1]; + if ((y1 >> 3) == (y2 >> 3)) + { + ucMask2 = 0xff << (y1 & 7); // L/R end masks + ucMask = 1 << (y1 & 7); + ucMask |= 1 << (y2 & 7); + ucMask2 &= (0xff >> (7-(y2 & 7))); + if (ucColor) + { + *d++ |= ucMask2; // start + x1++; + for (; x1 < x2; x1++) + *d++ |= ucMask; + if (x1 <= x2) + *d++ |= ucMask2; // right edge + } + else + { + *d++ &= ~ucMask2; + x1++; + for (; x1 < x2; x1++) + *d++ &= ~ucMask; + if (x1 <= x2) + *d++ &= ~ucMask2; // right edge + } + } + else + { + int y; + // L/R sides + iOff = (x2 - x1); + ucMask = 1 << (y1 & 7); + for (y=y1; y <= y2; y++) + { + if (ucColor) { + *d |= ucMask; + d[iOff] |= ucMask; + } else { + *d &= ~ucMask; + d[iOff] &= ~ucMask; + } + ucMask <<= 1; + if (ucMask == 0) { + ucMask = 1; + d += iPitch; + } + } + // T/B sides + ucMask = 1 << (y1 & 7); + ucMask2 = 1 << (y2 & 7); + x1++; + d = &pOBD->ucScreen[(y1 >> 3)*iPitch + x1]; + iOff = (y2 >> 3) - (y1 >> 3); + iOff *= iPitch; + for (; x1 < x2; x1++) + { + if (ucColor) { + *d |= ucMask; + d[iOff] |= ucMask2; + } else { + *d &= ~ucMask; + d[iOff] &= ~ucMask2; + } + d++; + } + } + } // outline +} /* obdRectangle() */ +// +// Copy the current bitmap buffer from its native form (LSB_FIRST, VERTICAL_BYTES) to the requested form +// returns 0 for success, -1 for error +// Constants to be combined for the iFlags parameter: +// Output format options - +// OBD_LSB_FIRST 0x001 +// OBD_MSB_FIRST 0x002 +// OBD_VERT_BYTES 0x004 +// OBD_HORZ_BYTES 0x008 +// Orientation Options - +// OBD_ROTATE_90 0x010 +// OBD_FLIP_VERT 0x020 +// OBD_FLIP_HORZ 0x040 +// Polarity Options - +// OBD_INVERT 0x080 +int obdCopy(OBDISP *pOBD, int iFlags, uint8_t *pDestination) +{ +int i, x, y, iPitch, iSize; +int xStart, xEnd, yStart, yEnd, yDst, xDst, dx, dy; +uint8_t ucSrcMask, ucDstMask, *s, *d; + + if (pDestination == NULL || pOBD == NULL || pOBD->ucScreen == NULL) + return -1; + // calculate output buffer size + iPitch = pOBD->width; + if (iFlags & OBD_HORZ_BYTES) { + if (iFlags & OBD_ROTATE_90) + iSize = ((pOBD->height + 7)>>3) * pOBD->width; + else + iSize = ((pOBD->width + 7)>>3) * pOBD->height; + } else { + if (iFlags & OBD_ROTATE_90) + iSize = (pOBD->height * ((pOBD->width+7)>>3)); + else + iSize = (pOBD->width * ((pOBD->height+7)>>3)); + } + memset(pDestination, 0, iSize); // start with 0 in dest + // Prepare vars for walking through the source image + if (iFlags & OBD_ROTATE_90) { + if (iFlags & OBD_FLIP_HORZ) { + dy = 1; + yStart = 0; + yEnd = pOBD->height; + } else { + dy = -1; + yStart = pOBD->height-1; + yEnd = -1; + } + if (iFlags & OBD_FLIP_VERT) { + dx = -1; + xStart = pOBD->width-1; + xEnd = -1; + } else { + dx = 1; + xStart = 0; + xEnd = pOBD->width; + } + } else { // not rotated + if (iFlags & OBD_FLIP_HORZ) { + dx = -1; + xStart = pOBD->width-1; + xEnd = -1; + } else { + dx = 1; + xStart = 0; + xEnd = pOBD->width; + } + if (iFlags & OBD_FLIP_VERT) { + dy = -1; + yStart = pOBD->height-1; + yEnd = -1; + } else { + dy = 1; + yStart = 0; + yEnd = pOBD->height; + } + } + // Due to the possible number of permutations, the different loops + // are more generic and handle flips/bit-direction with a more general + // approach which moves individual pixels even when a more efficient + // method is possible. More cycles, but able to do EVERYTHING +// Separate output by byte orientation + // Vertical bytes here + if (iFlags & OBD_VERT_BYTES) + { + if (iFlags & OBD_ROTATE_90) + { + xDst = 0; + for (y=yStart; y!=yEnd; y += dy, xDst++) { + ucSrcMask = (1 << (y & 7)); + yDst = 0; + s = &pOBD->ucScreen[(y >> 3) * iPitch]; + d = &pDestination[xDst]; + for (x=xStart; x!=xEnd; x += dx, yDst++) { + if (s[x] & ucSrcMask) {// set pixel, copy to dest + if (iFlags & OBD_LSB_FIRST) + d[(yDst >> 3)*pOBD->height] |= (1 << (yDst & 7)); + else + d[(yDst >> 3)*pOBD->height] |= (0x80 >> (yDst & 7)); + } + } // for x + } // for y + } // rotate 90 + else // normally oriented + { + yDst = 0; + for (y=yStart; y!=yEnd; y += dy, yDst++) { + ucSrcMask = (1 << (y & 7)); + if (iFlags & OBD_LSB_FIRST) + ucDstMask = (1 << (y & 7)); + else + ucDstMask = (0x80 >> (y & 7)); + xDst = 0; + s = &pOBD->ucScreen[(y >> 3) * iPitch]; + d = &pDestination[(yDst >> 3) * iPitch]; + for (x=xStart; x!=xEnd; x += dx, xDst++) { + if (s[x] & ucSrcMask) // set pixel, copy to dest + d[xDst] |= ucDstMask; + } // for x + } // for y + } // normal orientation + } // vertical bytes + else // Horizontal bytes here + { + if (iFlags & OBD_ROTATE_90) + { + int iDstPitch = (pOBD->height + 7)>>3; // dest bytes per line + xDst = 0; + for (y=yStart; y!=yEnd; y += dy, xDst++) { + ucSrcMask = (1 << (y & 7)); + yDst = 0; + s = &pOBD->ucScreen[(y >> 3) * iPitch]; + d = &pDestination[xDst >> 3]; + ucDstMask = (iFlags & OBD_LSB_FIRST) ? (1 << (xDst & 7)) : (0x80 >> (xDst & 7)); + for (x=xStart; x!=xEnd; x += dx, yDst++) { + if (s[x] & ucSrcMask) // set pixel, copy to dest + d[yDst * iDstPitch] |= ucDstMask; + } // for x + } // for y + } // rotate 90 + else // normally oriented + { + int iDstPitch = (pOBD->width + 7)>>3; // dest bytes per line + yDst = 0; + for (y=yStart; y!=yEnd; y += dy, yDst++) { + ucSrcMask = (1 << (y & 7)); + xDst = 0; + s = &pOBD->ucScreen[(y >> 3) * iPitch]; + d = &pDestination[yDst * iDstPitch]; + ucDstMask = (iFlags & OBD_LSB_FIRST) ? 0x1 : 0x80; + for (x=xStart; x!=xEnd; x += dx, xDst++) { + if (s[x] & ucSrcMask) // set pixel, copy to dest + d[(xDst>>3)] |= ucDstMask; + if (iFlags & OBD_LSB_FIRST) + ucDstMask <<= 1; + else + ucDstMask >>= 1; + if (ucDstMask == 0) + ucDstMask = (iFlags & OBD_LSB_FIRST) ? 0x1 : 0x80; + } // for x + } // for y + } // normal orientation + } + // Invert all pixels? + if (iFlags & OBD_INVERT) { + for (i=0; i +#include +#include +#include +#include "zigbee.h" +#include "eeprom.h" +#include "board.h" +#include "screen.h" +#include "wdt.h" +#include "syncedproto.h" +#include "led.h" + +uint16_t dataReqAttemptArr[POWER_SAVING_SMOOTHING] = {0}; // Holds the amount of attempts required per data_req/check-in +uint8_t dataReqAttemptArrayIndex = 0; +uint8_t dataReqLastAttempt = 0; +uint16_t nextCheckInFromAP = 0; +RAM uint8_t wakeUpReason = WAKEUP_REASON_FIRSTBOOT; +uint8_t scanAttempts = 0; + +int8_t temperature = 0; +uint16_t batteryVoltage = 0; +bool lowBattery = false; +uint16_t longDataReqCounter = 0; +uint16_t voltageCheckCounter = 0; + +uint8_t capabilities = 0; + +RAM uint64_t time_ms = 0; +RAM uint32_t time_overflow = 0; + +uint32_t getMillis() +{ + return pm_get_32k_tick() / 32; //(float)32.768; +} + +void initPowerSaving(const uint16_t initialValue) +{ + for (uint8_t c = 0; c < POWER_SAVING_SMOOTHING; c++) + { + dataReqAttemptArr[c] = initialValue; + } +} + +void doSleepGpio(uint32_t t, GPIO_PinTypeDef pin) +{ + set_led_color(0); // Always turn of the LED before sleep for security reasons + printf("Sleeping for: %u ms\r\n", (unsigned int)t); + // WaitMs(2000); + // return; + uint32_t r = drv_disable_irq(); + pm_wakeup_pad_cfg(pin, !drv_gpio_read(pin), 1); + drv_pm_longSleep(PM_SLEEP_MODE_SUSPEND, PM_WAKEUP_SRC_TIMER | PM_WAKEUP_SRC_PAD, t); + pm_wakeup_pad_cfg(pin, !drv_gpio_read(pin), 0); + drv_restore_irq(r); + uart_ndma_clear_tx_index(); // UART will be garbled otherwise +} + +void doSleep(uint32_t t) +{ + uint8_t randomizer = drv_u32Rand() & 0xff; + t += randomizer; + set_led_color(0); // Always turn of the LED before sleep for security reasons + printf("Sleeping for: %u ms\r\n", (unsigned int)t); + // WaitMs(2000); + // return; + uint32_t r = drv_disable_irq(); + pm_wakeup_pad_cfg(NFC_IRQ, PM_WAKEUP_LEVEL_LOW, 1); + drv_pm_longSleep(PM_SLEEP_MODE_SUSPEND, PM_WAKEUP_SRC_TIMER | PM_WAKEUP_SRC_PAD, t); + pm_wakeup_pad_cfg(NFC_IRQ, PM_WAKEUP_LEVEL_LOW, 0); + drv_restore_irq(r); + uart_ndma_clear_tx_index(); // UART will be garbled otherwise +} + +uint32_t getNextScanSleep(const bool increment) +{ + if (increment) + { + if (scanAttempts < 255) + scanAttempts++; + } + + if (scanAttempts < INTERVAL_1_ATTEMPTS) + { + return INTERVAL_1_TIME; + } + else if (scanAttempts < (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS)) + { + return INTERVAL_2_TIME; + } + else + { + return INTERVAL_3_TIME; + } +} + +void addAverageValue() +{ + uint16_t curval = INTERVAL_AT_MAX_ATTEMPTS - INTERVAL_BASE; + curval *= dataReqLastAttempt; + curval /= DATA_REQ_MAX_ATTEMPTS; + curval += INTERVAL_BASE; + dataReqAttemptArr[dataReqAttemptArrayIndex % POWER_SAVING_SMOOTHING] = curval; + dataReqAttemptArrayIndex++; +} + +uint16_t getNextSleep() +{ + uint16_t avg = 0; + for (uint8_t c = 0; c < POWER_SAVING_SMOOTHING; c++) + { + avg += dataReqAttemptArr[c]; + } + avg /= POWER_SAVING_SMOOTHING; + return avg; +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/powermgt.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/powermgt.h new file mode 100644 index 00000000..682d4807 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/powermgt.h @@ -0,0 +1,74 @@ +#ifndef _POWERMGT_H_ +#define _POWERMGT_H_ +#include +#include +#include "tl_common.h" + +#define WAKEUP_REASON_TIMED 0 +#define WAKEUP_REASON_GPIO 2 +#define WAKEUP_REASON_NFC 3 +#define WAKEUP_REASON_FIRSTBOOT 0xFC +#define WAKEUP_REASON_NETWORK_SCAN 0xFD +#define WAKEUP_REASON_WDT_RESET 0xFE + +#define DETECT_P1_0_NOTHING 0 +#define DETECT_P1_0_BUTTON 1 +#define DETECT_P1_0_JIG 2 + +#define INIT_EPD_VOLTREADING 0x80 +#define INIT_RADIO 0x40 +#define INIT_I2C 0x20 +#define INIT_UART 0x10 +#define INIT_EPD 0x08 +#define INIT_EEPROM 0x04 +#define INIT_TEMPREADING 0x02 +#define INIT_BASE 0x01 + +// power saving algorithm +#define INTERVAL_BASE 40 // interval (in seconds) (when 1 packet is sent/received) for target current (7.2µA) +#define INTERVAL_AT_MAX_ATTEMPTS 600 // interval (in seconds) (at max attempts) for target average current +#define DATA_REQ_RX_WINDOW_SIZE 5UL // How many milliseconds we should wait for a packet during the data_request. + // If the AP holds a long list of data for tags, it may need a little more time to lookup the mac address +#define DATA_REQ_MAX_ATTEMPTS 14 // How many attempts (at most) we should do to get something back from the AP +#define POWER_SAVING_SMOOTHING 8 // How many samples we should use to smooth the data request interval +#define MINIMUM_INTERVAL 45 // IMPORTANT: Minimum interval for check-in; this determines overal battery life! +#define MAXIMUM_PING_ATTEMPTS 20 // How many attempts to discover an AP the tag should do +#define PING_REPLY_WINDOW 5UL + +#define LONG_DATAREQ_INTERVAL 300 // How often (in seconds, approximately) the tag should do a long datareq (including temperature) +#define VOLTAGE_CHECK_INTERVAL 288 // How often the tag should do a battery voltage check (multiplied by LONG_DATAREQ_INTERVAL) +#define BATTERY_VOLTAGE_MINIMUM 2450 // 2600 or below is the best we can do on the EPD + +// power saving when no AP's were found (scanning every X) +#define VOLTAGEREADING_DURING_SCAN_INTERVAL 2 // how often we should read voltages; this is done every scan attempt in interval bracket 3 +#define INTERVAL_1_TIME 3600UL // Try every hour +#define INTERVAL_1_ATTEMPTS 24 // for 24 attempts (an entire day) +#define INTERVAL_2_TIME 7200UL // Try every 2 hours +#define INTERVAL_2_ATTEMPTS 12 // for 12 attempts (an additional day) +#define INTERVAL_3_TIME 86400UL // Finally, try every day + +uint32_t getMillis(); +extern void initAfterWake(); +extern void doSleepGpio(uint32_t t, GPIO_PinTypeDef pin); +extern void doSleep(uint32_t t); + +extern void addAverageValue(); +extern uint16_t getNextSleep(); + +extern uint32_t getNextScanSleep(const bool increment); +extern void initPowerSaving(const uint16_t initialValue); + +extern uint8_t wakeUpReason; + +extern uint8_t capabilities; + +extern uint16_t nextCheckInFromAP; +extern uint8_t dataReqLastAttempt; +extern int8_t temperature; +extern uint16_t batteryVoltage; +extern bool lowBattery; +extern uint8_t scanAttempts; +extern uint16_t longDataReqCounter; +extern uint16_t voltageCheckCounter; + +#endif \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/proto.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/proto.h new file mode 100644 index 00000000..acbc7a95 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/proto.h @@ -0,0 +1,227 @@ +#ifndef _PROTO_H_ +#define _PROTO_H_ +#include + +#include "tag_types.h" + +// power saving algorithm +#define INTERVAL_BASE 40 // interval (in seconds) (when 1 packet is sent/received) for target current (7.2µA) +#define INTERVAL_AT_MAX_ATTEMPTS 600 // interval (in seconds) (at max attempts) for target average current +#define DATA_REQ_RX_WINDOW_SIZE 5UL // How many milliseconds we should wait for a packet during the data_request. + // If the AP holds a long list of data for tags, it may need a little more time to lookup the mac address +#define DATA_REQ_MAX_ATTEMPTS 14 // How many attempts (at most) we should do to get something back from the AP +#define POWER_SAVING_SMOOTHING 8 // How many samples we should use to smooth the data request interval +#define MINIMUM_INTERVAL 45 // IMPORTANT: Minimum interval for check-in; this determines overal battery life! +#define MAXIMUM_PING_ATTEMPTS 20 // How many attempts to discover an AP the tag should do + +#define LONG_DATAREQ_INTERVAL 300 // How often (in seconds, approximately) the tag should do a long datareq (including temperature) +#define VOLTAGE_CHECK_INTERVAL 288 // How often the tag should do a battery voltage check (multiplied by LONG_DATAREQ_INTERVAL) +#define BATTERY_VOLTAGE_MINIMUM 2450 // 2600 or below is the best we can do on the EPD + +// power saving when no AP's were found (scanning every X) +#define VOLTAGEREADING_DURING_SCAN_INTERVAL 2 // how often we should read voltages; this is done every scan attempt in interval bracket 3 +#define INTERVAL_1_TIME 3600UL // Try every hour +#define INTERVAL_1_ATTEMPTS 24 // for 24 attempts (an entire day) +#define INTERVAL_2_TIME 7200UL // Try every 2 hours +#define INTERVAL_2_ATTEMPTS 12 // for 12 attempts (an additional day) +#define INTERVAL_3_TIME 86400UL // Finally, try every day + +enum TagScreenType { + TagScreenEink_BW_1bpp, + TagScreenEink_BW_2bpp, + TagScreenEink_BW_4bpp, + TagScreenEink_BWY_only, // 2bpp, but only 3 colors (BW?Y) + TagScreenEink_BWY_2bpp, + TagScreenEink_BWY_4bpp, + TagScreenEink_BWR_only, // 2bpp, but only 3 colors (BW?R) + TagScreenEink_BWR_2bpp, + TagScreenEink_BWR_4bpp, + + TagScreenEink_BWY_3bpp, + TagScreenEink_BWR_3bpp, + TagScreenEink_BW_3bpp, + + TagScreenPersistentLcd_1bpp, + + TagScreenEink_BWY_5colors, + TagScreenEink_BWR_5colors, + + TagScreenEink_BWY_6colors, + TagScreenEink_BWR_6colors, + + TagScreenTypeOther = 0x7f, +}; + + +#define PROTO_PAN_ID (0x4447) // PAN ID compression shall be used + +#define RADIO_MAX_PACKET_LEN (125) // useful payload, not including the crc + +#define ADDR_MODE_NONE (0) +#define ADDR_MODE_SHORT (2) +#define ADDR_MODE_LONG (3) + +#define FRAME_TYPE_BEACON (0) +#define FRAME_TYPE_DATA (1) +#define FRAME_TYPE_ACK (2) +#define FRAME_TYPE_MAC_CMD (3) + +#define SHORT_MAC_UNUSED (0x10000000UL) // for radioRxFilterCfg's myShortMac + +struct MacFcs { + uint8_t frameType : 3; + uint8_t secure : 1; + uint8_t framePending : 1; + uint8_t ackReqd : 1; + uint8_t panIdCompressed : 1; + uint8_t rfu1 : 1; + uint8_t rfu2 : 2; + uint8_t destAddrType : 2; + uint8_t frameVer : 2; + uint8_t srcAddrType : 2; +} ; + +struct MacFrameFromMaster { + struct MacFcs fcs; + uint8_t seq; + uint16_t pan; + uint8_t dst[8]; + uint16_t from; +} ; + +struct MacFrameNormal { + struct MacFcs fcs; + uint8_t seq; + uint16_t pan; + uint8_t dst[8]; + uint8_t src[8]; +} ; + +struct MacFrameBcast { + struct MacFcs fcs; + uint8_t seq; + uint16_t dstPan; + uint16_t dstAddr; + uint16_t srcPan; + uint8_t src[8]; +} ; + +#define PKT_AVAIL_DATA_SHORTREQ 0xE3 +#define PKT_AVAIL_DATA_REQ 0xE5 +#define PKT_AVAIL_DATA_INFO 0xE6 +#define PKT_BLOCK_PARTIAL_REQUEST 0xE7 +#define PKT_BLOCK_REQUEST_ACK 0xE9 +#define PKT_BLOCK_REQUEST 0xE4 +#define PKT_BLOCK_PART 0xE8 +#define PKT_XFER_COMPLETE 0xEA +#define PKT_XFER_COMPLETE_ACK 0xEB +#define PKT_CANCEL_XFER 0xEC +#define PKT_PING 0xED +#define PKT_PONG 0xEE + +struct AvailDataReq { + uint8_t checksum; + uint8_t lastPacketLQI; + int8_t lastPacketRSSI; + int8_t temperature; + uint16_t batteryMv; + uint8_t hwType; + uint8_t wakeupReason; + uint8_t capabilities; + uint16_t tagSoftwareVersion; + uint8_t currentChannel; + uint8_t customMode; + uint8_t reserved[8]; +} ; + +struct oldAvailDataReq { + uint8_t checksum; + uint8_t lastPacketLQI; + int8_t lastPacketRSSI; + int8_t temperature; + uint16_t batteryMv; + uint8_t hwType; + uint8_t wakeupReason; + uint8_t capabilities; +} ; + +struct AvailDataInfo { + uint8_t checksum; + uint64_t dataVer; // MD5 of potential traffic + uint32_t dataSize; + uint8_t dataType; + uint8_t dataTypeArgument; // extra specification or instruction for the tag (LUT to be used for drawing image) + uint16_t nextCheckIn; // when should the tag check-in again? Measured in minutes +} ; + +struct pendingData { + struct AvailDataInfo availdatainfo; + uint16_t attemptsLeft; + uint8_t targetMac[8]; +} ; + +struct blockPart { + uint8_t checksum; + uint8_t blockId; + uint8_t blockPart; + uint8_t data[]; +} ; + +struct blockData { + uint16_t size; + uint16_t checksum; + uint8_t data[]; +} ; + +struct burstMacData { + uint16_t offset; + uint8_t targetMac[8]; +} ; + +#define BLOCK_PART_DATA_SIZE 99 +#define BLOCK_MAX_PARTS 42 +#define BLOCK_DATA_SIZE 4096UL +#define BLOCK_XFER_BUFFER_SIZE BLOCK_DATA_SIZE + sizeof(struct blockData) +#define BLOCK_REQ_PARTS_BYTES 6 + +struct blockRequest { + uint8_t checksum; + uint64_t ver; + uint8_t blockId; + uint8_t type; + uint8_t requestedParts[BLOCK_REQ_PARTS_BYTES]; +} ; + +struct blockRequestAck { + uint8_t checksum; + uint16_t pleaseWaitMs; +} ; + +struct espBlockRequest { + uint8_t checksum; + uint64_t ver; + uint8_t blockId; + uint8_t src[8]; +} ; + +struct espXferComplete { + uint8_t checksum; + uint8_t src[8]; +} ; + +struct espAvailDataReq { + uint8_t checksum; + uint8_t src[8]; + struct AvailDataReq adr; +} ; + +struct espSetChannelPower { + uint8_t checksum; + uint8_t channel; + uint8_t power; +} ; + +#define MACFMT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x" +#define MACCVT(x) ((const uint8_t*)(x))[7], ((const uint8_t*)(x))[6], ((const uint8_t*)(x))[5], ((const uint8_t*)(x))[4], ((const uint8_t*)(x))[3], ((const uint8_t*)(x))[2], ((const uint8_t*)(x))[1], ((const uint8_t*)(x))[0] + +#endif diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/screen.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/screen.h new file mode 100644 index 00000000..921b81c5 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/screen.h @@ -0,0 +1,24 @@ +#ifndef _SCREEN_H_ +#define _SCREEN_H_ + +#include +#include + +#define SCREEN_WIDTH 184 +#define SCREEN_HEIGHT 384 + +#define SCREEN_NUM_GREYS 5 +#define SCREEN_FIRST_GREY_IDX 0 +#define SCREEN_EXTRA_COLOR_INDEX 5 //set to negative if nonexistent +#define SCREEN_TX_BPP 4 //in transit + +#define SCREEN_WIDTH_MM 29 +#define SCREEN_HEIGHT_MM 67 + +#define SCREEN_BYTE_FILL 0x44 //white + +#define SCREEN_TYPE TagScreenEink_BWR_6colors + +#define SCREEN_DATA_PASSES 2 + +#endif diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/syncedproto.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/syncedproto.c new file mode 100644 index 00000000..6c9d62b9 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/syncedproto.c @@ -0,0 +1,941 @@ + +#include "main.h" +#include "zigbee.h" +#include "proto.h" +#include "syncedproto.h" +#include "comms.h" +#include "board.h" +#include "powermgt.h" +#include "eeprom.h" +#include "drawing.h" +#include "wdt.h" +#include "tl_common.h" +#include +// download-stuff +RAM uint8_t blockXferBuffer[BLOCK_XFER_BUFFER_SIZE] = {0}; +RAM struct blockRequest curBlock = {0}; // used by the block-requester, contains the next request that we'll send +RAM struct AvailDataInfo curDataInfo = {0}; // last 'AvailDataInfo' we received from the AP +RAM bool requestPartialBlock = false; // if we should ask the AP to get this block from the host or not +#define BLOCK_TRANSFER_ATTEMPTS 5 + +uint8_t prevImgSlot = 0xFF; +uint8_t curImgSlot = 0xFF; +RAM uint32_t curHighSlotId = 0; +RAM uint8_t nextImgSlot = 0; +RAM uint8_t imgSlots = 0; +uint8_t drawWithLut = 0; + +// stuff we need to keep track of related to the network/AP +uint8_t APmac[8] = {0}; +uint16_t APsrcPan = 0; +RAM uint8_t mSelfMac[8] = {0}; + +RAM uint8_t seq = 0; +RAM uint8_t currentChannel = 0; + +// buffer we use to prepare/read packets +static uint8_t inBuffer[128] = {0}; +static uint8_t outBuffer[128] = {0}; + +// tools +static uint8_t getPacketType(const void *buffer) +{ + const struct MacFcs *fcs = buffer; + if ((fcs->frameType == 1) && (fcs->destAddrType == 2) && (fcs->srcAddrType == 3) && (fcs->panIdCompressed == 0)) + { + // broadcast frame + uint8_t type = ((uint8_t *)buffer)[sizeof(struct MacFrameBcast)]; + return type; + } + else if ((fcs->frameType == 1) && (fcs->destAddrType == 3) && (fcs->srcAddrType == 3) && (fcs->panIdCompressed == 1)) + { + // normal frame + uint8_t type = ((uint8_t *)buffer)[sizeof(struct MacFrameNormal)]; + return type; + } + return 0; +} +static bool pktIsUnicast(const void *buffer) +{ + const struct MacFcs *fcs = buffer; + if ((fcs->frameType == 1) && (fcs->destAddrType == 2) && (fcs->srcAddrType == 3) && (fcs->panIdCompressed == 0)) + { + return false; + } + else if ((fcs->frameType == 1) && (fcs->destAddrType == 3) && (fcs->srcAddrType == 3) && (fcs->panIdCompressed == 1)) + { + // normal frame + return true; + } + // unknown type... + return false; +} +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("\r\n"); +} +static bool checkCRC(const void *p, const uint8_t len) +{ + uint8_t total = 0; + for (uint8_t c = 1; c < len; c++) + { + total += ((uint8_t *)p)[c]; + } + // printf("CRC: rx %d, calc %d\r\n", ((uint8_t *)p)[0], total); + return ((uint8_t *)p)[0] == total; +} +static void addCRC(void *p, const uint8_t len) +{ + uint8_t total = 0; + for (uint8_t c = 1; c < len; c++) + { + total += ((uint8_t *)p)[c]; + } + ((uint8_t *)p)[0] = total; +} + +// radio stuff +static void sendPing() +{ + struct MacFrameBcast *txframe = (struct MacFrameBcast *)(outBuffer + 1); + memset(outBuffer, 0, sizeof(struct MacFrameBcast) + 2 + 4); + outBuffer[0] = sizeof(struct MacFrameBcast) + 1 + 2; + outBuffer[sizeof(struct MacFrameBcast) + 1] = PKT_PING; + memcpy(txframe->src, mSelfMac, 8); + txframe->fcs.frameType = 1; + txframe->fcs.ackReqd = 1; + txframe->fcs.destAddrType = 2; + txframe->fcs.srcAddrType = 3; + txframe->seq = seq++; + txframe->dstPan = PROTO_PAN_ID; + txframe->dstAddr = 0xFFFF; + txframe->srcPan = PROTO_PAN_ID; + commsTxNoCpy(outBuffer); +} +uint8_t detectAP(const uint8_t channel) +{ + radioRxEnable(false); + radioSetChannel(channel); + radioRxFlush(); + radioRxEnable(true); + for (uint8_t c = 1; c <= MAXIMUM_PING_ATTEMPTS; c++) + { + sendPing(); + uint32_t timeout = clock_time(); + while (!clock_time_exceed(timeout, PING_REPLY_WINDOW * 1000)) + { + int8_t ret = commsRxUnencrypted(inBuffer); + if (ret > 1) + { + // dump(inBuffer + sizeof(struct MacFrameNormal), 32); + if ((inBuffer[sizeof(struct MacFrameNormal) + 1] == channel) && (getPacketType(inBuffer) == PKT_PONG)) + { + if (pktIsUnicast(inBuffer)) + { + struct MacFrameNormal *f = (struct MacFrameNormal *)inBuffer; + memcpy(APmac, f->src, 8); + APsrcPan = f->pan; + return c; + } + } + } + WaitMs(1); + } + } + return 0; +} + +// data xfer stuff +static void sendShortAvailDataReq() +{ + struct MacFrameBcast *txframe = (struct MacFrameBcast *)(outBuffer + 1); + outBuffer[0] = sizeof(struct MacFrameBcast) + 1 + 2; + outBuffer[sizeof(struct MacFrameBcast) + 1] = PKT_AVAIL_DATA_SHORTREQ; + memcpy(txframe->src, mSelfMac, 8); + outBuffer[1] = 0x21; + outBuffer[2] = 0xC8; // quickly set txframe fcs structure for broadcast packet + txframe->seq = seq++; + txframe->dstPan = PROTO_PAN_ID; + txframe->dstAddr = 0xFFFF; + txframe->srcPan = PROTO_PAN_ID; + commsTxNoCpy(outBuffer); +} +static void sendAvailDataReq() +{ + struct MacFrameBcast *txframe = (struct MacFrameBcast *)(outBuffer + 1); + memset(outBuffer, 0, sizeof(struct MacFrameBcast) + sizeof(struct AvailDataReq) + 2 + 4); + struct AvailDataReq *availreq = (struct AvailDataReq *)(outBuffer + 2 + sizeof(struct MacFrameBcast)); + outBuffer[0] = sizeof(struct MacFrameBcast) + sizeof(struct AvailDataReq) + 2 + 2; + outBuffer[sizeof(struct MacFrameBcast) + 1] = PKT_AVAIL_DATA_REQ; + memcpy(txframe->src, mSelfMac, 8); + txframe->fcs.frameType = 1; + txframe->fcs.ackReqd = 1; + txframe->fcs.destAddrType = 2; + txframe->fcs.srcAddrType = 3; + txframe->seq = seq++; + txframe->dstPan = PROTO_PAN_ID; + txframe->dstAddr = 0xFFFF; + txframe->srcPan = PROTO_PAN_ID; + // TODO: send some (more) meaningful data + availreq->hwType = HW_TYPE; + availreq->wakeupReason = wakeUpReason; + availreq->lastPacketRSSI = mLastRSSI; + availreq->lastPacketLQI = mLastLqi; + availreq->temperature = temperature; + availreq->batteryMv = batteryVoltage; + availreq->capabilities = capabilities; + addCRC(availreq, sizeof(struct AvailDataReq)); + commsTxNoCpy(outBuffer); +} +struct AvailDataInfo *getAvailDataInfo() +{ + radioRxEnable(true); + for (uint8_t c = 0; c < DATA_REQ_MAX_ATTEMPTS; c++) + { + sendAvailDataReq(); + uint32_t timeout = clock_time(); + while (!clock_time_exceed(timeout, DATA_REQ_RX_WINDOW_SIZE * 1000)) + { + int8_t ret = commsRxUnencrypted(inBuffer); + if (ret > 1) + { + if (getPacketType(inBuffer) == PKT_AVAIL_DATA_INFO) + { + if (checkCRC(inBuffer + sizeof(struct MacFrameNormal) + 1, sizeof(struct AvailDataInfo))) + { + struct MacFrameNormal *f = (struct MacFrameNormal *)inBuffer; + memcpy(APmac, f->src, 8); + APsrcPan = f->pan; + dataReqLastAttempt = c; + return (struct AvailDataInfo *)(inBuffer + sizeof(struct MacFrameNormal) + 1); + } + } + } + } + } + dataReqLastAttempt = DATA_REQ_MAX_ATTEMPTS; + return NULL; +} +struct AvailDataInfo *getShortAvailDataInfo() +{ + radioRxEnable(true); + for (uint8_t c = 0; c < DATA_REQ_MAX_ATTEMPTS; c++) + { + sendShortAvailDataReq(); + uint32_t timeout = clock_time(); + while (!clock_time_exceed(timeout, DATA_REQ_RX_WINDOW_SIZE * 1000)) + { + int8_t ret = commsRxUnencrypted(inBuffer); + if (ret > 1) + { + if (getPacketType(inBuffer) == PKT_AVAIL_DATA_INFO) + { + if (checkCRC(inBuffer + sizeof(struct MacFrameNormal) + 1, sizeof(struct AvailDataInfo))) + { + struct MacFrameNormal *f = (struct MacFrameNormal *)inBuffer; + memcpy(APmac, f->src, 8); + APsrcPan = f->pan; + dataReqLastAttempt = c; + return (struct AvailDataInfo *)(inBuffer + sizeof(struct MacFrameNormal) + 1); + } + } + } + } + } + dataReqLastAttempt = DATA_REQ_MAX_ATTEMPTS; + return NULL; +} +static bool processBlockPart(const struct blockPart *bp) +{ + uint16_t start = bp->blockPart * BLOCK_PART_DATA_SIZE; + uint16_t size = BLOCK_PART_DATA_SIZE; + // validate if it's okay to copy data + if (bp->blockId != curBlock.blockId) + { + // printf("got a packet for block %02X\r\n", bp->blockId); + return false; + } + if (start >= (sizeof(blockXferBuffer) - 1)) + return false; + if (bp->blockPart > BLOCK_MAX_PARTS) + return false; + if ((start + size) > sizeof(blockXferBuffer)) + { + size = sizeof(blockXferBuffer) - start; + } + if (checkCRC(bp, sizeof(struct blockPart) + BLOCK_PART_DATA_SIZE)) + { + // copy block data to buffer + memcpy((void *)(blockXferBuffer + start), (const void *)bp->data, size); + // we don't need this block anymore, set bit to 0 so we don't request it again + curBlock.requestedParts[bp->blockPart / 8] &= ~(1 << (bp->blockPart % 8)); + return true; + } + else + { + printf("CRC Failed \r\n"); + return false; + } +} +static bool blockRxLoop(const uint32_t timeout) +{ + bool success = false; + // radioRxEnable(true); + uint32_t t = clock_time(); + while (!clock_time_exceed(t, 2000 * 1000)) + { + int8_t ret = commsRxUnencrypted(inBuffer); + if (ret > 1) + { + printf("Len %d\r\n", ret); + if (getPacketType(inBuffer) == PKT_BLOCK_PART) + { + struct blockPart *bp = (struct blockPart *)(inBuffer + sizeof(struct MacFrameNormal) + 1); + success = processBlockPart(bp); + } + } + } + // radioRxEnable(false); + // radioRxFlush(); + return success; +} +static struct blockRequestAck *continueToRX() +{ + struct blockRequestAck *ack = (struct blockRequestAck *)(inBuffer + sizeof(struct MacFrameNormal) + 1); + ack->pleaseWaitMs = 0; + return ack; +} +static void sendBlockRequest() +{ + memset(outBuffer, 0, sizeof(struct MacFrameNormal) + sizeof(struct blockRequest) + 2 + 2); + struct MacFrameNormal *f = (struct MacFrameNormal *)(outBuffer + 1); + struct blockRequest *blockreq = (struct blockRequest *)(outBuffer + 2 + sizeof(struct MacFrameNormal)); + outBuffer[0] = sizeof(struct MacFrameNormal) + sizeof(struct blockRequest) + 2 + 2; + if (requestPartialBlock) + { + ; + outBuffer[sizeof(struct MacFrameNormal) + 1] = PKT_BLOCK_PARTIAL_REQUEST; + } + else + { + outBuffer[sizeof(struct MacFrameNormal) + 1] = PKT_BLOCK_REQUEST; + } + memcpy(f->src, mSelfMac, 8); + memcpy(f->dst, APmac, 8); + f->fcs.frameType = 1; + f->fcs.secure = 0; + f->fcs.framePending = 0; + f->fcs.ackReqd = 0; + f->fcs.panIdCompressed = 1; + f->fcs.destAddrType = 3; + f->fcs.frameVer = 0; + f->fcs.srcAddrType = 3; + f->seq = seq++; + f->pan = APsrcPan; + memcpy(blockreq, &curBlock, sizeof(struct blockRequest)); + // printf("req ver: %02X%02X%02X%02X%02X%02X%02X%02X\r\n", ((uint8_t*)&blockreq->ver)[0],((uint8_t*)&blockreq->ver)[1],((uint8_t*)&blockreq->ver)[2],((uint8_t*)&blockreq->ver)[3],((uint8_t*)&blockreq->ver)[4],((uint8_t*)&blockreq->ver)[5],((uint8_t*)&blockreq->ver)[6],((uint8_t*)&blockreq->ver)[7]); + addCRC(blockreq, sizeof(struct blockRequest)); + commsTxNoCpy(outBuffer); +} +static struct blockRequestAck *performBlockRequest() +{ + for (uint8_t c = 0; c < 30; c++) + { + sendBlockRequest(); + uint32_t timeout = clock_time(); + do + { + int8_t ret = commsRxUnencrypted(inBuffer); + if (ret > 1) + { + switch (getPacketType(inBuffer)) + { + case PKT_BLOCK_REQUEST_ACK: + if (checkCRC((inBuffer + sizeof(struct MacFrameNormal) + 1), sizeof(struct blockRequestAck))) + return (struct blockRequestAck *)(inBuffer + sizeof(struct MacFrameNormal) + 1); + break; + case PKT_BLOCK_PART: + // block already started while we were waiting for a get block reply + // printf("!"); + // processBlockPart((struct blockPart *)(inBuffer + sizeof(struct MacFrameNormal) + 1)); + return continueToRX(); + break; + case PKT_CANCEL_XFER: + return NULL; + default: + printf("pkt w/type %02X\r\n", getPacketType(inBuffer)); + break; + } + } + + } while (!clock_time_exceed(timeout, 50 * 1000)); + } + return continueToRX(); + // return NULL; +} +static void sendXferCompletePacket() +{ + memset(outBuffer, 0, sizeof(struct MacFrameNormal) + 2 + 4); + struct MacFrameNormal *f = (struct MacFrameNormal *)(outBuffer + 1); + outBuffer[0] = sizeof(struct MacFrameNormal) + 2 + 2; + outBuffer[sizeof(struct MacFrameNormal) + 1] = PKT_XFER_COMPLETE; + memcpy(f->src, mSelfMac, 8); + memcpy(f->dst, APmac, 8); + f->fcs.frameType = 1; + f->fcs.secure = 0; + f->fcs.framePending = 0; + f->fcs.ackReqd = 0; + f->fcs.panIdCompressed = 1; + f->fcs.destAddrType = 3; + f->fcs.frameVer = 0; + f->fcs.srcAddrType = 3; + f->pan = APsrcPan; + f->seq = seq++; + commsTxNoCpy(outBuffer); +} +static void sendXferComplete() +{ + radioRxEnable(true); + + for (uint8_t c = 0; c < 16; c++) + { + sendXferCompletePacket(); + uint32_t timeout = clock_time(); + while (!clock_time_exceed(timeout, 6 * 1000)) + { + int8_t ret = commsRxUnencrypted(inBuffer); + if (ret > 1) + { + if (getPacketType(inBuffer) == PKT_XFER_COMPLETE_ACK) + { + printf("XFC ACK\r\n"); + return; + } + } + } + } + printf("XFC NACK!\r\n"); + return; +} +static bool validateBlockData() +{ + struct blockData *bd = (struct blockData *)blockXferBuffer; + printf("expected len = %04X, checksum=%04X\r\n", bd->size, bd->checksum); + if (bd->size > BLOCK_XFER_BUFFER_SIZE - sizeof(struct blockData)) + { + printf("Impossible data size, we abort here\r\n"); + return false; + } + uint16_t t = 0; + for (uint16_t c = 0; c < bd->size; c++) + { + t += bd->data[c]; + } + printf("Checked len = %04X, checksum=%04X\r\n", bd->size, t); + return bd->checksum == t; +} + +// EEprom related stuff +static uint32_t getAddressForSlot(const uint8_t s) +{ + return EEPROM_IMG_START + (EEPROM_IMG_EACH * s); +} +static void getNumSlots() +{ + uint32_t eeSize = eepromGetSize(); + uint16_t nSlots = eeSize / (EEPROM_IMG_EACH >> 8) >> 8; + if (eeSize < EEPROM_IMG_EACH || !nSlots) + { + printf("eeprom is too small\r\n"); + while (1) + ; + } + else if (nSlots >> 8) + { + printf("eeprom is too big, some will be unused\r\n"); + imgSlots = 254; + } + else + imgSlots = nSlots; +} +static uint8_t findSlot(const uint8_t *ver) +{ + return 0xFF; // remove me! This forces the tag to re-download each and every upload without checking if it's already in the eeprom somewhere + uint32_t markerValid = EEPROM_IMG_VALID; + for (uint8_t c = 0; c < imgSlots; c++) + { + struct EepromImageHeader *eih = (struct EepromImageHeader *)blockXferBuffer; + eepromRead(getAddressForSlot(c), eih, sizeof(struct EepromImageHeader)); + if (!memcmp(&eih->validMarker, &markerValid, 4)) + { + if (!memcmp(&eih->version, (void *)ver, 8)) + { + return c; + } + } + } + return 0xFF; +} +static void eraseUpdateBlock() +{ + eepromErase(EEPROM_UPDATA_AREA_START, EEPROM_UPDATE_AREA_LEN); +} +static void eraseImageBlock(const uint8_t c) +{ + eepromErase(getAddressForSlot(c), EEPROM_IMG_EACH); +} +static void saveUpdateBlockData(uint8_t blockId) +{ + if (!eepromWrite(EEPROM_UPDATA_AREA_START + (blockId * BLOCK_DATA_SIZE), blockXferBuffer + sizeof(struct blockData), BLOCK_DATA_SIZE)) + printf("EEPROM write failed\r\n"); +} +static void saveImgBlockData(const uint8_t imgSlot, const uint8_t blockId) +{ + uint32_t length = EEPROM_IMG_EACH - (sizeof(struct EepromImageHeader) + (blockId * BLOCK_DATA_SIZE)); + if (length > 4096) + length = 4096; + + if (!eepromWrite(getAddressForSlot(imgSlot) + sizeof(struct EepromImageHeader) + (blockId * BLOCK_DATA_SIZE), blockXferBuffer + sizeof(struct blockData), length)) + printf("EEPROM write failed\r\n"); +} +void drawImageFromEeprom(const uint8_t imgSlot) +{ + drawImageAtAddress(getAddressForSlot(imgSlot), drawWithLut); + drawWithLut = 0; // default back to the regular ol' stock/OTP LUT +} +static uint32_t getHighSlotId() +{ + uint32_t temp = 0; + uint32_t markerValid = EEPROM_IMG_VALID; + for (uint8_t c = 0; c < imgSlots; c++) + { + struct EepromImageHeader *eih = (struct EepromImageHeader *)blockXferBuffer; + eepromRead(getAddressForSlot(c), eih, sizeof(struct EepromImageHeader)); + if (!memcmp(&eih->validMarker, &markerValid, 4)) + { + if (temp < eih->id) + { + temp = eih->id; + nextImgSlot = c; + } + } + } + printf("found high id=%d in slot %d\r\n", temp, nextImgSlot); + return temp; +} + +static uint8_t partsThisBlock = 0; +static uint8_t blockAttempts = 0; // these CAN be local to the function, but for some reason, they won't survive sleep? + // they get overwritten with 7F 32 44 20 00 00 00 00 11, I don't know why. + +static bool getDataBlock(const uint16_t blockSize) +{ + blockAttempts = BLOCK_TRANSFER_ATTEMPTS; + if (blockSize == BLOCK_DATA_SIZE) + { + partsThisBlock = BLOCK_MAX_PARTS; + memset(curBlock.requestedParts, 0xFF, BLOCK_REQ_PARTS_BYTES); + } + else + { + partsThisBlock = (sizeof(struct blockData) + blockSize) / BLOCK_PART_DATA_SIZE; + if ((sizeof(struct blockData) + blockSize) % BLOCK_PART_DATA_SIZE) + partsThisBlock++; + memset(curBlock.requestedParts, 0x00, BLOCK_REQ_PARTS_BYTES); + for (uint8_t c = 0; c < partsThisBlock; c++) + { + curBlock.requestedParts[c / 8] |= (1 << (c % 8)); + } + } + + requestPartialBlock = false; // this forces the AP to request the block data from the host + + while (blockAttempts--) + { + wdt10s(); +#ifndef DEBUGBLOCKS + printf("REQ %d ", curBlock.blockId); +#else + printf("REQ %d[", curBlock.blockId); + for (uint8_t c = 0; c < BLOCK_MAX_PARTS; c++) + { + if ((c != 0) && (c % 8 == 0)) + printf("]["); + if (curBlock.requestedParts[c / 8] & (1 << (c % 8))) + { + printf("R"); + } + else + { + printf("_"); + } + } + printf("]\r\n"); +#endif + struct blockRequestAck *ack = performBlockRequest(); + + if (ack == NULL) + { + printf("Cancelled request\r\n"); + return false; + } + if (ack->pleaseWaitMs) + { // SLEEP - until the AP is ready with the data + WaitMs(ack->pleaseWaitMs - 10); + } + else + { + // immediately start with the reception of the block data + } + blockRxLoop(270); // BLOCK RX LOOP - receive a block, until the timeout has passed + +#ifdef DEBUGBLOCKS + printf("RX %d[", curBlock.blockId); + for (uint8_t c = 0; c < BLOCK_MAX_PARTS; c++) + { + if ((c != 0) && (c % 8 == 0)) + printf("]["); + if (curBlock.requestedParts[c / 8] & (1 << (c % 8))) + { + printf("."); + } + else + { + printf("R"); + } + } + printf("]\r\n"); +#endif + // check if we got all the parts we needed, e.g: has the block been completed? + bool blockComplete = true; + for (uint8_t c = 0; c < partsThisBlock; c++) + { + if (curBlock.requestedParts[c / 8] & (1 << (c % 8))) + blockComplete = false; + } + + if (blockComplete) + { +#ifndef DEBUGBLOCKS + printf("- COMPLETE\r\n"); +#endif + if (validateBlockData()) + { + printf("- Validated\r\n"); + // block download complete, validated + return true; + } + else + { + for (uint8_t c = 0; c < partsThisBlock; c++) + { + curBlock.requestedParts[c / 8] |= (1 << (c % 8)); + } + requestPartialBlock = false; + printf("blk failed validation!\r\n"); + } + } + else + { +#ifndef DEBUGBLOCKS + printf("- INCOMPLETE\r\n"); +#endif + // block incomplete, re-request a partial block + requestPartialBlock = true; + } + } + printf("failed getting block\r\n"); + return false; +} +uint16_t dataRequestSize = 0; +static bool downloadFWUpdate(const struct AvailDataInfo *avail) +{ + // check if we already started the transfer of this information & haven't completed it + if (!memcmp((const void *)&avail->dataVer, (const void *)&curDataInfo.dataVer, 8) && curDataInfo.dataSize) + { + // looks like we did. We'll carry on where we left off. + } + else + { + // start, or restart the transfer from 0. Copy data from the AvailDataInfo struct, and the struct intself. This forces a new transfer + curBlock.blockId = 0; + memcpy(&(curBlock.ver), &(avail->dataVer), 8); + curBlock.type = avail->dataType; + memcpy(&curDataInfo, (void *)avail, sizeof(struct AvailDataInfo)); + eraseUpdateBlock(); + } + + while (curDataInfo.dataSize) + { + wdt10s(); + if (curDataInfo.dataSize > BLOCK_DATA_SIZE) + { + // more than one block remaining + dataRequestSize = BLOCK_DATA_SIZE; + } + else + { + // only one block remains + dataRequestSize = curDataInfo.dataSize; + } + if (getDataBlock(dataRequestSize)) + { + // succesfully downloaded datablock, save to eeprom + saveUpdateBlockData(curBlock.blockId); + curBlock.blockId++; + curDataInfo.dataSize -= dataRequestSize; + } + else + { + // failed to get the block we wanted, we'll stop for now, maybe resume later + return false; + } + } + // no more data, download complete + return true; +} + +uint16_t imageSize = 0; +static bool downloadImageDataToEEPROM(const struct AvailDataInfo *avail) +{ + // check if we already started the transfer of this information & haven't completed it + if (!memcmp((const void *)&avail->dataVer, (const void *)&curDataInfo.dataVer, 8) && curDataInfo.dataSize) + { + // looks like we did. We'll carry on where we left off. + printf("restarting image download"); + curImgSlot = nextImgSlot; + } + else + { + // go to the next image slot + nextImgSlot++; + if (nextImgSlot >= imgSlots) + nextImgSlot = 0; + curImgSlot = nextImgSlot; + printf("Saving to image slot %d\r\n", curImgSlot); + drawWithLut = avail->dataTypeArgument; + uint8_t attempt = 5; + while (attempt--) + { + if (eepromErase(getAddressForSlot(curImgSlot), EEPROM_IMG_EACH)) + goto eraseSuccess; + } + // eepromFail: + doSleep(-1); + eraseSuccess: + printf("new download, writing to slot %d\r\n", curImgSlot); + + // start, or restart the transfer. Copy data from the AvailDataInfo struct, and the struct intself. This forces a new transfer + curBlock.blockId = 0; + memcpy(&(curBlock.ver), &(avail->dataVer), 8); + curBlock.type = avail->dataType; + memcpy(&curDataInfo, (void *)avail, sizeof(struct AvailDataInfo)); + imageSize = curDataInfo.dataSize; + } + + while (curDataInfo.dataSize) + { + wdt10s(); + if (curDataInfo.dataSize > BLOCK_DATA_SIZE) + { + // more than one block remaining + dataRequestSize = BLOCK_DATA_SIZE; + } + else + { + // only one block remains + dataRequestSize = curDataInfo.dataSize; + } + if (getDataBlock(dataRequestSize)) + { + // succesfully downloaded datablock, save to eeprom + printf("Saving block %d to slot %d\r\n", curBlock.blockId, curImgSlot); + saveImgBlockData(curImgSlot, curBlock.blockId); + curBlock.blockId++; + curDataInfo.dataSize -= dataRequestSize; + } + else + { + // failed to get the block we wanted, we'll stop for now, probably resume later + return false; + } + } + // no more data, download complete + + // borrow the blockXferBuffer temporarily + struct EepromImageHeader *eih = (struct EepromImageHeader *)blockXferBuffer; + memcpy(&eih->version, &curDataInfo.dataVer, 8); + eih->validMarker = EEPROM_IMG_VALID; + eih->id = ++curHighSlotId; + eih->size = imageSize; + eih->dataType = curDataInfo.dataType; + +#ifdef DEBUGBLOCKS + printf("Now writing datatype 0x%02X to slot %d\r\n", curDataInfo.dataType, curImgSlot); +#endif + eepromWrite(getAddressForSlot(curImgSlot), eih, sizeof(struct EepromImageHeader)); + + return true; +} + +bool processAvailDataInfo(struct AvailDataInfo *avail) +{ + printf("dataType: %d\r\n", avail->dataType); + switch (avail->dataType) + { + case DATATYPE_IMG_BMP: + case DATATYPE_IMG_DIFF: + break; + case DATATYPE_IMG_RAW_1BPP: + case DATATYPE_IMG_RAW_2BPP: + printf("RAW_BPP\r\n"); + // check if this download is currently displayed or active + if (curDataInfo.dataSize == 0 && !memcmp((const void *)&avail->dataVer, (const void *)&curDataInfo.dataVer, 8)) + { + // we've downloaded this already, we're guessing it's already displayed + printf("currently shown image, send xfc\r\n"); + sendXferComplete(); + return true; + } + + // check if we've seen this version before + curImgSlot = findSlot((uint8_t *)&(avail->dataVer)); + if (curImgSlot != 0xFF) + { + // found a (complete)valid image slot for this version + sendXferComplete(); + + printf("already seen, drawing from eeprom slot %d\r\n", curImgSlot); + + // mark as completed and draw from EEPROM + memcpy(&curDataInfo, (void *)avail, sizeof(struct AvailDataInfo)); + curDataInfo.dataSize = 0; // mark as transfer not pending + + drawWithLut = avail->dataTypeArgument; + wdt60s(); + drawImageFromEeprom(curImgSlot); + return true; + } + else + { + // not found in cache, prepare to download + printf("downloading to imgslot\r\n"); + drawWithLut = avail->dataTypeArgument; + if (downloadImageDataToEEPROM(avail)) + { + printf("download complete!\r\n"); + sendXferComplete(); + + wdt60s(); + drawImageFromEeprom(curImgSlot); + return true; + } + else + { + return false; + } + } + break; + case DATATYPE_FW_UPDATE: + if (downloadFWUpdate(avail)) + { + sendXferComplete(); + printf("firmware download complete, doing update.\r\n"); + write_ota_firmware_to_flash(); + // test_firmware_writing(); + } + else + { + return false; + } + break; + case DATATYPE_NFC_URL_DIRECT: + case DATATYPE_NFC_RAW_CONTENT: + break; + case DATATYPE_CUSTOM_LUT_OTA: + break; + return true; + } + return true; +} + +RAM uint32_t address = 0; +RAM uint8_t ramd_to_flash_temp_buffer[PAGE_SIZE]; +void test_firmware_writing() +{ + irq_disable(); + address = 0; + while (address < EEPROM_UPDATE_AREA_LEN) + { + // flash_erase_sector(address); + printf("Erasing sector: %X\r\n", address); + address += 0x1000; + } + address = 0; + while (address < EEPROM_UPDATE_AREA_LEN) + { + flash_read_page(EEPROM_UPDATA_AREA_START + address, PAGE_SIZE, ramd_to_flash_temp_buffer); + printf("Writing page: %X First 10 bytes: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\r\n", address, ramd_to_flash_temp_buffer[0], ramd_to_flash_temp_buffer[1], ramd_to_flash_temp_buffer[2], ramd_to_flash_temp_buffer[3], ramd_to_flash_temp_buffer[4], ramd_to_flash_temp_buffer[5], ramd_to_flash_temp_buffer[6], ramd_to_flash_temp_buffer[7], ramd_to_flash_temp_buffer[8], ramd_to_flash_temp_buffer[9]); + // flash_write_page(address, PAGE_SIZE, ramd_to_flash_temp_buffer); + address += PAGE_SIZE; + } + analog_write(SYS_DEEP_ANA_REG, analog_read(SYS_DEEP_ANA_REG) & (~SYS_NEED_REINIT_EXT32K)); + REG_ADDR8(0x6f) = 0x20; + printf("Now i will reset myself\r\n"); + while (1) + { + } +} + + _attribute_ram_code_ void write_ota_firmware_to_flash(void) +{ + irq_disable(); + address = 0; + while (address < EEPROM_UPDATE_AREA_LEN) + { + flash_mspi_write_ram(FLASH_SECT_ERASE_CMD, address, 1, NULL, 0); + address += 0x1000; + } + address = 0; + while (address < EEPROM_UPDATE_AREA_LEN) + { + flash_mspi_read_ram(FLASH_READ_CMD, EEPROM_UPDATA_AREA_START + address, 1, 0, ramd_to_flash_temp_buffer, PAGE_SIZE); + flash_mspi_write_ram(FLASH_WRITE_CMD, address, 1, ramd_to_flash_temp_buffer, PAGE_SIZE); + address += PAGE_SIZE; + } + analog_write(SYS_DEEP_ANA_REG, analog_read(SYS_DEEP_ANA_REG) & (~SYS_NEED_REINIT_EXT32K)); + REG_ADDR8(0x6f) = 0x20; + while (1) + { + } +} + +void initializeProto() +{ + getNumSlots(); + curHighSlotId = getHighSlotId(); +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/syncedproto.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/syncedproto.h new file mode 100644 index 00000000..ee29a5bd --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/syncedproto.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include + +extern uint8_t mSelfMac[]; +extern uint8_t currentChannel; +extern uint8_t APmac[]; + +extern uint8_t curImgSlot; + +extern void setupRadio(void); +extern void killRadio(void); + +extern struct AvailDataInfo *getAvailDataInfo(); +extern struct AvailDataInfo *getShortAvailDataInfo(); +extern void drawImageFromEeprom(const uint8_t imgSlot); +extern bool processAvailDataInfo(struct AvailDataInfo *avail); +extern void initializeProto(); +extern uint8_t detectAP(const uint8_t channel); +void write_ota_firmware_to_flash(void); diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/tag_types.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/tag_types.h new file mode 100644 index 00000000..5c19575d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/tag_types.h @@ -0,0 +1,42 @@ +#define SOLUM_154_SSD1619 0 +#define SOLUM_29_SSD1619 0x01 +#define SOLUM_29_SSD1619_HIGH_RES 0x03 +#define SOLUM_29_UC8151 0x11 +#define SOLUM_42_SSD1619 0x02 +#define SOLUM_SEG_UK 0xF0 +#define SOLUM_SEG_EU 0xF1 +#define SOLUM_NODISPLAY 0xFF + +#define CAPABILITY_SUPPORTS_COMPRESSION 0x02 +#define CAPABILITY_SUPPORTS_CUSTOM_LUTS 0x04 +#define CAPABILITY_ALT_LUT_SIZE 0x08 +#define CAPABILITY_HAS_EXT_POWER 0x10 +#define CAPABILITY_HAS_WAKE_BUTTON 0x20 +#define CAPABILITY_HAS_NFC 0x40 +#define CAPABILITY_NFC_WAKE 0x80 + +#define DATATYPE_NOUPDATE 0 +#define DATATYPE_IMG_BMP 2 +#define DATATYPE_FW_UPDATE 3 +#define DATATYPE_IMG_DIFF 0x10 // always 1BPP +#define DATATYPE_IMG_RAW_1BPP 0x20 // 2888 bytes for 1.54" / 4736 2.9" / 15000 4.2" +#define DATATYPE_IMG_RAW_2BPP 0x21 // 5776 bytes for 1.54" / 9472 2.9" / 30000 4.2" +#define DATATYPE_IMG_RAW_1BPP_DIRECT 0x3F // only for 1.54", don't write to EEPROM, but straightaway to the EPD +#define DATATYPE_UK_SEGMENTED 0x51 // Segmented data for the UK Segmented display type (contained in availableData Reply) +#define DATATYPE_EU_SEGMENTED 0x52 // Segmented data for the EU/DE Segmented display type (contained in availableData Reply) +#define DATATYPE_NFC_RAW_CONTENT 0xA0 // raw memory content for the NT3H1101 +#define DATATYPE_NFC_URL_DIRECT 0xA1 // URL format for NT3H1101 +#define DATATYPE_TAG_CONFIG_DATA 0xA8 // Config data for tag +#define DATATYPE_COMMAND_DATA 0xAF // Command for the tag to execute (contained in availableData Reply) +#define DATATYPE_CUSTOM_LUT_OTA 0xB0 // Custom OTA updated LUT + +#define CMD_DO_REBOOT 0 +#define CMD_DO_SCAN 1 +#define CMD_DO_RESET_SETTINGS 2 + +#define WAKEUP_REASON_TIMED 0 +#define WAKEUP_REASON_GPIO 2 +#define WAKEUP_REASON_NFC 3 +#define WAKEUP_REASON_FIRSTBOOT 0xFC +#define WAKEUP_REASON_NETWORK_SCAN 0xFD +#define WAKEUP_REASON_WDT_RESET 0xFE \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/uart.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/uart.c new file mode 100644 index 00000000..7674561e --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/uart.c @@ -0,0 +1,44 @@ +#include +#include "tl_common.h" +#include "uart.h" +#include "main.h" + +#define RXD GPIO_PA0 +#define TXD GPIO_PB1 + +void init_uart(void) +{ + gpio_set_func(TXD, AS_GPIO); + gpio_set_output_en(TXD, 1); + gpio_write(TXD, 0); + gpio_set_func(RXD, AS_GPIO); + gpio_set_input_en(RXD, 1); + gpio_set_output_en(RXD, 0); + + uart_gpio_set(UART_TX_PB1, UART_RX_PA0); + uart_reset(); + uart_init(12, 15, PARITY_NONE, STOP_BIT_ONE); // baud rate: 115200 + uart_dma_enable(0, 0); + dma_chn_irq_enable(0, 0); + uart_irq_enable(0, 0); + uart_ndma_irq_triglevel(0, 0); +} + + void puts(const char *str) +{ + while (*str != '\0') + { + putchar_custom((char)*str); + str++; + } +} + +int putchar_custom(int c) +{ + uart_ndma_send_byte((char)c); + while (uart_tx_is_busy()) + { + sleep_us(10); + }; + return 0; +} \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/uart.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/uart.h new file mode 100644 index 00000000..9ccfd4c4 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/uart.h @@ -0,0 +1,4 @@ +#pragma once + +void init_uart(void); +int putchar_custom(int c); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/version_cfg.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/version_cfg.h new file mode 100644 index 00000000..3b5d3419 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/version_cfg.h @@ -0,0 +1,55 @@ +/******************************************************************************************************** + * @file version_cfg.h + * + * @brief This is the header file for version_cfg + * + * @author Zigbee Group + * @date 2021 + * + * @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************************************/ + +#pragma once + +#include "comm_cfg.h" + +#if defined(MCU_CORE_826x) + #if (CHIP_8269) + #define CHIP_TYPE TLSR_8269 + #else + #define CHIP_TYPE TLSR_8267 + #endif +#elif defined(MCU_CORE_8258) + #define CHIP_TYPE TLSR_8258_512K//TLSR_8258_1M +#elif defined(MCU_CORE_8278) + #define CHIP_TYPE TLSR_8278 +#elif defined(MCU_CORE_B91) + #define CHIP_TYPE TLSR_B91 +#endif + +/********************************************************************************************* + * During OTA upgrade, the upgraded device will check the rules of the following three fields. + * Refer to ZCL OTA specification for details. + */ +#define MANUFACTURER_CODE_TELINK 0x1141//Telink ID +#define IMAGE_TYPE ((CHIP_TYPE << 8) | 0) +#define FILE_VERSION (0) + +/* Pre-compiled link configuration. */ +#define IS_BOOT_LOADER_IMAGE 0 +#define RESV_FOR_APP_RAM_CODE_SIZE 0 +#define IMAGE_OFFSET APP_IMAGE_ADDR diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/wdt.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/wdt.c new file mode 100644 index 00000000..a4bc3fcb --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/wdt.c @@ -0,0 +1,11 @@ + +#include "wdt.h" +#include "../tl_common.h" + +void watchdog_enable(int timeout) +{ + wd_stop(); + drv_wd_setInterval(timeout); + drv_wd_start(); + drv_wd_clear(); +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/wdt.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/wdt.h new file mode 100644 index 00000000..ec23bb76 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/wdt.h @@ -0,0 +1,29 @@ + +#pragma once + + +void watchdog_enable(int timeout); + +#define wdt10s() \ + do \ + { \ + watchdog_enable(10000); \ + } while (0) + +#define wdt30s() \ + do \ + { \ + watchdog_enable(30000); \ + } while (0) + +#define wdt60s() \ + do \ + { \ + watchdog_enable(60000); \ + } while (0) + +#define wdt120s() \ + do \ + { \ + watchdog_enable(120000); \ + } while (0) diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/zigbee.c b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/zigbee.c new file mode 100644 index 00000000..6f835f2c --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/zigbee.c @@ -0,0 +1,178 @@ +#include "tl_common.h" +#include "main.h" +#include "zigbee.h" +#include +#include + +RAM _attribute_aligned_(4) volatile uint8_t rf_tx_buf[ZB_RADIO_TX_HDR_LEN + 250]; +RAM _attribute_aligned_(4) volatile uint8_t rf_rx_buf[ZB_RADIO_TX_HDR_LEN + 250]; + +#define LOGICCHANNEL_TO_PHYSICAL(p) (((p)-10) * 5) +void rf_setChannel(uint8_t chn) +{ + u32 r = drv_disable_irq(); + uint8_t phySta = ZB_RADIO_TRX_STA_GET(); + ZB_RADIO_TRX_SWITCH(phySta, LOGICCHANNEL_TO_PHYSICAL(chn)); + drv_restore_irq(r); +} + +RAM volatile uint8_t tx_done = 0; +void zigbee_tx(uint8_t *buf, uint8_t len) +{ + ZB_RADIO_DMA_HDR_BUILD(rf_tx_buf, len); + rf_tx_buf[4] = len + 2; + memcpy(rf_tx_buf + 5, buf, len); + WaitUs(ZB_TX_WAIT_US); + ZB_RADIO_RX_DONE_CLR; + tx_done = 0; + ZB_RADIO_TX_START(rf_tx_buf); + while (!tx_done) + ; +} + +#define ZB_MAX_BUFFER 50 + +RAM volatile uint8_t rxed = 0; +RAM volatile uint8_t bbb[ZB_MAX_BUFFER][250]; +RAM volatile uint8_t len = 0; +RAM volatile uint8_t rssi = 0; +RAM volatile uint8_t current_buff = 0; +RAM volatile uint8_t current_buff_worked = 0; + +uint8_t getRxBuffer(uint8_t *bufferout, uint8_t *rssiout) +{ + if (current_buff != current_buff_worked) + { + uint8_t len_rx = bbb[current_buff_worked][0]; + *rssiout = bbb[current_buff_worked][1]; + memcpy(bufferout, (uint8_t *)&bbb[current_buff_worked][2], len_rx); + current_buff_worked++; + current_buff_worked %= ZB_MAX_BUFFER; + return len_rx; + } + return 0; +} + +void init_zigbee(uint_fast8_t channel) +{ + current_buff_worked = current_buff; + rf_set_power_level_index(RF_POWER_INDEX_P3p01dBm); + rf_drv_init(RF_MODE_ZIGBEE_250K); + rf_drv_cap(CFG_FREQUENCY_OFFSET); + drv_hwTmr_init(TIMER_IDX_3, TIMER_MODE_SCLK); + ZB_RADIO_IRQ_MASK_SET; + rf_setChannel(channel); +} + +void zigbee_off() +{ + rf_set_tx_rx_off(); + current_buff_worked = current_buff; +} + +void zigbee_rx_start() +{ + rf_rx_buffer_set(rf_rx_buf, 250, 0); + rf_set_tx_rx_off(); + rf_set_rxmode(); +} + + __attribute__((optimize("-Os"))) void rf_tx_irq_handler(void) +{ + // printf("TX IRQ\r\n"); + ZB_RADIO_TX_DONE_CLR; + tx_done = 1; +} + + __attribute__((optimize("-Os"))) void rf_rx_irq_handler(void) +{ + if (RF_DMA_BUSY()) + { + return; + } + ZB_RADIO_RX_DISABLE; + if ((!ZB_RADIO_CRC_OK(rf_rx_buf)) || (!ZB_RADIO_PACKET_LENGTH_OK(rf_rx_buf))) + { + ZB_RADIO_RX_BUF_CLEAR(rf_rx_buf); + ZB_RADIO_RX_ENABLE; + return; + } + + bbb[current_buff][0] = rf_rx_buf[4] - 2; + bbb[current_buff][1] = (read_reg8(0x449)); + memcpy((uint8_t *)&bbb[current_buff][2], (uint8_t *)&rf_rx_buf[5], bbb[current_buff][0]); + current_buff++; + current_buff %= ZB_MAX_BUFFER; + ZB_RADIO_RX_BUF_CLEAR(rf_rx_buf); + ZB_RADIO_RX_ENABLE; +} + +uint8_t channelList[6] = {11, 15, 20, 25, 26, 27}; + +bool next_ack = 0; +int state = 0; + +#define RADIO_MAX_PACKET_LEN (250) + +uint8_t seq_nr = 0; +uint8_t get_seq_nr() +{ + return seq_nr++; +} + +#define MAX_RX_PKTS 8 + +volatile uint8_t mRxBufs[MAX_RX_PKTS][RADIO_MAX_PACKET_LEN + 1 /* length */ + 1 /* LQI */ + 1 /* RSSI */]; +volatile uint8_t mRxNextWrite, mRxNextRead, mRxNumFree, mRxNumGot; +bool mRxEnabled = false; + +RAM uint8_t our_ch = 11; +bool radioSetChannel(uint_fast8_t channel) +{ + our_ch = channel; + init_zigbee(channel); + return true; +} + +bool radioRxEnable(bool on) +{ + if (on) + zigbee_rx_start(); + return true; +} + +void radioRxFlush(void) +{ + current_buff_worked = current_buff; +} + +bool radioInit(void) +{ + return 1; +} + +int32_t radioRxDequeuePkt(uint8_t *dstBuf, uint32_t maxLen, int8_t *rssiP, uint8_t *lqiP) +{ + u8 curr_rx = getRxBuffer(dstBuf, lqiP); + *rssiP = lqiP; + + /*if (curr_rx) + { + + printf("RX: "); + for (int i = 0; i < curr_rx; i++) + { + printf(" %02X", dstBuf[i]); + } + printf("\r\n"); + }*/ + return curr_rx; +} + +bool radioTxLL(uint8_t *pkt) +{ + init_zigbee(our_ch); + zigbee_tx((uint8_t *)&pkt[1], pkt[0] - 2); + zigbee_rx_start(); + return true; +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/src/zigbee.h b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/zigbee.h new file mode 100644 index 00000000..a049266d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/src/zigbee.h @@ -0,0 +1,17 @@ +#pragma once + +#include +#include +extern uint8_t channelList[6]; +void init_zigbee(uint_fast8_t channel); +uint8_t getRxBuffer(uint8_t *bufferout, uint8_t *rssiout); +void zigbee_tx(uint8_t *buf, uint8_t len); +void zigbee_off(); +void zigbee_rx_start(); + +bool radioSetChannel(uint_fast8_t channel); +bool radioRxEnable(bool on); +void radioRxFlush(void); +bool radioInit(void); +int32_t radioRxDequeuePkt(uint8_t *dstBuf, uint32_t maxLen, int8_t *rssiP, uint8_t *lqiP); +bool radioTxLL(uint8_t *pkt); \ No newline at end of file diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/[.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/[.exe new file mode 100644 index 00000000..6ac31c2f Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/[.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/addr2line.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/addr2line.exe new file mode 100644 index 00000000..279aaa2b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/addr2line.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ar.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ar.exe new file mode 100644 index 00000000..dc0b3664 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ar.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/arch.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/arch.exe new file mode 100644 index 00000000..df867727 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/arch.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/as.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/as.exe new file mode 100644 index 00000000..a9205bc2 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/as.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ash.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ash.exe new file mode 100644 index 00000000..a9aea03a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ash.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/awk b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/awk new file mode 100644 index 00000000..2211e1ba Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/awk differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/base32.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/base32.exe new file mode 100644 index 00000000..cb50c676 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/base32.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/base64.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/base64.exe new file mode 100644 index 00000000..c61e3017 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/base64.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/basename.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/basename.exe new file mode 100644 index 00000000..5d19d506 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/basename.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bash.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bash.exe new file mode 100644 index 00000000..1f741f18 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bash.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bashbug b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bashbug new file mode 100644 index 00000000..58db9456 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bashbug @@ -0,0 +1,271 @@ +#!/bin/sh - +# +# bashbug - create a bug report and mail it to the bug address +# +# The bug address depends on the release status of the shell. Versions +# with status `devel', `alpha', `beta', or `rc' mail bug reports to +# chet@cwru.edu and, optionally, to bash-testers@cwru.edu. +# Other versions send mail to bug-bash@gnu.org. +# +# Copyright (C) 1996-2004 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# configuration section: +# these variables are filled in by the make target in Makefile +# +MACHINE="i686" +OS="cygwin" +CC="gcc" +CFLAGS=" -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I. -I/usr/src/bash-4.3.42-4.i686/src/bash-4.3 -I/usr/src/bash-4.3.42-4.i686/src/bash-4.3/include -I/usr/src/bash-4.3.42-4.i686/src/bash-4.3/lib -DWORDEXP_OPTION -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/bash-4.3.42-4.i686/build=/usr/src/debug/bash-4.3.42-4 -fdebug-prefix-map=/usr/src/bash-4.3.42-4.i686/src/bash-4.3=/usr/src/debug/bash-4.3.42-4" +RELEASE="4.3" +PATCHLEVEL="42" +RELSTATUS="release" +MACHTYPE="i686-pc-cygwin" + +PATH=/bin:/usr/bin:/usr/local/bin:$PATH +export PATH + +# Check if TMPDIR is set, default to /tmp +: ${TMPDIR:=/tmp} + +#Securely create a temporary directory for the temporary files +TEMPDIR=$TMPDIR/bbug.$$ +(umask 077 && mkdir $TEMPDIR) || { + echo "$0: could not create temporary directory" >&2 + exit 1 +} + +TEMPFILE1=$TEMPDIR/bbug1 +TEMPFILE2=$TEMPDIR/bbug2 + +USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" +VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" + +do_help= do_version= + +while [ $# -gt 0 ]; do + case "$1" in + --help) shift ; do_help=y ;; + --version) shift ; do_version=y ;; + --) shift ; break ;; + -*) echo "bashbug: ${1}: invalid option" >&2 + echo "$USAGE" >& 2 + exit 2 ;; + *) break ;; + esac +done + +if [ -n "$do_version" ]; then + echo "${VERSTR}" + exit 0 +fi + +if [ -n "$do_help" ]; then + echo "${VERSTR}" + echo "${USAGE}" + echo + cat << HERE_EOF +Bashbug is used to send mail to the Bash maintainers +for when Bash doesn't behave like you'd like, or expect. + +Bashbug will start up your editor (as defined by the shell's +EDITOR environment variable) with a preformatted bug report +template for you to fill in. The report will be mailed to the +bug-bash mailing list by default. See the manual for details. + +If you invoke bashbug by accident, just quit your editor without +saving any changes to the template, and no bug report will be sent. +HERE_EOF + exit 0 +fi + +# Figure out how to echo a string without a trailing newline +N=`echo 'hi there\c'` +case "$N" in +*c) n=-n c= ;; +*) n= c='\c' ;; +esac + +BASHTESTERS="bash-testers@cwru.edu" + +case "$RELSTATUS" in +alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;; +*) BUGBASH=bug-bash@gnu.org ;; +esac + +case "$RELSTATUS" in +alpha*|beta*|devel*|rc*) + echo "$0: This is a testing release. Would you like your bug report" + echo "$0: to be sent to the bash-testers mailing list?" + echo $n "$0: Send to bash-testers? $c" + read ans + case "$ans" in + y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;; + esac ;; +esac + +BUGADDR="${1-$BUGBASH}" + +if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then + if [ -x /usr/bin/editor ]; then + DEFEDITOR=editor + elif [ -x /usr/local/bin/ce ]; then + DEFEDITOR=ce + elif [ -x /usr/local/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/contrib/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/bin/xemacs ]; then + DEFEDITOR=xemacs + elif [ -x /usr/contrib/bin/jove ]; then + DEFEDITOR=jove + elif [ -x /usr/local/bin/jove ]; then + DEFEDITOR=jove + elif [ -x /usr/bin/vi ]; then + DEFEDITOR=vi + else + echo "$0: No default editor found: attempting to use vi" >&2 + DEFEDITOR=vi + fi +fi + + +: ${EDITOR=$DEFEDITOR} + +: ${USER=${LOGNAME-`whoami`}} + +trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15 +trap 'rm -rf "$TEMPDIR"' 0 + +UN= +if (uname) >/dev/null 2>&1; then + UN=`uname -a` +fi + +if [ -f /usr/lib/sendmail ] ; then + RMAIL="/usr/lib/sendmail" + SMARGS="-i -t" +elif [ -f /usr/sbin/sendmail ] ; then + RMAIL="/usr/sbin/sendmail" + SMARGS="-i -t" +else + RMAIL=rmail + SMARGS="$BUGADDR" +fi + +INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]' + +cat > "$TEMPFILE1" <> $HOME/dead.bashbug + echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2 +} + +exit 0 diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bunzip2.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bunzip2.exe new file mode 100644 index 00000000..066a98e9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bunzip2.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzcat.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzcat.exe new file mode 100644 index 00000000..893a0009 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzcat.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzcmp b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzcmp new file mode 100644 index 00000000..2a6acaf9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzcmp differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzdiff b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzdiff new file mode 100644 index 00000000..6fc38f92 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzdiff @@ -0,0 +1,76 @@ +#!/bin/sh +# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh + +# Bzcmp/diff wrapped for bzip2, +# adapted from zdiff by Philippe Troin for Debian GNU/Linux. + +# Bzcmp and bzdiff are used to invoke the cmp or the diff pro- +# gram on compressed files. All options specified are passed +# directly to cmp or diff. If only 1 file is specified, then +# the files compared are file1 and an uncompressed file1.gz. +# If two files are specified, then they are uncompressed (if +# necessary) and fed to cmp or diff. The exit status from cmp +# or diff is preserved. + +PATH="/usr/bin:/bin:$PATH"; export PATH +prog=`echo $0 | sed 's|.*/||'` +case "$prog" in + *cmp) comp=${CMP-cmp} ;; + *) comp=${DIFF-diff} ;; +esac + +OPTIONS= +FILES= +for ARG +do + case "$ARG" in + -*) OPTIONS="$OPTIONS $ARG";; + *) if test -f "$ARG"; then + FILES="$FILES $ARG" + else + echo "${prog}: $ARG not found or not a regular file" + exit 1 + fi ;; + esac +done +if test -z "$FILES"; then + echo "Usage: $prog [${comp}_options] file [file]" + exit 1 +fi +tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || { + echo 'cannot create a temporary file' >&2 + exit 1 +} +set $FILES +if test $# -eq 1; then + FILE=`echo "$1" | sed 's/.bz2$//'` + bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE" + STAT="$?" + +elif test $# -eq 2; then + case "$1" in + *.bz2) + case "$2" in + *.bz2) + F=`echo "$2" | sed 's|.*/||;s|.bz2$||'` + bzip2 -cdfq "$2" > $tmp + bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp + STAT="$?" + /bin/rm -f $tmp;; + + *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" + STAT="$?";; + esac;; + *) case "$2" in + *.bz2) + bzip2 -cdfq "$2" | $comp $OPTIONS "$1" - + STAT="$?";; + *) $comp $OPTIONS "$1" "$2" + STAT="$?";; + esac;; + esac + exit "$STAT" +else + echo "Usage: $prog [${comp}_options] file [file]" + exit 1 +fi diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzegrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzegrep new file mode 100644 index 00000000..18b974ca Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzegrep differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzfgrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzfgrep new file mode 100644 index 00000000..18b974ca Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzfgrep differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzgrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzgrep new file mode 100644 index 00000000..37de592d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzgrep @@ -0,0 +1,132 @@ +#!/bin/sh + +# bzgrep -- a wrapper around a grep program that decompresses files as needed +# Adapted from zgrep of the Debian gzip package by Anibal Monsalve Salazar. +# Adapted from a version sent by Charles Levert + +# Copyright (C) 1998, 2001, 2002 Free Software Foundation +# Copyright (C) 1993 Jean-loup Gailly + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +PATH="/usr/bin:$PATH"; export PATH + +prog=`echo "$0" | sed 's|.*/||'` +case "$prog" in + *egrep) grep=${EGREP-egrep} ;; + *fgrep) grep=${FGREP-fgrep} ;; + *) grep=${GREP-grep} ;; +esac + +pat="" +after_dash_dash="" +files_with_matches=0 +files_without_matches=0 +no_filename=0 +with_filename=0 + +while test $# -ne 0; do + case "$after_dash_dash$1" in + --d* | --rec*) echo >&2 "$0: $1: option not supported"; exit 2;; + --files-with-*) files_with_matches=1;; + --files-witho*) files_without_matches=1;; + --no-f*) no_filename=1;; + --wi*) with_filename=1;; + --*) ;; + -*) + case "$1" in + -*[dr]*) echo >&2 "$0: $1: option not supported"; exit 2;; + esac + case "$1" in + -*H*) with_filename=1;; + esac + case "$1" in + -*h*) no_filename=1;; + esac + case "$1" in + -*L*) files_without_matches=1;; + esac + case "$1" in + -*l*) files_with_matches=1;; + esac;; + esac + case "$after_dash_dash$1" in + -[ef]) opt="$opt $1"; shift; pat="$1" + if test "$grep" = grep; then # grep is buggy with -e on SVR4 + grep=egrep + fi;; + -[ABCdm])opt="$opt $1 $2"; shift;; + --) opt="$opt $1"; after_dash_dash=1;; + -*) opt="$opt $1";; + *) if test -z "$pat"; then + pat="$1" + else + break; + fi;; + esac + shift +done + +if test -z "$pat"; then + echo "grep through bzip2 files" + echo "usage: $prog [grep_options] pattern [files]" + exit 2 +fi + +if test $# -eq 0; then + bzip2 -cdfq | $grep $opt "$pat" + exit $? +fi + +res=0 +for i do + bzip2 -cdfq -- "$i" | + if test $files_with_matches -eq 1; then + $grep $opt "$pat" > /dev/null && printf "%s\n" "$i" + elif test $files_without_matches -eq 1; then + $grep $opt "$pat" > /dev/null || printf "%s\n" "$i" + elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then + $grep $opt "$pat" + else + i=$(echo "$i" | sed -e 's/[\\|&]/\\&/g') + if test $with_filename -eq 1; then + sed_script="s|^[^:]*:|${i}:|" + else + sed_script="s|^|${i}:|" + fi + # Hack adapted from GPLed code at + # http://home.comcast.net/~j.p.h/cus-faq-2 + # Has the same effect as the following two lines of bash: + # + # $grep $opt "$pat" | sed "$sed_script" + # exit ${PIPESTATUS[0]} + # + # Inside the `...`, fd4 goes to the pipe whose other end is read + # and passed to eval; fd1 is the normal standard output + # preserved the line before with exec 3>&1 + exec 3>&1 + eval ` + exec 4>&1 >&3 3>&- + { + $grep $opt "$pat" 4>&-; echo "r=$?;" >&4 + } | sed "$sed_script" + ` + exit $r + fi + r=$? + test $res -lt $r && res=$r +done +exit $res diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzip2.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzip2.exe new file mode 100644 index 00000000..cc6ae189 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzip2.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzip2recover.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzip2recover.exe new file mode 100644 index 00000000..6aca3f1f Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzip2recover.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzless b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzless new file mode 100644 index 00000000..e465ea89 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzless differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzmore b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzmore new file mode 100644 index 00000000..f423ed90 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/bzmore @@ -0,0 +1,61 @@ +#!/bin/sh + +# Bzmore wrapped for bzip2, +# adapted from zmore by Philippe Troin for Debian GNU/Linux. + +PATH="/usr/bin:$PATH"; export PATH + +prog=`echo $0 | sed 's|.*/||'` +case "$prog" in + *less) more=less ;; + *) more=more ;; +esac + +if test "`echo -n a`" = "-n a"; then + # looks like a SysV system: + n1=''; n2='\c' +else + n1='-n'; n2='' +fi +oldtty=`stty -g 2>/dev/null` +if stty -cbreak 2>/dev/null; then + cb='cbreak'; ncb='-cbreak' +else + # 'stty min 1' resets eof to ^a on both SunOS and SysV! + cb='min 1 -icanon'; ncb='icanon eof ^d' +fi +if test $? -eq 0 && test -n "$oldtty"; then + trap 'stty $oldtty 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM +else + trap 'stty $ncb echo 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM +fi + +if test $# = 0; then + if test -t 0; then + echo usage: $prog files... + else + bzip2 -cdfq | eval $more + fi +else + FIRST=1 + for FILE + do + if test $FIRST -eq 0; then + echo $n1 "--More--(Next file: $FILE)$n2" + stty $cb -echo 2>/dev/null + ANS=`dd bs=1 count=1 2>/dev/null` + stty $ncb echo 2>/dev/null + echo " " + if test "$ANS" = 'e' || test "$ANS" = 'q'; then + exit + fi + fi + if test "$ANS" != 's'; then + echo "------> $FILE <------" + bzip2 -cdfq "$FILE" | eval $more + fi + if test -t; then + FIRST=0 + fi + done +fi diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/c++filt.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/c++filt.exe new file mode 100644 index 00000000..67924619 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/c++filt.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/c2ph b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/c2ph new file mode 100644 index 00000000..2e3293be --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/c2ph @@ -0,0 +1,1367 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +# +# +# c2ph (aka pstruct) +# Tom Christiansen, +# +# As pstruct, dump C structures as generated from 'cc -g -S' stabs. +# As c2ph, do this PLUS generate perl code for getting at the structures. +# +# See the usage message for more. If this isn't enough, read the code. +# + +=head1 NAME + +c2ph, pstruct - Dump C structures as generated from C stabs + +=head1 SYNOPSIS + + c2ph [-dpnP] [var=val] [files ...] + +=head2 OPTIONS + + Options: + + -w wide; short for: type_width=45 member_width=35 offset_width=8 + -x hex; short for: offset_fmt=x offset_width=08 size_fmt=x size_width=04 + + -n do not generate perl code (default when invoked as pstruct) + -p generate perl code (default when invoked as c2ph) + -v generate perl code, with C decls as comments + + -i do NOT recompute sizes for intrinsic datatypes + -a dump information on intrinsics also + + -t trace execution + -d spew reams of debugging output + + -slist give comma-separated list a structures to dump + +=head1 DESCRIPTION + +The following is the old c2ph.doc documentation by Tom Christiansen + +Date: 25 Jul 91 08:10:21 GMT + +Once upon a time, I wrote a program called pstruct. It was a perl +program that tried to parse out C structures and display their member +offsets for you. This was especially useful for people looking at +binary dumps or poking around the kernel. + +Pstruct was not a pretty program. Neither was it particularly robust. +The problem, you see, was that the C compiler was much better at parsing +C than I could ever hope to be. + +So I got smart: I decided to be lazy and let the C compiler parse the C, +which would spit out debugger stabs for me to read. These were much +easier to parse. It's still not a pretty program, but at least it's more +robust. + +Pstruct takes any .c or .h files, or preferably .s ones, since that's +the format it is going to massage them into anyway, and spits out +listings like this: + + struct tty { + int tty.t_locker 000 4 + int tty.t_mutex_index 004 4 + struct tty * tty.t_tp_virt 008 4 + struct clist tty.t_rawq 00c 20 + int tty.t_rawq.c_cc 00c 4 + int tty.t_rawq.c_cmax 010 4 + int tty.t_rawq.c_cfx 014 4 + int tty.t_rawq.c_clx 018 4 + struct tty * tty.t_rawq.c_tp_cpu 01c 4 + struct tty * tty.t_rawq.c_tp_iop 020 4 + unsigned char * tty.t_rawq.c_buf_cpu 024 4 + unsigned char * tty.t_rawq.c_buf_iop 028 4 + struct clist tty.t_canq 02c 20 + int tty.t_canq.c_cc 02c 4 + int tty.t_canq.c_cmax 030 4 + int tty.t_canq.c_cfx 034 4 + int tty.t_canq.c_clx 038 4 + struct tty * tty.t_canq.c_tp_cpu 03c 4 + struct tty * tty.t_canq.c_tp_iop 040 4 + unsigned char * tty.t_canq.c_buf_cpu 044 4 + unsigned char * tty.t_canq.c_buf_iop 048 4 + struct clist tty.t_outq 04c 20 + int tty.t_outq.c_cc 04c 4 + int tty.t_outq.c_cmax 050 4 + int tty.t_outq.c_cfx 054 4 + int tty.t_outq.c_clx 058 4 + struct tty * tty.t_outq.c_tp_cpu 05c 4 + struct tty * tty.t_outq.c_tp_iop 060 4 + unsigned char * tty.t_outq.c_buf_cpu 064 4 + unsigned char * tty.t_outq.c_buf_iop 068 4 + (*int)() tty.t_oproc_cpu 06c 4 + (*int)() tty.t_oproc_iop 070 4 + (*int)() tty.t_stopproc_cpu 074 4 + (*int)() tty.t_stopproc_iop 078 4 + struct thread * tty.t_rsel 07c 4 + +etc. + + +Actually, this was generated by a particular set of options. You can control +the formatting of each column, whether you prefer wide or fat, hex or decimal, +leading zeroes or whatever. + +All you need to be able to use this is a C compiler than generates +BSD/GCC-style stabs. The B<-g> option on native BSD compilers and GCC +should get this for you. + +To learn more, just type a bogus option, like B<-\?>, and a long usage message +will be provided. There are a fair number of possibilities. + +If you're only a C programmer, than this is the end of the message for you. +You can quit right now, and if you care to, save off the source and run it +when you feel like it. Or not. + + + +But if you're a perl programmer, then for you I have something much more +wondrous than just a structure offset printer. + +You see, if you call pstruct by its other incybernation, c2ph, you have a code +generator that translates C code into perl code! Well, structure and union +declarations at least, but that's quite a bit. + +Prior to this point, anyone programming in perl who wanted to interact +with C programs, like the kernel, was forced to guess the layouts of +the C structures, and then hardwire these into his program. Of course, +when you took your wonderfully crafted program to a system where the +sgtty structure was laid out differently, your program broke. Which is +a shame. + +We've had Larry's h2ph translator, which helped, but that only works on +cpp symbols, not real C, which was also very much needed. What I offer +you is a symbolic way of getting at all the C structures. I've couched +them in terms of packages and functions. Consider the following program: + + #!/usr/local/bin/perl + + require 'syscall.ph'; + require 'sys/time.ph'; + require 'sys/resource.ph'; + + $ru = "\0" x &rusage'sizeof(); + + syscall(&SYS_getrusage, &RUSAGE_SELF, $ru) && die "getrusage: $!"; + + @ru = unpack($t = &rusage'typedef(), $ru); + + $utime = $ru[ &rusage'ru_utime + &timeval'tv_sec ] + + ($ru[ &rusage'ru_utime + &timeval'tv_usec ]) / 1e6; + + $stime = $ru[ &rusage'ru_stime + &timeval'tv_sec ] + + ($ru[ &rusage'ru_stime + &timeval'tv_usec ]) / 1e6; + + printf "you have used %8.3fs+%8.3fu seconds.\n", $utime, $stime; + + +As you see, the name of the package is the name of the structure. Regular +fields are just their own names. Plus the following accessor functions are +provided for your convenience: + + struct This takes no arguments, and is merely the number of first-level + elements in the structure. You would use this for indexing + into arrays of structures, perhaps like this + + + $usec = $u[ &user'u_utimer + + (&ITIMER_VIRTUAL * &itimerval'struct) + + &itimerval'it_value + + &timeval'tv_usec + ]; + + sizeof Returns the bytes in the structure, or the member if + you pass it an argument, such as + + &rusage'sizeof(&rusage'ru_utime) + + typedef This is the perl format definition for passing to pack and + unpack. If you ask for the typedef of a nothing, you get + the whole structure, otherwise you get that of the member + you ask for. Padding is taken care of, as is the magic to + guarantee that a union is unpacked into all its aliases. + Bitfields are not quite yet supported however. + + offsetof This function is the byte offset into the array of that + member. You may wish to use this for indexing directly + into the packed structure with vec() if you're too lazy + to unpack it. + + typeof Not to be confused with the typedef accessor function, this + one returns the C type of that field. This would allow + you to print out a nice structured pretty print of some + structure without knoning anything about it beforehand. + No args to this one is a noop. Someday I'll post such + a thing to dump out your u structure for you. + + +The way I see this being used is like basically this: + + % h2ph /usr/lib/perl/tmp.ph + % c2ph some_include_file.h >> /usr/lib/perl/tmp.ph + % install + +It's a little tricker with c2ph because you have to get the includes right. +I can't know this for your system, but it's not usually too terribly difficult. + +The code isn't pretty as I mentioned -- I never thought it would be a 1000- +line program when I started, or I might not have begun. :-) But I would have +been less cavalier in how the parts of the program communicated with each +other, etc. It might also have helped if I didn't have to divine the makeup +of the stabs on the fly, and then account for micro differences between my +compiler and gcc. + +Anyway, here it is. Should run on perl v4 or greater. Maybe less. + + + --tom + +=cut + +$RCSID = '$Id: c2ph,v 1.7 95/10/28 10:41:47 tchrist Exp Locker: tchrist $'; + +use File::Temp; + +###################################################################### + +# some handy data definitions. many of these can be reset later. + +$bitorder = 'b'; # ascending; set to B for descending bit fields + +%intrinsics = +%template = ( + 'char', 'c', + 'unsigned char', 'C', + 'short', 's', + 'short int', 's', + 'unsigned short', 'S', + 'unsigned short int', 'S', + 'short unsigned int', 'S', + 'int', 'i', + 'unsigned int', 'I', + 'long', 'l', + 'long int', 'l', + 'unsigned long', 'L', + 'unsigned long', 'L', + 'long unsigned int', 'L', + 'unsigned long int', 'L', + 'long long', 'q', + 'long long int', 'q', + 'unsigned long long', 'Q', + 'unsigned long long int', 'Q', + 'float', 'f', + 'double', 'd', + 'pointer', 'p', + 'null', 'x', + 'neganull', 'X', + 'bit', $bitorder, +); + +&buildscrunchlist; +delete $intrinsics{'neganull'}; +delete $intrinsics{'bit'}; +delete $intrinsics{'null'}; + +# use -s to recompute sizes +%sizeof = ( + 'char', '1', + 'unsigned char', '1', + 'short', '2', + 'short int', '2', + 'unsigned short', '2', + 'unsigned short int', '2', + 'short unsigned int', '2', + 'int', '4', + 'unsigned int', '4', + 'long', '4', + 'long int', '4', + 'unsigned long', '4', + 'unsigned long int', '4', + 'long unsigned int', '4', + 'long long', '8', + 'long long int', '8', + 'unsigned long long', '8', + 'unsigned long long int', '8', + 'float', '4', + 'double', '8', + 'pointer', '4', +); + +($type_width, $member_width, $offset_width, $size_width) = (20, 20, 6, 5); + +($offset_fmt, $size_fmt) = ('d', 'd'); + +$indent = 2; + +$CC = 'cc'; +$CFLAGS = '-gstabs -S'; +$DEFINES = ''; + +$perl++ if $0 =~ m#/?c2ph$#; + +use Getopt::Std qw(getopts); + +use File::Temp 'tempdir'; + +eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_]+=)(.*)/ && shift; + +getopts('aixdpvtnws:') || &usage(0); + +$opt_d && $debug++; +$opt_t && $trace++; +$opt_p && $perl++; +$opt_v && $verbose++; +$opt_n && ($perl = 0); + +if ($opt_w) { + ($type_width, $member_width, $offset_width) = (45, 35, 8); +} +if ($opt_x) { + ($offset_fmt, $offset_width, $size_fmt, $size_width) = ( 'x', '08', 'x', 04 ); +} + +eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_]+=)(.*)/ && shift; + +sub PLUMBER { + select(STDERR); + print "oops, apparent pager foulup\n"; + $isatty++; + &usage(1); +} + +sub usage { + local($oops) = @_; + unless (-t STDOUT) { + select(STDERR); + } elsif (!$oops) { + $isatty++; + $| = 1; + print "hit for further explanation: "; + ; + open (PIPE, "|". ($ENV{PAGER} || 'more')); + $SIG{PIPE} = PLUMBER; + select(PIPE); + } + + print "usage: $0 [-dpnP] [var=val] [files ...]\n"; + + exit unless $isatty; + + print < 1, CLEANUP => 1) + unless (defined($SAFEDIR)); +} + +undef $SAFEDIR; + +$recurse = 1; + +if (@ARGV) { + if (grep(!/\.[csh]$/,@ARGV)) { + warn "Only *.[csh] files expected!\n"; + &usage; + } + elsif (grep(/\.s$/,@ARGV)) { + if (@ARGV > 1) { + warn "Only one *.s file allowed!\n"; + &usage; + } + } + elsif (@ARGV == 1 && $ARGV[0] =~ /\.c$/) { + local($dir, $file) = $ARGV[0] =~ m#(.*/)?(.*)$#; + $chdir = "cd $dir && " if $dir; + &system("$chdir$CC $CFLAGS $DEFINES $file") && exit 1; + $ARGV[0] =~ s/\.c$/.s/; + } + else { + &safedir; + $TMP = "$SAFEDIR/c2ph.$$.c"; + &system("cat @ARGV > $TMP") && exit 1; + &system("cd $SAFEDIR && $CC $CFLAGS $DEFINES $TMP") && exit 1; + unlink $TMP; + $TMP =~ s/\.c$/.s/; + @ARGV = ($TMP); + } +} + +if ($opt_s) { + for (split(/[\s,]+/, $opt_s)) { + $interested{$_}++; + } +} + + +$| = 1 if $debug; + +main: { + + if ($trace) { + if (-t && !@ARGV) { + print STDERR "reading from your keyboard: "; + } else { + print STDERR "reading from " . (@ARGV ? "@ARGV" : "").": "; + } + } + +STAB: while (<>) { + if ($trace && !($. % 10)) { + $lineno = $..''; + print STDERR $lineno, "\b" x length($lineno); + } + next unless /^\s*\.stabs\s+/; + $line = $_; + s/^\s*\.stabs\s+//; + if (s/\\\\"[d,]+$//) { + $saveline .= $line; + $savebar = $_; + next STAB; + } + if ($saveline) { + s/^"//; + $_ = $savebar . $_; + $line = $saveline; + } + &stab; + $savebar = $saveline = undef; + } + print STDERR "$.\n" if $trace; + unlink $TMP if $TMP; + + &compute_intrinsics if $perl && !$opt_i; + + print STDERR "resolving types\n" if $trace; + + &resolve_types; + &adjust_start_addrs; + + $sum = 2 + $type_width + $member_width; + $pmask1 = "%-${type_width}s %-${member_width}s"; + $pmask2 = "%-${sum}s %${offset_width}${offset_fmt}%s %${size_width}${size_fmt}%s"; + + + + if ($perl) { + # resolve template -- should be in stab define order, but even this isn't enough. + print STDERR "\nbuilding type templates: " if $trace; + for $i (reverse 0..$#type) { + next unless defined($name = $type[$i]); + next unless defined $struct{$name}; + ($iname = $name) =~ s/\..*//; + $build_recursed = 0; + &build_template($name) unless defined $template{&psou($name)} || + $opt_s && !$interested{$iname}; + } + print STDERR "\n\n" if $trace; + } + + print STDERR "dumping structs: " if $trace; + + local($iam); + + + + foreach $name (sort keys %struct) { + ($iname = $name) =~ s/\..*//; + next if $opt_s && !$interested{$iname}; + print STDERR "$name " if $trace; + + undef @sizeof; + undef @typedef; + undef @offsetof; + undef @indices; + undef @typeof; + undef @fieldnames; + + $mname = &munge($name); + + $fname = &psou($name); + + print "# " if $perl && $verbose; + $pcode = ''; + print "$fname {\n" if !$perl || $verbose; + $template{$fname} = &scrunch($template{$fname}) if $perl; + &pstruct($name,$name,0); + print "# " if $perl && $verbose; + print "}\n" if !$perl || $verbose; + print "\n" if $perl && $verbose; + + if ($perl) { + print "$pcode"; + + printf("\nsub %-32s { %4d; }\n\n", "${mname}'struct", $countof{$name}); + + print < $sizeof{$b}; } + + + foreach $name (sort keys %intrinsics) { + print '$',&munge($name),"'typedef = '", $template{$name}, "';\n"; + } + + print "\n1;\n" if $perl; + + exit; +} + +######################################################################################## + + +sub stab { + next unless $continued || /:[\$\w]+(\(\d+,\d+\))?=[\*\$\w]+/; # (\d+,\d+) is for sun + s/"// || next; + s/",([x\d]+),([x\d]+),([x\d]+),.*// || next; + + next if /^\s*$/; + + $size = $3 if $3; + $_ = $continued . $_ if length($continued); + if (s/\\\\$//) { + # if last 2 chars of string are '\\' then stab is continued + # in next stab entry + chop; + $continued = $_; + next; + } + $continued = ''; + + + $line = $_; + + if (($name, $pdecl) = /^([\$ \w]+):[tT]((\d+)(=[rufs*](\d+))+)$/) { + print "$name is a typedef for some funky pointers: $pdecl\n" if $debug; + &pdecl($pdecl); + next; + } + + + + if (/(([ \w]+):t(\d+|\(\d+,\d+\)))=r?(\d+|\(\d+,\d+\))(;\d+;\d+;)?/) { + local($ident) = $2; + push(@intrinsics, $ident); + $typeno = &typeno($3); + $type[$typeno] = $ident; + print STDERR "intrinsic $ident in new type $typeno\n" if $debug; + next; + } + + if (($name, $typeordef, $typeno, $extra, $struct, $_) + = /^([\$ \w]+):([ustT])(\d+|\(\d+,\d+\))(=[rufs*](\d+))?(.*)$/) + { + $typeno = &typeno($typeno); # sun foolery + } + elsif (/^[\$\w]+:/) { + next; # variable + } + else { + warn "can't grok stab: <$_> in: $line " if $_; + next; + } + + #warn "got size $size for $name\n"; + $sizeof{$name} = $size if $size; + + s/;[-\d]*;[-\d]*;$//; # we don't care about ranges + + $typenos{$name} = $typeno; + + unless (defined $type[$typeno]) { + &panic("type 0??") unless $typeno; + $type[$typeno] = $name unless defined $type[$typeno]; + printf "new type $typeno is $name" if $debug; + if ($extra =~ /\*/ && defined $type[$struct]) { + print ", a typedef for a pointer to " , $type[$struct] if $debug; + } + } else { + printf "%s is type %d", $name, $typeno if $debug; + print ", a typedef for " , $type[$typeno] if $debug; + } + print "\n" if $debug; + #next unless $extra =~ /[su*]/; + + #$type[$struct] = $name; + + if ($extra =~ /[us*]/) { + &sou($name, $extra); + $_ = &sdecl($name, $_, 0); + } + elsif (/^=ar/) { + print "it's a bare array typedef -- that's pretty sick\n" if $debug; + $_ = "$typeno$_"; + $scripts = ''; + $_ = &adecl($_,1); + + } + elsif (s/((\w+):t(\d+|\(\d+,\d+\)))?=r?(;\d+;\d+;)?//) { # the ?'s are for gcc + push(@intrinsics, $2); + $typeno = &typeno($3); + $type[$typeno] = $2; + print STDERR "intrinsic $2 in new type $typeno\n" if $debug; + } + elsif (s/^=e//) { # blessed be thy compiler; mine won't do this + &edecl; + } + else { + warn "Funny remainder for $name on line $_ left in $line " if $_; + } +} + +sub typeno { # sun thinks types are (0,27) instead of just 27 + local($_) = @_; + s/\(\d+,(\d+)\)/$1/; + $_; +} + +sub pstruct { + local($what,$prefix,$base) = @_; + local($field, $fieldname, $typeno, $count, $offset, $entry); + local($fieldtype); + local($type, $tname); + local($mytype, $mycount, $entry2); + local($struct_count) = 0; + local($pad, $revpad, $length, $prepad, $lastoffset, $lastlength, $fmt); + local($bits,$bytes); + local($template); + + + local($mname) = &munge($name); + + sub munge { + local($_) = @_; + s/[\s\$\.]/_/g; + $_; + } + + local($sname) = &psou($what); + + $nesting++; + + for $field (split(/;/, $struct{$what})) { + $pad = $prepad = 0; + $entry = ''; + ($fieldname, $typeno, $count, $offset, $length) = split(/,/, $field); + + $type = $type[$typeno]; + + $type =~ /([^[]*)(\[.*\])?/; + $mytype = $1; + $count .= $2; + $fieldtype = &psou($mytype); + + local($fname) = &psou($name); + + if ($build_templates) { + + $pad = ($offset - ($lastoffset + $lastlength))/8 + if defined $lastoffset; + + if (! $finished_template{$sname}) { + if ($isaunion{$what}) { + $template{$sname} .= 'X' x $revpad . ' ' if $revpad; + } else { + $template{$sname} .= 'x' x $pad . ' ' if $pad; + } + } + + $template = &fetch_template($type); + &repeat_template($template,$count); + + if (! $finished_template{$sname}) { + $template{$sname} .= $template; + } + + $revpad = $length/8 if $isaunion{$what}; + + ($lastoffset, $lastlength) = ($offset, $length); + + } else { + print '# ' if $perl && $verbose; + $entry = sprintf($pmask1, + ' ' x ($nesting * $indent) . $fieldtype, + "$prefix.$fieldname" . $count); + + $entry =~ s/(\*+)( )/$2$1/; + + printf $pmask2, + $entry, + ($base+$offset)/8, + ($bits = ($base+$offset)%8) ? ".$bits" : " ", + $length/8, + ($bits = $length % 8) ? ".$bits": "" + if !$perl || $verbose; + + if ($perl) { + $template = &fetch_template($type); + &repeat_template($template,$count); + } + + if ($perl && $nesting == 1) { + + push(@sizeof, int($length/8) .",\t# $fieldname"); + push(@offsetof, int($offset/8) .",\t# $fieldname"); + local($little) = &scrunch($template); + push(@typedef, "'$little', \t# $fieldname"); + $type =~ s/(struct|union) //; + push(@typeof, "'$mytype" . ($count ? $count : '') . + "',\t# $fieldname"); + push(@fieldnames, "'$fieldname',"); + } + + print ' ', ' ' x $indent x $nesting, $template + if $perl && $verbose; + + print "\n" if !$perl || $verbose; + + } + if ($perl) { + local($mycount) = defined $struct{$mytype} ? $countof{$mytype} : 1; + $mycount *= &scripts2count($count) if $count; + if ($nesting==1 && !$build_templates) { + $pcode .= sprintf("sub %-32s { %4d; }\n", + "${mname}'${fieldname}", $struct_count); + push(@indices, $struct_count); + } + $struct_count += $mycount; + } + + + &pstruct($type, "$prefix.$fieldname", $base+$offset) + if $recurse && defined $struct{$type}; + } + + $countof{$what} = $struct_count unless defined $countof{$whati}; + + $template{$sname} .= '$' if $build_templates; + $finished_template{$sname}++; + + if ($build_templates && !defined $sizeof{$name}) { + local($fmt) = &scrunch($template{$sname}); + print STDERR "no size for $name, punting with $fmt..." if $debug; + eval '$sizeof{$name} = length(pack($fmt, ()))'; + if ($@) { + chop $@; + warn "couldn't get size for \$name: $@"; + } else { + print STDERR $sizeof{$name}, "\n" if $debUg; + } + } + + --$nesting; +} + + +sub psize { + local($me) = @_; + local($amstruct) = $struct{$me} ? 'struct ' : ''; + + print '$sizeof{\'', $amstruct, $me, '\'} = '; + printf "%d;\n", $sizeof{$me}; +} + +sub pdecl { + local($pdecl) = @_; + local(@pdecls); + local($tname); + + warn "pdecl: $pdecl\n" if $debug; + + $pdecl =~ s/\(\d+,(\d+)\)/$1/g; + $pdecl =~ s/\*//g; + @pdecls = split(/=/, $pdecl); + $typeno = $pdecls[0]; + $tname = pop @pdecls; + + if ($tname =~ s/^f//) { $tname = "$tname&"; } + #else { $tname = "$tname*"; } + + for (reverse @pdecls) { + $tname .= s/^f// ? "&" : "*"; + #$tname =~ s/^f(.*)/$1&/; + print "type[$_] is $tname\n" if $debug; + $type[$_] = $tname unless defined $type[$_]; + } +} + + + +sub adecl { + ($arraytype, $unknown, $lower, $upper) = (); + #local($typeno); + # global $typeno, @type + local($_, $typedef) = @_; + + while (s/^((\d+|\(\d+,\d+\))=)?ar(\d+|\(\d+,\d+\));//) { + ($arraytype, $unknown) = ($2, $3); + $arraytype = &typeno($arraytype); + $unknown = &typeno($unknown); + if (s/^(\d+);(\d+);//) { + ($lower, $upper) = ($1, $2); + $scripts .= '[' . ($upper+1) . ']'; + } else { + warn "can't find array bounds: $_"; + } + } + if (s/^([(,)\d*f=]*),(\d+),(\d+);//) { + ($start, $length) = ($2, $3); + $whatis = $1; + if ($whatis =~ /^(\d+|\(\d+,\d+\))=/) { + $typeno = &typeno($1); + &pdecl($whatis); + } else { + $typeno = &typeno($whatis); + } + } elsif (s/^(\d+)(=[*suf]\d*)//) { + local($whatis) = $2; + + if ($whatis =~ /[f*]/) { + &pdecl($whatis); + } elsif ($whatis =~ /[su]/) { # + print "$prefix.$fieldname is an array$scripts anon structs; disgusting\n" + if $debug; + #$type[$typeno] = $name unless defined $type[$typeno]; + ##printf "new type $typeno is $name" if $debug; + $typeno = $1; + $type[$typeno] = "$prefix.$fieldname"; + local($name) = $type[$typeno]; + &sou($name, $whatis); + $_ = &sdecl($name, $_, $start+$offset); + 1; + $start = $start{$name}; + $offset = $sizeof{$name}; + $length = $offset; + } else { + warn "what's this? $whatis in $line "; + } + } elsif (/^\d+$/) { + $typeno = $_; + } else { + warn "bad array stab: $_ in $line "; + next STAB; + } + #local($wasdef) = defined($type[$typeno]) && $debug; + #if ($typedef) { + #print "redefining $type[$typeno] to " if $wasdef; + #$type[$typeno] = "$whatis$scripts"; # unless defined $type[$typeno]; + #print "$type[$typeno]\n" if $wasdef; + #} else { + #$type[$arraytype] = $type[$typeno] unless defined $type[$arraytype]; + #} + $type[$arraytype] = "$type[$typeno]$scripts" if defined $type[$typeno]; + print "type[$arraytype] is $type[$arraytype]\n" if $debug; + print "$prefix.$fieldname is an array of $type[$arraytype]\n" if $debug; + $_; +} + + + +sub sdecl { + local($prefix, $_, $offset) = @_; + + local($fieldname, $scripts, $type, $arraytype, $unknown, + $whatis, $pdecl, $upper,$lower, $start,$length) = (); + local($typeno,$sou); + + +SFIELD: + while (/^([^;]+);/) { + $scripts = ''; + warn "sdecl $_\n" if $debug; + if (s/^([\$\w]+)://) { + $fieldname = $1; + } elsif (s/(\d+)=([us])(\d+|\(\d+,\d+\))//) { # + $typeno = &typeno($1); + $type[$typeno] = "$prefix.$fieldname"; + local($name) = "$prefix.$fieldname"; + &sou($name,$2); + $_ = &sdecl("$prefix.$fieldname", $_, $start+$offset); + $start = $start{$name}; + $offset += $sizeof{$name}; + #print "done with anon, start is $start, offset is $offset\n"; + #next SFIELD; + } else { + warn "weird field $_ of $line" if $debug; + next STAB; + #$fieldname = &gensym; + #$_ = &sdecl("$prefix.$fieldname", $_, $start+$offset); + } + + if (/^(\d+|\(\d+,\d+\))=ar/) { + $_ = &adecl($_); + } + elsif (s/^(\d+|\(\d+,\d+\))?,(\d+),(\d+);//) { + ($start, $length) = ($2, $3); + &panic("no length?") unless $length; + $typeno = &typeno($1) if $1; + } + elsif (s/^(\d+)=xs\w+:,(\d+),(\d+);//) { + ($start, $length) = ($2, $3); + &panic("no length?") unless $length; + $typeno = &typeno($1) if $1; + } + elsif (s/^((\d+|\(\d+,\d+\))(=[*f](\d+|\(\d+,\d+\)))+),(\d+),(\d+);//) { + ($pdecl, $start, $length) = ($1,$5,$6); + &pdecl($pdecl); + } + elsif (s/(\d+)=([us])(\d+|\(\d+,\d+\))//) { # the dratted anon struct + ($typeno, $sou) = ($1, $2); + $typeno = &typeno($typeno); + if (defined($type[$typeno])) { + warn "now how did we get type $1 in $fieldname of $line?"; + } else { + print "anon type $typeno is $prefix.$fieldname\n" if $debug; + $type[$typeno] = "$prefix.$fieldname" unless defined $type[$typeno]; + }; + local($name) = "$prefix.$fieldname"; + &sou($name,$sou); + print "anon ".($isastruct{$name}) ? "struct":"union"." for $prefix.$fieldname\n" if $debug; + $type[$typeno] = "$prefix.$fieldname"; + $_ = &sdecl("$prefix.$fieldname", $_, $start+$offset); + $start = $start{$name}; + $length = $sizeof{$name}; + } + else { + warn "can't grok stab for $name ($_) in line $line "; + next STAB; + } + + &panic("no length for $prefix.$fieldname") unless $length; + $struct{$name} .= join(',', $fieldname, $typeno, $scripts, $start, $length) . ';'; + } + if (s/;\d*,(\d+),(\d+);//) { + local($start, $size) = ($1, $2); + $sizeof{$prefix} = $size; + print "start of $prefix is $start, size of $sizeof{$prefix}\n" if $debug; + $start{$prefix} = $start; + } + $_; +} + +sub edecl { + s/;$//; + $enum{$name} = $_; + $_ = ''; +} + +sub resolve_types { + local($sou); + for $i (0 .. $#type) { + next unless defined $type[$i]; + $_ = $type[$i]; + unless (/\d/) { + print "type[$i] $type[$i]\n" if $debug; + next; + } + print "type[$i] $_ ==> " if $debug; + s/^(\d+)(\**)\&\*(\**)/"$2($3".&type($1) . ')()'/e; + s/^(\d+)\&/&type($1)/e; + s/^(\d+)/&type($1)/e; + s/(\*+)([^*]+)(\*+)/$1$3$2/; + s/\((\*+)(\w+)(\*+)\)/$3($1$2)/; + s/^(\d+)([\*\[].*)/&type($1).$2/e; + #s/(\d+)(\*|(\[[\[\]\d\*]+]\])+)/&type($1).$2/ge; + $type[$i] = $_; + print "$_\n" if $debug; + } +} +sub type { &psou($type[$_[0]] || ""); } + +sub adjust_start_addrs { + for (sort keys %start) { + ($basename = $_) =~ s/\.[^.]+$//; + $start{$_} += $start{$basename}; + print "start: $_ @ $start{$_}\n" if $debug; + } +} + +sub sou { + local($what, $_) = @_; + /u/ && $isaunion{$what}++; + /s/ && $isastruct{$what}++; +} + +sub psou { + local($what) = @_; + local($prefix) = ''; + if ($isaunion{$what}) { + $prefix = 'union '; + } elsif ($isastruct{$what}) { + $prefix = 'struct '; + } + $prefix . $what; +} + +sub scrunch { + local($_) = @_; + + return '' if $_ eq ''; + + study; + + s/\$//g; + s/ / /g; + 1 while s/(\w) \1/$1$1/g; + + # i wanna say this, but perl resists my efforts: + # s/(\w)(\1+)/$2 . length($1)/ge; + + &quick_scrunch; + + s/ $//; + + $_; +} + +sub buildscrunchlist { + $scrunch_code = "sub quick_scrunch {\n"; + for (values %intrinsics) { + $scrunch_code .= "\ts/(${_}{2,})/'$_' . length(\$1)/ge;\n"; + } + $scrunch_code .= "}\n"; + print "$scrunch_code" if $debug; + eval $scrunch_code; + &panic("can't eval scrunch_code $@ \nscrunch_code") if $@; +} + +sub fetch_template { + local($mytype) = @_; + local($fmt); + local($count) = 1; + + &panic("why do you care?") unless $perl; + + if ($mytype =~ s/(\[\d+\])+$//) { + $count .= $1; + } + + if ($mytype =~ /\*/) { + $fmt = $template{'pointer'}; + } + elsif (defined $template{$mytype}) { + $fmt = $template{$mytype}; + } + elsif (defined $struct{$mytype}) { + if (!defined $template{&psou($mytype)}) { + &build_template($mytype) unless $mytype eq $name; + } + elsif ($template{&psou($mytype)} !~ /\$$/) { + #warn "incomplete template for $mytype\n"; + } + $fmt = $template{&psou($mytype)} || '?'; + } + else { + warn "unknown fmt for $mytype\n"; + $fmt = '?'; + } + + $fmt x $count . ' '; +} + +sub compute_intrinsics { + &safedir; + local($TMP) = "$SAFEDIR/c2ph-i.$$.c"; + open (TMP, ">$TMP") || die "can't open $TMP: $!"; + select(TMP); + + print STDERR "computing intrinsic sizes: " if $trace; + + undef %intrinsics; + + print <<'EOF'; +main() { + char *mask = "%d %s\n"; +EOF + + for $type (@intrinsics) { + next if !$type || $type eq 'void' || $type =~ /complex/; # sun stuff + print <<"EOF"; + printf(mask,sizeof($type), "$type"); +EOF + } + + print <<'EOF'; + printf(mask,sizeof(char *), "pointer"); + exit(0); +} +EOF + close TMP; + + select(STDOUT); + open(PIPE, "cd $SAFEDIR && $CC $TMP && $SAFEDIR/a.out|"); + while () { + chop; + split(' ',$_,2);; + print "intrinsic $_[1] is size $_[0]\n" if $debug; + $sizeof{$_[1]} = $_[0]; + $intrinsics{$_[1]} = $template{$_[0]}; + } + close(PIPE) || die "couldn't read intrinsics!"; + unlink($TMP, "$SAFEDIR/a.out"); + print STDERR "done\n" if $trace; +} + +sub scripts2count { + local($_) = @_; + + s/^\[//; + s/\]$//; + s/\]\[/*/g; + $_ = eval; + &panic("$_: $@") if $@; + $_; +} + +sub system { + print STDERR "@_\n" if $trace; + system @_; +} + +sub build_template { + local($name) = @_; + + &panic("already got a template for $name") if defined $template{$name}; + + local($build_templates) = 1; + + local($lparen) = '(' x $build_recursed; + local($rparen) = ')' x $build_recursed; + + print STDERR "$lparen$name$rparen " if $trace; + $build_recursed++; + &pstruct($name,$name,0); + print STDERR "TEMPLATE for $name is ", $template{&psou($name)}, "\n" if $debug; + --$build_recursed; +} + + +sub panic { + + select(STDERR); + + print "\npanic: @_\n"; + + exit 1 if $] <= 4.003; # caller broken + + local($i,$_); + local($p,$f,$l,$s,$h,$a,@a,@sub); + for ($i = 0; ($p,$f,$l,$s,$h,$w) = caller($i); $i++) { + @a = @DB'args; + for (@a) { + if (/^StB\000/ && length($_) == length($_main{'_main'})) { + $_ = sprintf("%s",$_); + } + else { + s/'/\\'/g; + s/([^\0]*)/'$1'/ unless /^-?[\d.]+$/; + s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg; + s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg; + } + } + $w = $w ? '@ = ' : '$ = '; + $a = $h ? '(' . join(', ', @a) . ')' : ''; + push(@sub, "$w&$s$a from file $f line $l\n"); + last if $signal; + } + for ($i=0; $i <= $#sub; $i++) { + last if $signal; + print $sub[$i]; + } + exit 1; +} + +sub squishseq { + local($num); + local($last) = -1e8; + local($string); + local($seq) = '..'; + + while (defined($num = shift)) { + if ($num == ($last + 1)) { + $string .= $seq unless $inseq++; + $last = $num; + next; + } elsif ($inseq) { + $string .= $last unless $last == -1e8; + } + + $string .= ',' if defined $string; + $string .= $num; + $last = $num; + $inseq = 0; + } + $string .= $last if $inseq && $last != -e18; + $string; +} + +sub repeat_template { + # local($template, $scripts) = @_; have to change caller's values + + if ( $_[1] ) { + local($ncount) = &scripts2count($_[1]); + if ($_[0] =~ /^\s*c\s*$/i) { + $_[0] = "A$ncount "; + $_[1] = ''; + } else { + $_[0] = $template x $ncount; + } + } +} diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cal.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cal.exe new file mode 100644 index 00000000..d492c143 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cal.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/captoinfo b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/captoinfo new file mode 100644 index 00000000..465f7ff1 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/captoinfo differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cat.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cat.exe new file mode 100644 index 00000000..703c7397 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cat.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chcon.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chcon.exe new file mode 100644 index 00000000..601477f4 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chcon.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chgrp.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chgrp.exe new file mode 100644 index 00000000..3acc9ec3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chgrp.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chmod.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chmod.exe new file mode 100644 index 00000000..157a688b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chmod.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chown.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chown.exe new file mode 100644 index 00000000..680108a5 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chown.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chroot.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chroot.exe new file mode 100644 index 00000000..a9faed21 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/chroot.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cksum.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cksum.exe new file mode 100644 index 00000000..74632364 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cksum.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/clear.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/clear.exe new file mode 100644 index 00000000..a7eaaefc Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/clear.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/col.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/col.exe new file mode 100644 index 00000000..4d848716 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/col.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/colcrt.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/colcrt.exe new file mode 100644 index 00000000..ccc8d898 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/colcrt.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/colrm.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/colrm.exe new file mode 100644 index 00000000..779f0af1 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/colrm.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/column.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/column.exe new file mode 100644 index 00000000..2cbcb8f7 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/column.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/comm.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/comm.exe new file mode 100644 index 00000000..12d6d37c Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/comm.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/corelist b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/corelist new file mode 100644 index 00000000..5ffaf495 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/corelist @@ -0,0 +1,491 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!/usr/bin/perl + +=head1 NAME + +corelist - a commandline frontend to Module::CoreList + +=head1 DESCRIPTION + +See L for one. + +=head1 SYNOPSIS + + corelist -v + corelist [-a|-d] | // [] ... + corelist [-v ] [ | // ] ... + corelist [-r ] ... + corelist --feature [] ... + corelist --diff PerlVersion PerlVersion + corelist --upstream + +=head1 OPTIONS + +=over + +=item -a + +lists all versions of the given module (or the matching modules, in case you +used a module regexp) in the perls Module::CoreList knows about. + + corelist -a Unicode + + Unicode was first released with perl v5.6.2 + v5.6.2 3.0.1 + v5.8.0 3.2.0 + v5.8.1 4.0.0 + v5.8.2 4.0.0 + v5.8.3 4.0.0 + v5.8.4 4.0.1 + v5.8.5 4.0.1 + v5.8.6 4.0.1 + v5.8.7 4.1.0 + v5.8.8 4.1.0 + v5.8.9 5.1.0 + v5.9.0 4.0.0 + v5.9.1 4.0.0 + v5.9.2 4.0.1 + v5.9.3 4.1.0 + v5.9.4 4.1.0 + v5.9.5 5.0.0 + v5.10.0 5.0.0 + v5.10.1 5.1.0 + v5.11.0 5.1.0 + v5.11.1 5.1.0 + v5.11.2 5.1.0 + v5.11.3 5.2.0 + v5.11.4 5.2.0 + v5.11.5 5.2.0 + v5.12.0 5.2.0 + v5.12.1 5.2.0 + v5.12.2 5.2.0 + v5.12.3 5.2.0 + v5.12.4 5.2.0 + v5.13.0 5.2.0 + v5.13.1 5.2.0 + v5.13.2 5.2.0 + v5.13.3 5.2.0 + v5.13.4 5.2.0 + v5.13.5 5.2.0 + v5.13.6 5.2.0 + v5.13.7 6.0.0 + v5.13.8 6.0.0 + v5.13.9 6.0.0 + v5.13.10 6.0.0 + v5.13.11 6.0.0 + v5.14.0 6.0.0 + v5.14.1 6.0.0 + v5.15.0 6.0.0 + +=item -d + +finds the first perl version where a module has been released by +date, and not by version number (as is the default). + +=item --diff + +Given two versions of perl, this prints a human-readable table of all module +changes between the two. The output format may change in the future, and is +meant for I, not programs. For programs, use the L +API. + +=item -? or -help + +help! help! help! to see more help, try --man. + +=item -man + +all of the help + +=item -v + +lists all of the perl release versions we got the CoreList for. + +If you pass a version argument (value of C<$]>, like C<5.00503> or C<5.008008>), +you get a list of all the modules and their respective versions. +(If you have the C module, you can also use new-style version numbers, +like C<5.8.8>.) + +In module filtering context, it can be used as Perl version filter. + +=item -r + +lists all of the perl releases and when they were released + +If you pass a perl version you get the release date for that version only. + +=item --feature, -f + +lists the first version bundle of each named feature given + +=item --upstream, -u + +Shows if the given module is primarily maintained in perl core or on CPAN +and bug tracker URL. + +=back + +As a special case, if you specify the module name C, you'll get +the version number of the Unicode Character Database bundled with the +requested perl versions. + +=cut + +use Module::CoreList; +use Getopt::Long qw(:config no_ignore_case); +use Pod::Usage; +use strict; +use warnings; +use List::Util qw/maxstr/; + +my %Opts; + +GetOptions( + \%Opts, + qw[ help|?! man! r|release:s v|version:s a! d diff|D feature|f u|upstream ] +); + +pod2usage(1) if $Opts{help}; +pod2usage(-verbose=>2) if $Opts{man}; + +if(exists $Opts{r} ){ + if ( !$Opts{r} ) { + print "\nModule::CoreList has release info for the following perl versions:\n"; + my $versions = { }; + my $max_ver_len = max_mod_len(\%Module::CoreList::released); + for my $ver ( grep !/0[01]0$/, sort keys %Module::CoreList::released ) { + printf "%-${max_ver_len}s %s\n", format_perl_version($ver), $Module::CoreList::released{$ver}; + } + print "\n"; + exit 0; + } + + my $num_r = numify_version( $Opts{r} ); + my $version_hash = Module::CoreList->find_version($num_r); + + if( !$version_hash ) { + print "\nModule::CoreList has no info on perl $Opts{r}\n\n"; + exit 1; + } + + printf "Perl %s was released on %s\n\n", format_perl_version($num_r), $Module::CoreList::released{$num_r}; + exit 0; +} + +if(exists $Opts{v} ){ + if( !$Opts{v} ) { + print "\nModule::CoreList has info on the following perl versions:\n"; + print format_perl_version($_)."\n" for grep !/0[01]0$/, sort keys %Module::CoreList::version; + print "\n"; + exit 0; + } + + my $num_v = numify_version( $Opts{v} ); + my $version_hash = Module::CoreList->find_version($num_v); + + if( !$version_hash ) { + print "\nModule::CoreList has no info on perl $Opts{v}\n\n"; + exit 1; + } + + if ( !@ARGV ) { + print "\nThe following modules were in perl $Opts{v} CORE\n"; + my $max_mod_len = max_mod_len($version_hash); + for my $mod ( sort keys %$version_hash ) { + printf "%-${max_mod_len}s %s\n", $mod, $version_hash->{$mod} || ""; + } + print "\n"; + exit 0; + } +} + +if ($Opts{diff}) { + if(@ARGV != 2) { + die "\nprovide exactly two perl core versions to diff with --diff\n"; + } + + my ($old_ver, $new_ver) = @ARGV; + + my $old = numify_version($old_ver); + my $new = numify_version($new_ver); + + my %diff = Module::CoreList::changes_between($old, $new); + + for my $lib (sort keys %diff) { + my $diff = $diff{$lib}; + + my $was = ! exists $diff->{left} ? '(absent)' + : ! defined $diff->{left} ? '(undef)' + : $diff->{left}; + + my $now = ! exists $diff->{right} ? '(absent)' + : ! defined $diff->{right} ? '(undef)' + : $diff->{right}; + + printf "%-35s %10s %10s\n", $lib, $was, $now; + } + exit(0); +} + +if ($Opts{feature}) { + die "\n--feature is only available with perl v5.16.0 or greater\n" + if $] < 5.016; + + die "\nprovide at least one feature name to --feature\n" + unless @ARGV; + + no warnings 'once'; + require feature; + + my %feature2version; + my @bundles = map { $_->[0] } + sort { $b->[1] <=> $a->[1] } + map { [$_, numify_version($_)] } + grep { not /[^0-9.]/ } + keys %feature::feature_bundle; + + for my $version (@bundles) { + $feature2version{$_} = $version =~ /^\d\.\d+$/ ? "$version.0" : $version + for @{ $feature::feature_bundle{$version} }; + } + + # allow internal feature names, just in case someone gives us __SUB__ + # instead of current_sub. + while (my ($name, $internal) = each %feature::feature) { + $internal =~ s/^feature_//; + $feature2version{$internal} = $feature2version{$name} + if $feature2version{$name}; + } + + my $when = maxstr(values %Module::CoreList::released); + print "\n","Data for $when\n"; + + for my $feature (@ARGV) { + print "feature \"$feature\" ", + exists $feature2version{$feature} + ? "was first released with the perl " + . format_perl_version(numify_version($feature2version{$feature})) + . " feature bundle\n" + : "doesn't exist (or so I think)\n"; + } + exit(0); +} + +if ( !@ARGV ) { + pod2usage(0); +} + +while (@ARGV) { + my ($mod, $ver); + if ($ARGV[0] =~ /=/) { + ($mod, $ver) = split /=/, shift @ARGV; + } else { + $mod = shift @ARGV; + $ver = (@ARGV && $ARGV[0] =~ /^\d/) ? shift @ARGV : ""; + } + + if ($mod !~ m|^/(.*)/([imosx]*)$|) { # not a regex + module_version($mod,$ver); + } else { + my $re; + eval { $re = $2 ? qr/(?$2)($1)/ : qr/$1/; }; # trap exceptions while building regex + if ($@) { + # regex errors are usually like 'Quantifier follow nothing in regex; marked by ...' + # then we drop text after ';' to shorten message + my $errmsg = $@ =~ /(.*);/ ? $1 : $@; + warn "\n$mod is a bad regex: $errmsg\n"; + next; + } + my @mod = Module::CoreList->find_modules($re); + if (@mod) { + module_version($_, $ver) for @mod; + } else { + $ver |= ''; + print "\n$mod $ver has no match in CORE (or so I think)\n"; + } + + } +} + +exit(); + +sub module_version { + my($mod,$ver) = @_; + + if ( $Opts{v} ) { + my $numeric_v = numify_version($Opts{v}); + my $version_hash = Module::CoreList->find_version($numeric_v); + if ($version_hash) { + print $mod, " ", $version_hash->{$mod} || 'undef', "\n"; + return; + } + else { die "Shouldn't happen" } + } + + my $ret = $Opts{d} + ? Module::CoreList->first_release_by_date(@_) + : Module::CoreList->first_release(@_); + my $msg = $mod; + $msg .= " $ver" if $ver; + + my $rem = $Opts{d} + ? Module::CoreList->removed_from_by_date($mod) + : Module::CoreList->removed_from($mod); + + my $when = maxstr(values %Module::CoreList::released); + print "\n","Data for $when\n"; + + if( defined $ret ) { + my $deprecated = Module::CoreList->deprecated_in($mod); + $msg .= " was "; + $msg .= "first " unless $ver; + $msg .= "released with perl " . format_perl_version($ret); + $msg .= ( $rem ? ',' : ' and' ) . " deprecated (will be CPAN-only) in " . format_perl_version($deprecated) if $deprecated; + $msg .= " and removed from " . format_perl_version($rem) if $rem; + } else { + $msg .= " was not in CORE (or so I think)"; + } + + print $msg,"\n"; + + if( defined $ret and exists $Opts{u} ) { + my $upsream = $Module::CoreList::upstream{$mod}; + $upsream = 'undef' unless $upsream; + print "upstream: $upsream\n"; + if ( $upsream ne 'blead' ) { + my $bugtracker = $Module::CoreList::bug_tracker{$mod}; + $bugtracker = 'unknown' unless $bugtracker; + print "bug tracker: $bugtracker\n"; + } + } + + if(defined $ret and exists $Opts{a} and $Opts{a}){ + display_a($mod); + } +} + + +sub max_mod_len { + my $versions = shift; + my $max = 0; + for my $mod (keys %$versions) { + $max = max($max, length $mod); + } + + return $max; +} + +sub max { + my($this, $that) = @_; + return $this if $this > $that; + return $that; +} + +sub display_a { + my $mod = shift; + + for my $v (grep !/0[01]0$/, sort keys %Module::CoreList::version ) { + next unless exists $Module::CoreList::version{$v}{$mod}; + + my $mod_v = $Module::CoreList::version{$v}{$mod} || 'undef'; + printf " %-10s %-10s\n", format_perl_version($v), $mod_v; + } + print "\n"; +} + + +{ + my $have_version_pm; + sub have_version_pm { + return $have_version_pm if defined $have_version_pm; + return $have_version_pm = eval { require version; 1 }; + } +} + + +sub format_perl_version { + my $v = shift; + return $v if $v < 5.006 or !have_version_pm; + return version->new($v)->normal; +} + + +sub numify_version { + my $ver = shift; + if ($ver =~ /\..+\./) { + have_version_pm() + or die "You need to install version.pm to use dotted version numbers\n"; + $ver = version->new($ver)->numify; + } + $ver += 0; + return $ver; +} + +=head1 EXAMPLES + + $ corelist File::Spec + + File::Spec was first released with perl 5.005 + + $ corelist File::Spec 0.83 + + File::Spec 0.83 was released with perl 5.007003 + + $ corelist File::Spec 0.89 + + File::Spec 0.89 was not in CORE (or so I think) + + $ corelist File::Spec::Aliens + + File::Spec::Aliens was not in CORE (or so I think) + + $ corelist /IPC::Open/ + + IPC::Open2 was first released with perl 5 + + IPC::Open3 was first released with perl 5 + + $ corelist /MANIFEST/i + + ExtUtils::Manifest was first released with perl 5.001 + + $ corelist /Template/ + + /Template/ has no match in CORE (or so I think) + + $ corelist -v 5.8.8 B + + B 1.09_01 + + $ corelist -v 5.8.8 /^B::/ + + B::Asmdata 1.01 + B::Assembler 0.07 + B::Bblock 1.02_01 + B::Bytecode 1.01_01 + B::C 1.04_01 + B::CC 1.00_01 + B::Concise 0.66 + B::Debug 1.02_01 + B::Deparse 0.71 + B::Disassembler 1.05 + B::Lint 1.03 + B::O 1.00 + B::Showlex 1.02 + B::Stackobj 1.00 + B::Stash 1.00 + B::Terse 1.03_01 + B::Xref 1.01 + +=head1 COPYRIGHT + +Copyright (c) 2002-2007 by D.H. aka PodMaster + +Currently maintained by the perl 5 porters Eperl5-porters@perl.orgE. + +This program is distributed under the same terms as perl itself. +See http://perl.org/ or http://cpan.org/ for more info on that. + +=cut diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cp.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cp.exe new file mode 100644 index 00000000..6b0e2917 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cp.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cpan b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cpan new file mode 100644 index 00000000..16a3f309 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cpan @@ -0,0 +1,324 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!/usr/local/bin/perl + +use strict; +use vars qw($VERSION); + +use App::Cpan '1.60_02'; +$VERSION = '1.61'; + +my $rc = App::Cpan->run( @ARGV ); + +# will this work under Strawberry Perl? +exit( $rc || 0 ); + +=head1 NAME + +cpan - easily interact with CPAN from the command line + +=head1 SYNOPSIS + + # with arguments and no switches, installs specified modules + cpan module_name [ module_name ... ] + + # with switches, installs modules with extra behavior + cpan [-cfgimtTw] module_name [ module_name ... ] + + # with just the dot, install from the distribution in the + # current directory + cpan . + + # without arguments, starts CPAN.pm shell + cpan + + # force install modules (usually those that fail tests) + cpan -f module_name [ module_name ... ] + + # install modules but without testing them + cpan -T module_name [ module_name ... ] + + # dump the configuration + cpan -J + + # load a different configuration to install Module::Foo + cpan -j some/other/file Module::Foo + + # without arguments, but some switches + cpan [-ahrvACDlLO] + +=head1 DESCRIPTION + +This script provides a command interface (not a shell) to CPAN. At the +moment it uses CPAN.pm to do the work, but it is not a one-shot command +runner for CPAN.pm. + +=head2 Options + +=over 4 + +=item -a + +Creates a CPAN.pm autobundle with CPAN::Shell->autobundle. + +=item -A module [ module ... ] + +Shows the primary maintainers for the specified modules. + +=item -c module + +Runs a `make clean` in the specified module's directories. + +=item -C module [ module ... ] + +Show the F files for the specified modules + +=item -D module [ module ... ] + +Show the module details. + +=item -f + +Force the specified action, when it normally would have failed. Use this +to install a module even if its tests fail. When you use this option, +-i is not optional for installing a module when you need to force it: + + % cpan -f -i Module::Foo + +=item -F + +Turn off CPAN.pm's attempts to lock anything. You should be careful with +this since you might end up with multiple scripts trying to muck in the +same directory. This isn't so much of a concern if you're loading a special +config with C<-j>, and that config sets up its own work directories. + +=item -g module [ module ... ] + +Downloads to the current directory the latest distribution of the module. + +=item -G module [ module ... ] + +UNIMPLEMENTED + +Download to the current directory the latest distribution of the +modules, unpack each distribution, and create a git repository for each +distribution. + +If you want this feature, check out Yanick Champoux's C +distribution. + +=item -h + +Print a help message and exit. When you specify C<-h>, it ignores all +of the other options and arguments. + +=item -i + +Install the specified modules. + +=item -I + +Load C (think like C<-I> for loading lib paths). + +=item -j Config.pm + +Load the file that has the CPAN configuration data. This should have the +same format as the standard F file, which defines +C<$CPAN::Config> as an anonymous hash. + +=item -J + +Dump the configuration in the same format that CPAN.pm uses. This is useful +for checking the configuration as well as using the dump as a starting point +for a new, custom configuration. + +=item -l + +List all installed modules with their versions + +=item -L author [ author ... ] + +List the modules by the specified authors. + +=item -m + +Make the specified modules. + +=item -O + +Show the out-of-date modules. + +=item -p + +Ping the configured mirrors + +=item -P + +Find the best mirrors you could be using (but doesn't configure them just yet) + +=item -r + +Recompiles dynamically loaded modules with CPAN::Shell->recompile. + +=item -t + +Run a `make test` on the specified modules. + +=item -T + +Do not test modules. Simply install them. + +=item -u + +Upgrade all installed modules. Blindly doing this can really break things, +so keep a backup. + +=item -v + +Print the script version and CPAN.pm version then exit. + +=item -V + +Print detailed information about the cpan client. + +=item -w + +UNIMPLEMENTED + +Turn on cpan warnings. This checks various things, like directory permissions, +and tells you about problems you might have. + +=back + +=head2 Examples + + # print a help message + cpan -h + + # print the version numbers + cpan -v + + # create an autobundle + cpan -a + + # recompile modules + cpan -r + + # upgrade all installed modules + cpan -u + + # install modules ( sole -i is optional ) + cpan -i Netscape::Booksmarks Business::ISBN + + # force install modules ( must use -i ) + cpan -fi CGI::Minimal URI + +=head1 ENVIRONMENT VARIABLES + +=over 4 + +There are several components in CPAN.pm that use environment variables. +The build tools, L and L use some, +while others matter to the levels above them. Some of these are specified +by the Perl Toolchain Gang: + +Lancaster Concensus: L + +Oslo Concensus: L + +=over 4 + +=item CPAN_OPTS + +C splits this variable on whitespace and prepends that list to C<@ARGV> +before it processes the command-line arguments. For instance, if you always +want to use C, you can set C to C<-I>. + +=item CPANSCRIPT_LOGLEVEL + +The log level to use, with either the embedded, minimal logger or +L if it is installed. Possible values are the same as +the C levels: C, C, C, C, +C, and C. The default is C. + +=item GIT_COMMAND + +The path to the C binary to use for the Git features. The default +is C. + +=item NONINTERACTIVE_TESTING + +Assume no one is paying attention and skips prompts for distributions +that do that correctly. C sets this to C<1> unless it already +has a value (even if that value is false). + +=item PERL_MM_USE_DEFAULT + +Use the default answer for a prompted questions. C sets this +to C<1> unless it already has a value (even if that value is false). + +=back + +=back + +=head1 EXIT VALUES + +The script exits with zero if it thinks that everything worked, or a +positive number if it thinks that something failed. Note, however, that +in some cases it has to divine a failure by the output of things it does +not control. For now, the exit codes are vague: + + 1 An unknown error + + 2 The was an external problem + + 4 There was an internal problem with the script + + 8 A module failed to install + +=head1 TO DO + +* one shot configuration values from the command line + +=head1 BUGS + +* none noted + +=head1 SEE ALSO + +Most behaviour, including environment variables and configuration, +comes directly from CPAN.pm. + +=head1 SOURCE AVAILABILITY + +This code is in Github in the CPAN.pm repository: + + https://github.com/andk/cpanpm + +The source used to be tracked separately in another GitHub repo, +but the canonical source is now in the above repo. + +=head1 CREDITS + +Japheth Cleaver added the bits to allow a forced install (-f). + +Jim Brandt suggest and provided the initial implementation for the +up-to-date and Changes features. + +Adam Kennedy pointed out that exit() causes problems on Windows +where this script ends up with a .bat extension + +=head1 AUTHOR + +brian d foy, C<< >> + +=head1 COPYRIGHT + +Copyright (c) 2001-2014, brian d foy, All Rights Reserved. + +You may redistribute this under the same terms as Perl itself. + +=cut + +1; diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cpp.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cpp.exe new file mode 100644 index 00000000..68f15ece Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cpp.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/csplit.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/csplit.exe new file mode 100644 index 00000000..14055680 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/csplit.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cut.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cut.exe new file mode 100644 index 00000000..de75b64b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cut.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygattr-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygattr-1.dll new file mode 100644 index 00000000..cca9601a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygattr-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygblkid-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygblkid-1.dll new file mode 100644 index 00000000..f903355f Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygblkid-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygbz2-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygbz2-1.dll new file mode 100644 index 00000000..e37480be Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygbz2-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygcheck.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygcheck.exe new file mode 100644 index 00000000..f1a402ab Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygcheck.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygcrypt-0.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygcrypt-0.dll new file mode 100644 index 00000000..79b4b8d4 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygcrypt-0.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygdb-4.8.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygdb-4.8.dll new file mode 100644 index 00000000..bf50d733 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygdb-4.8.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygdb_cxx-4.8.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygdb_cxx-4.8.dll new file mode 100644 index 00000000..0bf79940 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygdb_cxx-4.8.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygformw-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygformw-10.dll new file mode 100644 index 00000000..65646f91 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygformw-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggcc_s-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggcc_s-1.dll new file mode 100644 index 00000000..d8eff1de Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggcc_s-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggdbm-4.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggdbm-4.dll new file mode 100644 index 00000000..b47f3dc6 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggdbm-4.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggdbm_compat-4.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggdbm_compat-4.dll new file mode 100644 index 00000000..0d10ffd3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggdbm_compat-4.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggmp-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggmp-10.dll new file mode 100644 index 00000000..85d83661 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyggmp-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygguile-17.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygguile-17.dll new file mode 100644 index 00000000..d9578cb6 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygguile-17.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyghistory7.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyghistory7.dll new file mode 100644 index 00000000..8ca139e9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyghistory7.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygiconv-2.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygiconv-2.dll new file mode 100644 index 00000000..ecff43bf Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygiconv-2.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygintl-8.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygintl-8.dll new file mode 100644 index 00000000..8a3cef6d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygintl-8.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa-config b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa-config new file mode 100644 index 00000000..076a1669 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa-config @@ -0,0 +1,123 @@ +#!/bin/bash +# +# cyglsa-config, Copyright 2006, 2010 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# A copy of the GNU General Public License can be found at +# http://www.gnu.org/ +# +# This file is part of the Cygwin LSA authentication package. + +request() +{ + if [ "${auto_answer}" = "yes" ] + then + echo "$1 (yes/no) yes" + return 0 + elif [ "${auto_answer}" = "no" ] + then + echo "$1 (yes/no) no" + return 1 + fi + + answer="" + while [ "X${answer}" != "Xyes" -a "X${answer}" != "Xno" ] + do + echo -n "$1 (yes/no) " + read -e answer + done + if [ "X${answer}" = "Xyes" ] + then + return 0 + else + return 1 + fi +} + +# Check if running under at least Windows 2000 +_nt_too_old=`uname | awk -F- '{print ( $2 < 5.0 ) ? 1 : 0;}'` +if [ ${_nt_too_old} -eq 1 ] +then + echo "Cygwin LSA authentication not supported on Windows NT4 or older. Exiting." + exit 1 +fi + +# Directory in which cyglsa DLL is installed as DOS path. +bindir=`cygpath -w /`\\bin + +# Check if we're running on 64 bit Windows. If so, we need the 64 bit +# cyglsa DLL. +dll=cyglsa.dll +test -d `cygpath -p ${SYSTEMROOT}`/SysWOW64 && dll=cyglsa64.dll + +# Check if the DLL is actually installed. If not, bail out. +if [ ! -f /bin/${dll} ] +then + echo "Required Cygwin authentication DLL /bin/${dll} doesn't exist. Exiting." + exit 1 +fi + +echo +echo "Warning: Registering the Cygwin LSA authentication package requires" +echo "administrator privileges! You also have to reboot the machine to" +echo "activate the change." +echo +request "Are you sure you want to continue?" || exit 0 + +# The registry value which keeps the authentication packages. +value='/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages' + +[ -f /bin/cyglsa -a ! -d /bin/cyglsa ] && rm -rf /bin/cyglsa +if [ ! -d /bin/cyglsa ] +then + if ! mkdir -m 755 /bin/cyglsa + then + echo "Creating the /bin/cyglsa directory failed. Exiting." + exit 1 + fi +fi +if ! cp -b "/bin/${dll}" "/bin/cyglsa/${dll}" +then + echo "Copying the new LSA authentication package /bin/${dll} to" + echo "/bin/cyglsa/${dll} failed. Exiting." + exit 1 +fi + +# Get old content, remove every trace of "cyglsa" from it and write the +# content back to the registry with the new, correct path to the cyglsa DLL. +old=`regtool get "${value}"` +new=`for i in ${old} +do + echo $i | GREP_OPTIONS="" grep -v cyglsa +done` +if ! regtool set "${value}" ${new} "${bindir}\\cyglsa\\${dll}" +then + echo "Setting the new registry value failed. Exiting." + exit 1 +fi + +echo +echo "Cygwin LSA authentication package registered." +echo +echo "Activating Cygwin's LSA authentication package requires to reboot." +if [ -x /bin/shutdown ] +then + if request "Do you want to do this immediately?" + then + echo + echo "Other users might still be working on this machine." + echo + if request "Are you sure?" + then + echo + echo "Ok, will reboot in 30 seconds." + echo + echo "If you change your mind, call 'shutdown -a' within 30 seconds" + shutdown -r 30 + fi + fi +fi diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa.dll new file mode 100644 index 00000000..3bcfe075 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa64.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa64.dll new file mode 100644 index 00000000..417a4f74 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglsa64.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygltdl-7.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygltdl-7.dll new file mode 100644 index 00000000..4e53257d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygltdl-7.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglzma-5.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglzma-5.dll new file mode 100644 index 00000000..54f3420c Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyglzma-5.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmagic-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmagic-1.dll new file mode 100644 index 00000000..d725f414 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmagic-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmenuw-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmenuw-10.dll new file mode 100644 index 00000000..07eed86a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmenuw-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmpfr-4.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmpfr-4.dll new file mode 100644 index 00000000..029325b0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygmpfr-4.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygncurses++w-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygncurses++w-10.dll new file mode 100644 index 00000000..38220823 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygncurses++w-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygncursesw-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygncursesw-10.dll new file mode 100644 index 00000000..7071e4ca Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygncursesw-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpanelw-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpanelw-10.dll new file mode 100644 index 00000000..aeacb22d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpanelw-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpath.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpath.exe new file mode 100644 index 00000000..bf5ecf27 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpath.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpcre-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpcre-1.dll new file mode 100644 index 00000000..a3296fe9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpcre-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygperl5_22.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygperl5_22.dll new file mode 100644 index 00000000..7ba88f85 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygperl5_22.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpopt-0.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpopt-0.dll new file mode 100644 index 00000000..1263b739 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygpopt-0.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygreadline7.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygreadline7.dll new file mode 100644 index 00000000..d0f00826 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygreadline7.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygserver-config b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygserver-config new file mode 100644 index 00000000..abe943c3 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygserver-config @@ -0,0 +1,209 @@ +#!/bin/bash +# +# cygserver-config, Copyright 2003 Red Hat Inc. +# +# This file is part of the Cygwin DLL. + +# Directory where the config files are stored +SYSCONFDIR=/etc +LOCALSTATEDIR=/var + +progname=$0 +auto_answer="" +service_name=cygserver + +request() +{ + if [ "${auto_answer}" = "yes" ] + then + echo "$1 (yes/no) yes" + return 0 + elif [ "${auto_answer}" = "no" ] + then + echo "$1 (yes/no) no" + return 1 + fi + + answer="" + while [ "X${answer}" != "Xyes" -a "X${answer}" != "Xno" ] + do + echo -n "$1 (yes/no) " + read -e answer + done + if [ "X${answer}" = "Xyes" ] + then + return 0 + else + return 1 + fi +} + +# Check options + +while : +do + case $# in + 0) + break + ;; + esac + + option=$1 + shift + + case "${option}" in + -d | --debug ) + set -x + ;; + + -y | --yes ) + auto_answer=yes + ;; + + -n | --no ) + auto_answer=no + ;; + + -N | --name ) + service_name=$1 + shift + ;; + + *) + echo "usage: ${progname} [OPTION]..." + echo + echo "This script creates an Cygserver service configuration." + echo + echo "Options:" + echo " --debug -d Enable shell's debug output." + echo " --yes -y Answer all questions with \"yes\" automatically." + echo " --no -n Answer all questions with \"no\" automatically." + echo " --name -N cygserver windows service name." + echo + exit 1 + ;; + + esac +done + +# Check if running on NT +_sys="`uname`" +_nt=`expr "${_sys}" : "CYGWIN_NT"` + +# Check for running cygserver processes first. +if ps -ef | grep -v grep | grep -q ${service_name} +then + echo + echo "There is a cygserver (${service_name}) already running. Nothing to do, apparently." + echo + exit 1 +fi + +# Check for ${SYSCONFDIR} directory +if [ -e "${SYSCONFDIR}" -a ! -d "${SYSCONFDIR}" ] +then + echo + echo "${SYSCONFDIR} is existant but not a directory." + echo "Cannot create global configuration file." + echo + exit 1 +fi + +# Create it if necessary +if [ ! -e "${SYSCONFDIR}" ] +then + mkdir "${SYSCONFDIR}" + if [ ! -e "${SYSCONFDIR}" ] + then + echo + echo "Creating ${SYSCONFDIR} directory failed" + echo + exit 1 + fi +fi + +# Create /var/log if not already existing +if [ -f ${LOCALSTATEDIR}/log ] +then + echo "Creating ${LOCALSTATEDIR}/log failed!" +else + if [ ! -d ${LOCALSTATEDIR}/log ] + then + mkdir -p ${LOCALSTATEDIR}/log + fi +fi + +# Check if cygserver.conf exists. If yes, ask for overwriting +if [ -f "${SYSCONFDIR}/cygserver.conf" ] +then + if request "Overwrite existing ${SYSCONFDIR}/cygserver.conf file?" + then + rm -f "${SYSCONFDIR}/cygserver.conf" + if [ -f "${SYSCONFDIR}/cygserver.conf" ] + then + echo + echo "Can't overwrite. ${SYSCONFDIR}/cygserver.conf is write protected." + echo + exit 1 + fi + fi +fi + +# Create default cygserver.conf from skeleton files in /etc/defaults/etc +if [ ! -f "${SYSCONFDIR}/cygserver.conf" ] +then + echo "Generating ${SYSCONFDIR}/cygserver.conf file" + cp "${SYSCONFDIR}/defaults/etc/cygserver.conf" "${SYSCONFDIR}/cygserver.conf" + if [ ! -f "${SYSCONFDIR}/cygserver.conf" ] + then + echo + echo "Couldn't create ${SYSCONFDIR}/cygserver.conf." + echo "Perhaps there's no default file in ${SYSCONFDIR}/defaults/etc?" + echo "Reinstalling Cygwin might help." + echo + exit 1 + fi + chmod 664 "${SYSCONFDIR}/cygserver.conf" + chown 18.544 "${SYSCONFDIR}/cygserver.conf" +fi + +# On NT ask if cygserver should be installed as service +if [ ${_nt} -gt 0 ] +then + # But only if it is not already installed + if ! cygrunsrv -Q ${service_name} > /dev/null 2>&1 + then + echo + echo + echo "Warning: The following function requires administrator privileges!" + echo + echo "Do you want to install cygserver as service?" + if request "(Say \"no\" if it's already installed as service)" + then + if ! cygrunsrv -I ${service_name} -d "CYGWIN cygserver" -p /usr/sbin/cygserver + then + echo + echo "Installation of cygserver as service failed. Please check the" + echo "error messages you got. They might give a clue why it failed." + echo + echo "A good start is either you don't have administrator privileges" + echo "or a missing cygrunsrv binary. Please check for both." + echo + exit 1 + fi + echo + echo "The service has been installed under LocalSystem account." + echo "To start it, call \`net start ${service_name}' or \`cygrunsrv -S ${service_name}'." + fi + touch "${LOCALSTATEDIR}/log/cygserver.log" + chown 18.544 "${LOCALSTATEDIR}/log/cygserver.log" + fi +fi + +echo +echo "Further configuration options are available by editing the configuration" +echo "file ${SYSCONFDIR}/cygserver.conf. Please read the inline information in that" +echo "file carefully. The best option for the start is to just leave it alone." +echo +echo "Basic Cygserver configuration finished. Have fun!" +echo diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygsmartcols-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygsmartcols-1.dll new file mode 100644 index 00000000..359db1f0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygsmartcols-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygssp-0.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygssp-0.dll new file mode 100644 index 00000000..df3a73d7 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygssp-0.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygstart.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygstart.exe new file mode 100644 index 00000000..8e8cf5ea Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygstart.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygstdc++-6.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygstdc++-6.dll new file mode 100644 index 00000000..b4465dd1 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygstdc++-6.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygticw-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygticw-10.dll new file mode 100644 index 00000000..b371571a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygticw-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyguuid-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyguuid-1.dll new file mode 100644 index 00000000..050bc2c3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cyguuid-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygwin-console-helper.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygwin-console-helper.exe new file mode 100644 index 00000000..d1830f8d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygwin-console-helper.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygwin1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygwin1.dll new file mode 100644 index 00000000..0a386c75 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygwin1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygz.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygz.dll new file mode 100644 index 00000000..1476523b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/cygz.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dash.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dash.exe new file mode 100644 index 00000000..a9aea03a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dash.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/date.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/date.exe new file mode 100644 index 00000000..2d5b19da Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/date.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dd.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dd.exe new file mode 100644 index 00000000..b04311ee Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dd.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/df.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/df.exe new file mode 100644 index 00000000..89ebad22 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/df.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dir.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dir.exe new file mode 100644 index 00000000..819aa1cc Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dir.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dircolors.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dircolors.exe new file mode 100644 index 00000000..a01359f3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dircolors.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dirname.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dirname.exe new file mode 100644 index 00000000..ecfa6c54 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dirname.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dlltool.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dlltool.exe new file mode 100644 index 00000000..4885cedf Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dlltool.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dllwrap.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dllwrap.exe new file mode 100644 index 00000000..094c62f0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dllwrap.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dnsdomainname b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dnsdomainname new file mode 100644 index 00000000..1aeec75d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dnsdomainname differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/domainname b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/domainname new file mode 100644 index 00000000..1aeec75d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/domainname differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/du.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/du.exe new file mode 100644 index 00000000..0f6a8a76 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/du.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dumper.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dumper.exe new file mode 100644 index 00000000..fa0b436c Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/dumper.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/echo.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/echo.exe new file mode 100644 index 00000000..01fe1f5e Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/echo.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/editrights.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/editrights.exe new file mode 100644 index 00000000..1b0e97ef Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/editrights.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/egrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/egrep new file mode 100644 index 00000000..393ba6b5 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/egrep @@ -0,0 +1,2 @@ +#!/bin/sh +exec grep -E "$@" diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/elfedit.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/elfedit.exe new file mode 100644 index 00000000..5f08413e Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/elfedit.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/enc2xs b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/enc2xs new file mode 100644 index 00000000..9818c7e7 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/enc2xs @@ -0,0 +1,1430 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!./perl +BEGIN { + # @INC poking no longer needed w/ new MakeMaker and Makefile.PL's + # with $ENV{PERL_CORE} set + # In case we need it in future... + require Config; import Config; +} +use strict; +use warnings; +use Getopt::Std; +use Config; +my @orig_ARGV = @ARGV; +our $VERSION = do { my @r = (q$Revision: 2.17 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; + +# These may get re-ordered. +# RAW is a do_now as inserted by &enter +# AGG is an aggregated do_now, as built up by &process + +use constant { + RAW_NEXT => 0, + RAW_IN_LEN => 1, + RAW_OUT_BYTES => 2, + RAW_FALLBACK => 3, + + AGG_MIN_IN => 0, + AGG_MAX_IN => 1, + AGG_OUT_BYTES => 2, + AGG_NEXT => 3, + AGG_IN_LEN => 4, + AGG_OUT_LEN => 5, + AGG_FALLBACK => 6, +}; + +# (See the algorithm in encengine.c - we're building structures for it) + +# There are two sorts of structures. +# "do_now" (an array, two variants of what needs storing) is whatever we need +# to do now we've read an input byte. +# It's housed in a "do_next" (which is how we got to it), and in turn points +# to a "do_next" which contains all the "do_now"s for the next input byte. + +# There will be a "do_next" which is the start state. +# For a single byte encoding it's the only "do_next" - each "do_now" points +# back to it, and each "do_now" will cause bytes. There is no state. + +# For a multi-byte encoding where all characters in the input are the same +# length, then there will be a tree of "do_now"->"do_next"->"do_now" +# branching out from the start state, one step for each input byte. +# The leaf "do_now"s will all be at the same distance from the start state, +# only the leaf "do_now"s cause output bytes, and they in turn point back to +# the start state. + +# For an encoding where there are variable length input byte sequences, you +# will encounter a leaf "do_now" sooner for the shorter input sequences, but +# as before the leaves will point back to the start state. + +# The system will cope with escape encodings (imagine them as a mostly +# self-contained tree for each escape state, and cross links between trees +# at the state-switching characters) but so far no input format defines these. + +# The system will also cope with having output "leaves" in the middle of +# the bifurcating branches, not just at the extremities, but again no +# input format does this yet. + +# There are two variants of the "do_now" structure. The first, smaller variant +# is generated by &enter as the input file is read. There is one structure +# for each input byte. Say we are mapping a single byte encoding to a +# single byte encoding, with "ABCD" going "abcd". There will be +# 4 "do_now"s, {"A" => [...,"a",...], "B" => [...,"b",...], "C"=>..., "D"=>...} + +# &process then walks the tree, building aggregate "do_now" structures for +# adjacent bytes where possible. The aggregate is for a contiguous range of +# bytes which each produce the same length of output, each move to the +# same next state, and each have the same fallback flag. +# So our 4 RAW "do_now"s above become replaced by a single structure +# containing: +# ["A", "D", "abcd", 1, ...] +# ie, for an input byte $_ in "A".."D", output 1 byte, found as +# substr ("abcd", (ord $_ - ord "A") * 1, 1) +# which maps very nicely into pointer arithmetic in C for encengine.c + +sub encode_U +{ + # UTF-8 encode long hand - only covers part of perl's range + ## my $uv = shift; + # chr() works in native space so convert value from table + # into that space before using chr(). + my $ch = chr(utf8::unicode_to_native($_[0])); + # Now get core perl to encode that the way it likes. + utf8::encode($ch); + return $ch; +} + +sub encode_S +{ + # encode single byte + ## my ($ch,$page) = @_; return chr($ch); + return chr $_[0]; +} + +sub encode_D +{ + # encode double byte MS byte first + ## my ($ch,$page) = @_; return chr($page).chr($ch); + return chr ($_[1]) . chr $_[0]; +} + +sub encode_M +{ + # encode Multi-byte - single for 0..255 otherwise double + ## my ($ch,$page) = @_; + ## return &encode_D if $page; + ## return &encode_S; + return chr ($_[1]) . chr $_[0] if $_[1]; + return chr $_[0]; +} + +my %encode_types = (U => \&encode_U, + S => \&encode_S, + D => \&encode_D, + M => \&encode_M, + ); + +# Win32 does not expand globs on command line +eval "\@ARGV = map(glob(\$_),\@ARGV)" if ($^O eq 'MSWin32'); + +my %opt; +# I think these are: +# -Q to disable the duplicate codepoint test +# -S make mapping errors fatal +# -q to remove comments written to output files +# -O to enable the (brute force) substring optimiser +# -o to specify the output file name (else it's the first arg) +# -f to give a file with a list of input files (else use the args) +# -n to name the encoding (else use the basename of the input file. +getopts('CM:SQqOo:f:n:v',\%opt); + +$opt{M} and make_makefile_pl($opt{M}, @ARGV); +$opt{C} and make_configlocal_pm($opt{C}, @ARGV); +$opt{v} ||= $ENV{ENC2XS_VERBOSE}; + +sub verbose { + print STDERR @_ if $opt{v}; +} +sub verbosef { + printf STDERR @_ if $opt{v}; +} + +# This really should go first, else the die here causes empty (non-erroneous) +# output files to be written. +my @encfiles; +if (exists $opt{'f'}) { + # -F is followed by name of file containing list of filenames + my $flist = $opt{'f'}; + open(FLIST,$flist) || die "Cannot open $flist:$!"; + chomp(@encfiles = ); + close(FLIST); +} else { + @encfiles = @ARGV; +} + +my $cname = (exists $opt{'o'}) ? $opt{'o'} : shift(@ARGV); +chmod(0666,$cname) if -f $cname && !-w $cname; +open(C,">$cname") || die "Cannot open $cname:$!"; + +my $dname = $cname; +my $hname = $cname; + +my ($doC,$doEnc,$doUcm,$doPet); + +if ($cname =~ /\.(c|xs)$/i) # VMS may have upcased filenames with DECC$ARGV_PARSE_STYLE defined + { + $doC = 1; + $dname =~ s/(\.[^\.]*)?$/.exh/; + chmod(0666,$dname) if -f $cname && !-w $dname; + open(D,">$dname") || die "Cannot open $dname:$!"; + $hname =~ s/(\.[^\.]*)?$/.h/; + chmod(0666,$hname) if -f $cname && !-w $hname; + open(H,">$hname") || die "Cannot open $hname:$!"; + + foreach my $fh (\*C,\*D,\*H) + { + print $fh <<"END" unless $opt{'q'}; +/* + !!!!!!! DO NOT EDIT THIS FILE !!!!!!! + This file was autogenerated by: + $^X $0 @orig_ARGV + enc2xs VERSION $VERSION +*/ +END + } + + if ($cname =~ /(\w+)\.xs$/) + { + print C "#define PERL_NO_GET_CONTEXT\n"; + print C "#include \n"; + print C "#include \n"; + print C "#include \n"; + } + print C "#include \"encode.h\"\n\n"; + + } +elsif ($cname =~ /\.enc$/) + { + $doEnc = 1; + } +elsif ($cname =~ /\.ucm$/) + { + $doUcm = 1; + } +elsif ($cname =~ /\.pet$/) + { + $doPet = 1; + } + +my %encoding; +my %strings; +my $string_acc; +my %strings_in_acc; + +my $saved = 0; +my $subsave = 0; +my $strings = 0; + +sub cmp_name +{ + if ($a =~ /^.*-(\d+)/) + { + my $an = $1; + if ($b =~ /^.*-(\d+)/) + { + my $r = $an <=> $1; + return $r if $r; + } + } + return $a cmp $b; +} + + +foreach my $enc (sort cmp_name @encfiles) + { + my ($name,$sfx) = $enc =~ /^.*?([\w-]+)\.(enc|ucm)$/; + $name = $opt{'n'} if exists $opt{'n'}; + if (open(E,$enc)) + { + if ($sfx eq 'enc') + { + compile_enc(\*E,lc($name)); + } + else + { + compile_ucm(\*E,lc($name)); + } + } + else + { + warn "Cannot open $enc for $name:$!"; + } + } + +if ($doC) + { + verbose "Writing compiled form\n"; + foreach my $name (sort cmp_name keys %encoding) + { + my ($e2u,$u2e,$erep,$min_el,$max_el) = @{$encoding{$name}}; + process($name.'_utf8',$e2u); + addstrings(\*C,$e2u); + + process('utf8_'.$name,$u2e); + addstrings(\*C,$u2e); + } + outbigstring(\*C,"enctable"); + foreach my $name (sort cmp_name keys %encoding) + { + my ($e2u,$u2e,$erep,$min_el,$max_el) = @{$encoding{$name}}; + outtable(\*C,$e2u, "enctable"); + outtable(\*C,$u2e, "enctable"); + + # push(@{$encoding{$name}},outstring(\*C,$e2u->{Cname}.'_def',$erep)); + } + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; + my $ext = $cpp ? 'extern "C"' : "extern"; + my $exta = $cpp ? 'extern "C"' : "static"; + my $extb = $cpp ? 'extern "C"' : ""; + foreach my $enc (sort cmp_name keys %encoding) + { + # my ($e2u,$u2e,$rep,$min_el,$max_el,$rsym) = @{$encoding{$enc}}; + my ($e2u,$u2e,$rep,$min_el,$max_el) = @{$encoding{$enc}}; + #my @info = ($e2u->{Cname},$u2e->{Cname},$rsym,length($rep),$min_el,$max_el); + my $replen = 0; + $replen++ while($rep =~ /\G\\x[0-9A-Fa-f]/g); + my $sym = "${enc}_encoding"; + $sym =~ s/\W+/_/g; + my @info = ($e2u->{Cname},$u2e->{Cname},"${sym}_rep_character",$replen, + $min_el,$max_el); + print C "${exta} const U8 ${sym}_rep_character[] = \"$rep\";\n"; + print C "${exta} const char ${sym}_enc_name[] = \"$enc\";\n\n"; + print C "${extb} const encode_t $sym = \n"; + # This is to make null encoding work -- dankogai + for (my $i = (scalar @info) - 1; $i >= 0; --$i){ + $info[$i] ||= 1; + } + # end of null tweak -- dankogai + print C " {",join(',',@info,"{${sym}_enc_name,(const char *)0}"),"};\n\n"; + } + + foreach my $enc (sort cmp_name keys %encoding) + { + my $sym = "${enc}_encoding"; + $sym =~ s/\W+/_/g; + print H "${ext} encode_t $sym;\n"; + print D " Encode_XSEncoding(aTHX_ &$sym);\n"; + } + + if ($cname =~ /(\w+)\.xs$/) + { + my $mod = $1; + print C <<'END'; + +static void +Encode_XSEncoding(pTHX_ encode_t *enc) +{ + dSP; + HV *stash = gv_stashpv("Encode::XS", TRUE); + SV *iv = newSViv(PTR2IV(enc)); + SV *sv = sv_bless(newRV_noinc(iv),stash); + int i = 0; + /* with the SvLEN() == 0 hack, PVX won't be freed. We cast away name's + constness, in the hope that perl won't mess with it. */ + assert(SvTYPE(iv) >= SVt_PV); assert(SvLEN(iv) == 0); + SvFLAGS(iv) |= SVp_POK; + SvPVX(iv) = (char*) enc->name[0]; + PUSHMARK(sp); + XPUSHs(sv); + while (enc->name[i]) + { + const char *name = enc->name[i++]; + XPUSHs(sv_2mortal(newSVpvn(name,strlen(name)))); + } + PUTBACK; + call_pv("Encode::define_encoding",G_DISCARD); + SvREFCNT_dec(sv); +} + +END + + print C "\nMODULE = Encode::$mod\tPACKAGE = Encode::$mod\n\n"; + print C "BOOT:\n{\n"; + print C "#include \"$dname\"\n"; + print C "}\n"; + } + # Close in void context is bad, m'kay + close(D) or warn "Error closing '$dname': $!"; + close(H) or warn "Error closing '$hname': $!"; + + my $perc_saved = $saved/($strings + $saved) * 100; + my $perc_subsaved = $subsave/($strings + $subsave) * 100; + verbosef "%d bytes in string tables\n",$strings; + verbosef "%d bytes (%.3g%%) saved spotting duplicates\n", + $saved, $perc_saved if $saved; + verbosef "%d bytes (%.3g%%) saved using substrings\n", + $subsave, $perc_subsaved if $subsave; + } +elsif ($doEnc) + { + foreach my $name (sort cmp_name keys %encoding) + { + my ($e2u,$u2e,$erep,$min_el,$max_el) = @{$encoding{$name}}; + output_enc(\*C,$name,$e2u); + } + } +elsif ($doUcm) + { + foreach my $name (sort cmp_name keys %encoding) + { + my ($e2u,$u2e,$erep,$min_el,$max_el) = @{$encoding{$name}}; + output_ucm(\*C,$name,$u2e,$erep,$min_el,$max_el); + } + } + +# writing half meg files and then not checking to see if you just filled the +# disk is bad, m'kay +close(C) or die "Error closing '$cname': $!"; + +# End of the main program. + +sub compile_ucm +{ + my ($fh,$name) = @_; + my $e2u = {}; + my $u2e = {}; + my $cs; + my %attr; + while (<$fh>) + { + s/#.*$//; + last if /^\s*CHARMAP\s*$/i; + if (/^\s*<(\w+)>\s+"?([^"]*)"?\s*$/i) # " # Grrr + { + $attr{$1} = $2; + } + } + if (!defined($cs = $attr{'code_set_name'})) + { + warn "No in $name\n"; + } + else + { + $name = $cs unless exists $opt{'n'}; + } + my $erep; + my $urep; + my $max_el; + my $min_el; + if (exists $attr{'subchar'}) + { + #my @byte; + #$attr{'subchar'} =~ /^\s*/cg; + #push(@byte,$1) while $attr{'subchar'} =~ /\G\\x([0-9a-f]+)/icg; + #$erep = join('',map(chr(hex($_)),@byte)); + $erep = $attr{'subchar'}; + $erep =~ s/^\s+//; $erep =~ s/\s+$//; + } + print "Reading $name ($cs)\n"; + my $nfb = 0; + my $hfb = 0; + while (<$fh>) + { + s/#.*$//; + last if /^\s*END\s+CHARMAP\s*$/i; + next if /^\s*$/; + my (@uni, @byte) = (); + my ($uni, $byte, $fb) = m/^(\S+)\s+(\S+)\s+(\S+)\s+/o + or die "Bad line: $_"; + while ($uni =~ m/\G<([U0-9a-fA-F\+]+)>/g){ + push @uni, map { substr($_, 1) } split(/\+/, $1); + } + while ($byte =~ m/\G\\x([0-9a-fA-F]+)/g){ + push @byte, $1; + } + if (@uni) + { + my $uch = join('', map { encode_U(hex($_)) } @uni ); + my $ech = join('',map(chr(hex($_)),@byte)); + my $el = length($ech); + $max_el = $el if (!defined($max_el) || $el > $max_el); + $min_el = $el if (!defined($min_el) || $el < $min_el); + if (length($fb)) + { + $fb = substr($fb,1); + $hfb++; + } + else + { + $nfb++; + $fb = '0'; + } + # $fb is fallback flag + # 0 - round trip safe + # 1 - fallback for unicode -> enc + # 2 - skip sub-char mapping + # 3 - fallback enc -> unicode + enter($u2e,$uch,$ech,$u2e,$fb+0) if ($fb =~ /[01]/); + enter($e2u,$ech,$uch,$e2u,$fb+0) if ($fb =~ /[03]/); + } + else + { + warn $_; + } + } + if ($nfb && $hfb) + { + die "$nfb entries without fallback, $hfb entries with\n"; + } + $encoding{$name} = [$e2u,$u2e,$erep,$min_el,$max_el]; +} + + + +sub compile_enc +{ + my ($fh,$name) = @_; + my $e2u = {}; + my $u2e = {}; + + my $type; + while ($type = <$fh>) + { + last if $type !~ /^\s*#/; + } + chomp($type); + return if $type eq 'E'; + # Do the hash lookup once, rather than once per function call. 4% speedup. + my $type_func = $encode_types{$type}; + my ($def,$sym,$pages) = split(/\s+/,scalar(<$fh>)); + warn "$type encoded $name\n"; + my $rep = ''; + # Save a defined test by setting these to defined values. + my $min_el = ~0; # A very big integer + my $max_el = 0; # Anything must be longer than 0 + { + my $v = hex($def); + $rep = &$type_func($v & 0xFF, ($v >> 8) & 0xffe); + } + my $errors; + my $seen; + # use -Q to silence the seen test. Makefile.PL uses this by default. + $seen = {} unless $opt{Q}; + do + { + my $line = <$fh>; + chomp($line); + my $page = hex($line); + my $ch = 0; + my $i = 16; + do + { + # So why is it 1% faster to leave the my here? + my $line = <$fh>; + $line =~ s/\r\n$/\n/; + die "$.:${line}Line should be exactly 65 characters long including + newline (".length($line).")" unless length ($line) == 65; + # Split line into groups of 4 hex digits, convert groups to ints + # This takes 65.35 + # map {hex $_} $line =~ /(....)/g + # This takes 63.75 (2.5% less time) + # unpack "n*", pack "H*", $line + # There's an implicit loop in map. Loops are bad, m'kay. Ops are bad, m'kay + # Doing it as while ($line =~ /(....)/g) took 74.63 + foreach my $val (unpack "n*", pack "H*", $line) + { + next if $val == 0xFFFD; + my $ech = &$type_func($ch,$page); + if ($val || (!$ch && !$page)) + { + my $el = length($ech); + $max_el = $el if $el > $max_el; + $min_el = $el if $el < $min_el; + my $uch = encode_U($val); + if ($seen) { + # We're doing the test. + # We don't need to read this quickly, so storing it as a scalar, + # rather than 3 (anon array, plus the 2 scalars it holds) saves + # RAM and may make us faster on low RAM systems. [see __END__] + if (exists $seen->{$uch}) + { + warn sprintf("U%04X is %02X%02X and %04X\n", + $val,$page,$ch,$seen->{$uch}); + $errors++; + } + else + { + $seen->{$uch} = $page << 8 | $ch; + } + } + # Passing 2 extra args each time is 3.6% slower! + # Even with having to add $fallback ||= 0 later + enter_fb0($e2u,$ech,$uch); + enter_fb0($u2e,$uch,$ech); + } + else + { + # No character at this position + # enter($e2u,$ech,undef,$e2u); + } + $ch++; + } + } while --$i; + } while --$pages; + die "\$min_el=$min_el, \$max_el=$max_el - seems we read no lines" + if $min_el > $max_el; + die "$errors mapping conflicts\n" if ($errors && $opt{'S'}); + $encoding{$name} = [$e2u,$u2e,$rep,$min_el,$max_el]; +} + +# my ($a,$s,$d,$t,$fb) = @_; +sub enter { + my ($current,$inbytes,$outbytes,$next,$fallback) = @_; + # state we shift to after this (multibyte) input character defaults to same + # as current state. + $next ||= $current; + # Making sure it is defined seems to be faster than {no warnings;} in + # &process, or passing it in as 0 explicitly. + # XXX $fallback ||= 0; + + # Start at the beginning and work forwards through the string to zero. + # effectively we are removing 1 character from the front each time + # but we don't actually edit the string. [this alone seems to be 14% speedup] + # Hence -$pos is the length of the remaining string. + my $pos = -length $inbytes; + while (1) { + my $byte = substr $inbytes, $pos, 1; + # RAW_NEXT => 0, + # RAW_IN_LEN => 1, + # RAW_OUT_BYTES => 2, + # RAW_FALLBACK => 3, + # to unicode an array would seem to be better, because the pages are dense. + # from unicode can be very sparse, favouring a hash. + # hash using the bytes (all length 1) as keys rather than ord value, + # as it's easier to sort these in &process. + + # It's faster to always add $fallback even if it's undef, rather than + # choosing between 3 and 4 element array. (hence why we set it defined + # above) + my $do_now = $current->{Raw}{$byte} ||= [{},-$pos,'',$fallback]; + # When $pos was -1 we were at the last input character. + unless (++$pos) { + $do_now->[RAW_OUT_BYTES] = $outbytes; + $do_now->[RAW_NEXT] = $next; + return; + } + # Tail recursion. The intermediate state may not have a name yet. + $current = $do_now->[RAW_NEXT]; + } +} + +# This is purely for optimisation. It's just &enter hard coded for $fallback +# of 0, using only a 3 entry array ref to save memory for every entry. +sub enter_fb0 { + my ($current,$inbytes,$outbytes,$next) = @_; + $next ||= $current; + + my $pos = -length $inbytes; + while (1) { + my $byte = substr $inbytes, $pos, 1; + my $do_now = $current->{Raw}{$byte} ||= [{},-$pos,'']; + unless (++$pos) { + $do_now->[RAW_OUT_BYTES] = $outbytes; + $do_now->[RAW_NEXT] = $next; + return; + } + $current = $do_now->[RAW_NEXT]; + } +} + +sub process +{ + my ($name,$a) = @_; + $name =~ s/\W+/_/g; + $a->{Cname} = $name; + my $raw = $a->{Raw}; + my ($l, $agg_max_in, $agg_next, $agg_in_len, $agg_out_len, $agg_fallback); + my @ent; + $agg_max_in = 0; + foreach my $key (sort keys %$raw) { + # RAW_NEXT => 0, + # RAW_IN_LEN => 1, + # RAW_OUT_BYTES => 2, + # RAW_FALLBACK => 3, + my ($next, $in_len, $out_bytes, $fallback) = @{$raw->{$key}}; + # Now we are converting from raw to aggregate, switch from 1 byte strings + # to numbers + my $b = ord $key; + $fallback ||= 0; + if ($l && + # If this == fails, we're going to reset $agg_max_in below anyway. + $b == ++$agg_max_in && + # References in numeric context give the pointer as an int. + $agg_next == $next && + $agg_in_len == $in_len && + $agg_out_len == length $out_bytes && + $agg_fallback == $fallback + # && length($l->[AGG_OUT_BYTES]) < 16 + ) { + # my $i = ord($b)-ord($l->[AGG_MIN_IN]); + # we can aggregate this byte onto the end. + $l->[AGG_MAX_IN] = $b; + $l->[AGG_OUT_BYTES] .= $out_bytes; + } else { + # AGG_MIN_IN => 0, + # AGG_MAX_IN => 1, + # AGG_OUT_BYTES => 2, + # AGG_NEXT => 3, + # AGG_IN_LEN => 4, + # AGG_OUT_LEN => 5, + # AGG_FALLBACK => 6, + # Reset the last thing we saw, plus set 5 lexicals to save some derefs. + # (only gains .6% on euc-jp -- is it worth it?) + push @ent, $l = [$b, $agg_max_in = $b, $out_bytes, $agg_next = $next, + $agg_in_len = $in_len, $agg_out_len = length $out_bytes, + $agg_fallback = $fallback]; + } + if (exists $next->{Cname}) { + $next->{'Forward'} = 1 if $next != $a; + } else { + process(sprintf("%s_%02x",$name,$b),$next); + } + } + # encengine.c rules say that last entry must be for 255 + if ($agg_max_in < 255) { + push @ent, [1+$agg_max_in, 255,undef,$a,0,0]; + } + $a->{'Entries'} = \@ent; +} + + +sub addstrings +{ + my ($fh,$a) = @_; + my $name = $a->{'Cname'}; + # String tables + foreach my $b (@{$a->{'Entries'}}) + { + next unless $b->[AGG_OUT_LEN]; + $strings{$b->[AGG_OUT_BYTES]} = undef; + } + if ($a->{'Forward'}) + { + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; + my $var = $^O eq 'MacOS' || $cpp ? 'extern' : 'static'; + my $const = $cpp ? '' : 'const'; + my $ccflags = $Config{ccflags}; + if (defined $Config{ccwarnflags}) { + $ccflags .= " " . $Config{ccwarnflags}; + } + my $count = $ccflags =~ /-Wc\+\+-compat/ ? '' : scalar(@{$a->{'Entries'}}); + print $fh "$var $const encpage_t $name\[$count];\n"; + } + $a->{'DoneStrings'} = 1; + foreach my $b (@{$a->{'Entries'}}) + { + my ($s,$e,$out,$t,$end,$l) = @$b; + addstrings($fh,$t) unless $t->{'DoneStrings'}; + } +} + +sub outbigstring +{ + my ($fh,$name) = @_; + + $string_acc = ''; + + # Make the big string in the string accumulator. Longest first, on the hope + # that this makes it more likely that we find the short strings later on. + # Not sure if it helps sorting strings of the same length lexically. + foreach my $s (sort {length $b <=> length $a || $a cmp $b} keys %strings) { + my $index = index $string_acc, $s; + if ($index >= 0) { + $saved += length($s); + $strings_in_acc{$s} = $index; + } else { + OPTIMISER: { + if ($opt{'O'}) { + my $sublength = length $s; + while (--$sublength > 0) { + # progressively lop characters off the end, to see if the start of + # the new string overlaps the end of the accumulator. + if (substr ($string_acc, -$sublength) + eq substr ($s, 0, $sublength)) { + $subsave += $sublength; + $strings_in_acc{$s} = length ($string_acc) - $sublength; + # append the last bit on the end. + $string_acc .= substr ($s, $sublength); + last OPTIMISER; + } + # or if the end of the new string overlaps the start of the + # accumulator + next unless substr ($string_acc, 0, $sublength) + eq substr ($s, -$sublength); + # well, the last $sublength characters of the accumulator match. + # so as we're prepending to the accumulator, need to shift all our + # existing offsets forwards + $_ += $sublength foreach values %strings_in_acc; + $subsave += $sublength; + $strings_in_acc{$s} = 0; + # append the first bit on the start. + $string_acc = substr ($s, 0, -$sublength) . $string_acc; + last OPTIMISER; + } + } + # Optimiser (if it ran) found nothing, so just going have to tack the + # whole thing on the end. + $strings_in_acc{$s} = length $string_acc; + $string_acc .= $s; + }; + } + } + + $strings = length $string_acc; + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; + my $var = $cpp ? '' : 'static'; + my $definition = "\n$var const U8 $name\[$strings] = { " . + join(',',unpack "C*",$string_acc); + # We have a single long line. Split it at convenient commas. + print $fh $1, "\n" while $definition =~ /\G(.{74,77},)/gcs; + print $fh substr ($definition, pos $definition), " };\n"; +} + +sub findstring { + my ($name,$s) = @_; + my $offset = $strings_in_acc{$s}; + die "Can't find string " . join (',',unpack "C*",$s) . " in accumulator" + unless defined $offset; + "$name + $offset"; +} + +sub outtable +{ + my ($fh,$a,$bigname) = @_; + my $name = $a->{'Cname'}; + $a->{'Done'} = 1; + foreach my $b (@{$a->{'Entries'}}) + { + my ($s,$e,$out,$t,$end,$l) = @$b; + outtable($fh,$t,$bigname) unless $t->{'Done'}; + } + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; + my $var = $cpp ? '' : 'static'; + my $const = $cpp ? '' : 'const'; + print $fh "\n$var $const encpage_t $name\[", + scalar(@{$a->{'Entries'}}), "] = {\n"; + foreach my $b (@{$a->{'Entries'}}) + { + my ($sc,$ec,$out,$t,$end,$l,$fb) = @$b; + # $end |= 0x80 if $fb; # what the heck was on your mind, Nick? -- Dan + print $fh "{"; + if ($l) + { + printf $fh findstring($bigname,$out); + } + else + { + print $fh "0"; + } + print $fh ",",$t->{Cname}; + printf $fh ",0x%02x,0x%02x,$l,$end},\n",$sc,$ec; + } + print $fh "};\n"; +} + +sub output_enc +{ + my ($fh,$name,$a) = @_; + die "Changed - fix me for new structure"; + foreach my $b (sort keys %$a) + { + my ($s,$e,$out,$t,$end,$l,$fb) = @{$a->{$b}}; + } +} + +sub decode_U +{ + my $s = shift; +} + +my @uname; +sub char_names +{ + my $s = do "unicore/Name.pl"; + die "char_names: unicore/Name.pl: $!\n" unless defined $s; + pos($s) = 0; + while ($s =~ /\G([0-9a-f]+)\t([0-9a-f]*)\t(.*?)\s*\n/igc) + { + my $name = $3; + my $s = hex($1); + last if $s >= 0x10000; + my $e = length($2) ? hex($2) : $s; + for (my $i = $s; $i <= $e; $i++) + { + $uname[$i] = $name; +# print sprintf("U%04X $name\n",$i); + } + } +} + +sub output_ucm_page +{ + my ($cmap,$a,$t,$pre) = @_; + # warn sprintf("Page %x\n",$pre); + my $raw = $t->{Raw}; + foreach my $key (sort keys %$raw) { + # RAW_NEXT => 0, + # RAW_IN_LEN => 1, + # RAW_OUT_BYTES => 2, + # RAW_FALLBACK => 3, + my ($next, $in_len, $out_bytes, $fallback) = @{$raw->{$key}}; + my $u = ord $key; + $fallback ||= 0; + + if ($next != $a && $next != $t) { + output_ucm_page($cmap,$a,$next,(($pre|($u &0x3F)) << 6)&0xFFFF); + } elsif (length $out_bytes) { + if ($pre) { + $u = $pre|($u &0x3f); + } + my $s = sprintf " ",$u; + #foreach my $c (split(//,$out_bytes)) { + # $s .= sprintf "\\x%02X",ord($c); + #} + # 9.5% faster changing that loop to this: + $s .= sprintf +("\\x%02X" x length $out_bytes), unpack "C*", $out_bytes; + $s .= sprintf " |%d # %s\n",($fallback ? 1 : 0),$uname[$u]; + push(@$cmap,$s); + } else { + warn join(',',$u, @{$raw->{$key}},$a,$t); + } + } +} + +sub output_ucm +{ + my ($fh,$name,$h,$rep,$min_el,$max_el) = @_; + print $fh "# $0 @orig_ARGV\n" unless $opt{'q'}; + print $fh " \"$name\"\n"; + char_names(); + if (defined $min_el) + { + print $fh " $min_el\n"; + } + if (defined $max_el) + { + print $fh " $max_el\n"; + } + if (defined $rep) + { + print $fh " "; + foreach my $c (split(//,$rep)) + { + printf $fh "\\x%02X",ord($c); + } + print $fh "\n"; + } + my @cmap; + output_ucm_page(\@cmap,$h,$h,0); + print $fh "#\nCHARMAP\n"; + foreach my $line (sort { substr($a,8) cmp substr($b,8) } @cmap) + { + print $fh $line; + } + print $fh "END CHARMAP\n"; +} + +use vars qw( + $_Enc2xs + $_Version + $_Inc + $_E2X + $_Name + $_TableFiles + $_Now +); + +sub find_e2x{ + eval { require File::Find; }; + my (@inc, %e2x_dir); + for my $inc (@INC){ + push @inc, $inc unless $inc eq '.'; #skip current dir + } + File::Find::find( + sub { + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = lstat($_) or return; + -f _ or return; + if (/^.*\.e2x$/o){ + no warnings 'once'; + $e2x_dir{$File::Find::dir} ||= $mtime; + } + return; + }, @inc); + warn join("\n", keys %e2x_dir), "\n"; + for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){ + $_E2X = $d; + # warn "$_E2X => ", scalar localtime($e2x_dir{$d}); + return $_E2X; + } +} + +sub make_makefile_pl +{ + eval { require Encode; }; + $@ and die "You need to install Encode to use enc2xs -M\nerror: $@\n"; + # our used for variable expansion + $_Enc2xs = $0; + $_Version = $VERSION; + $_E2X = find_e2x(); + $_Name = shift; + $_TableFiles = join(",", map {qq('$_')} @_); + $_Now = scalar localtime(); + + eval { require File::Spec; }; + _print_expand(File::Spec->catfile($_E2X,"Makefile_PL.e2x"),"Makefile.PL"); + _print_expand(File::Spec->catfile($_E2X,"_PM.e2x"), "$_Name.pm"); + _print_expand(File::Spec->catfile($_E2X,"_T.e2x"), "t/$_Name.t"); + _print_expand(File::Spec->catfile($_E2X,"README.e2x"), "README"); + _print_expand(File::Spec->catfile($_E2X,"Changes.e2x"), "Changes"); + exit; +} + +use vars qw( + $_ModLines + $_LocalVer + ); + +sub make_configlocal_pm { + eval { require Encode; }; + $@ and die "Unable to require Encode: $@\n"; + eval { require File::Spec; }; + + # our used for variable expantion + my %in_core = map { $_ => 1 } ( + 'ascii', 'iso-8859-1', 'utf8', + 'ascii-ctrl', 'null', 'utf-8-strict' + ); + my %LocalMod = (); + # check @enc; + use File::Find (); + my $wanted = sub{ + -f $_ or return; + $File::Find::name =~ /\A\./ and return; + $File::Find::name =~ /\.pm\z/ or return; + $File::Find::name =~ m/\bEncode\b/ or return; + my $mod = $File::Find::name; + $mod =~ s/.*\bEncode\b/Encode/o; + $mod =~ s/\.pm\z//o; + $mod =~ s,/,::,og; + eval qq{ require $mod; }; + return if $@; + warn qq{ require $mod;\n}; + for my $enc ( Encode->encodings() ) { + no warnings; + $in_core{$enc} and next; + $Encode::Config::ExtModule{$enc} and next; + $LocalMod{$enc} ||= $mod; + } + }; + File::Find::find({wanted => $wanted}, @INC); + $_ModLines = ""; + for my $enc ( sort keys %LocalMod ) { + $_ModLines .= + qq(\$Encode::ExtModule{'$enc'} = "$LocalMod{$enc}";\n); + } + warn $_ModLines if $_ModLines; + $_LocalVer = _mkversion(); + $_E2X = find_e2x(); + $_Inc = $INC{"Encode.pm"}; + $_Inc =~ s/\.pm$//o; + _print_expand( File::Spec->catfile( $_E2X, "ConfigLocal_PM.e2x" ), + File::Spec->catfile( $_Inc, "ConfigLocal.pm" ), 1 ); + exit; +} + +sub _mkversion{ + # v-string is now depreciated; use time() instead; + #my ($ss,$mm,$hh,$dd,$mo,$yyyy) = localtime(); + #$yyyy += 1900, $mo +=1; + #return sprintf("v%04d.%04d.%04d", $yyyy, $mo*100+$dd, $hh*100+$mm); + return time(); +} + +sub _print_expand{ + eval { require File::Basename; }; + $@ and die "File::Basename needed. Are you on miniperl?;\nerror: $@\n"; + File::Basename->import(); + my ($src, $dst, $clobber) = @_; + if (!$clobber and -e $dst){ + warn "$dst exists. skipping\n"; + return; + } + warn "Generating $dst...\n"; + open my $in, $src or die "$src : $!"; + if ((my $d = dirname($dst)) ne '.'){ + -d $d or mkdir $d, 0755 or die "mkdir $d : $!"; + } + open my $out, ">$dst" or die "$!"; + my $asis = 0; + while (<$in>){ + if (/^#### END_OF_HEADER/){ + $asis = 1; next; + } + s/(\$_[A-Z][A-Za-z0-9]+)_/$1/gee unless $asis; + print $out $_; + } +} +__END__ + +=head1 NAME + +enc2xs -- Perl Encode Module Generator + +=head1 SYNOPSIS + + enc2xs -[options] + enc2xs -M ModName mapfiles... + enc2xs -C + +=head1 DESCRIPTION + +F builds a Perl extension for use by Encode from either +Unicode Character Mapping files (.ucm) or Tcl Encoding Files (.enc). +Besides being used internally during the build process of the Encode +module, you can use F to add your own encoding to perl. +No knowledge of XS is necessary. + +=head1 Quick Guide + +If you want to know as little about Perl as possible but need to +add a new encoding, just read this chapter and forget the rest. + +=over 4 + +=item 0.Z<> + +Have a .ucm file ready. You can get it from somewhere or you can write +your own from scratch or you can grab one from the Encode distribution +and customize it. For the UCM format, see the next Chapter. In the +example below, I'll call my theoretical encoding myascii, defined +in I. C<$> is a shell prompt. + + $ ls -F + my.ucm + +=item 1.Z<> + +Issue a command as follows; + + $ enc2xs -M My my.ucm + generating Makefile.PL + generating My.pm + generating README + generating Changes + +Now take a look at your current directory. It should look like this. + + $ ls -F + Makefile.PL My.pm my.ucm t/ + +The following files were created. + + Makefile.PL - MakeMaker script + My.pm - Encode submodule + t/My.t - test file + +=over 4 + +=item 1.1.Z<> + +If you want *.ucm installed together with the modules, do as follows; + + $ mkdir Encode + $ mv *.ucm Encode + $ enc2xs -M My Encode/*ucm + +=back + +=item 2.Z<> + +Edit the files generated. You don't have to if you have no time AND no +intention to give it to someone else. But it is a good idea to edit +the pod and to add more tests. + +=item 3.Z<> + +Now issue a command all Perl Mongers love: + + $ perl Makefile.PL + Writing Makefile for Encode::My + +=item 4.Z<> + +Now all you have to do is make. + + $ make + cp My.pm blib/lib/Encode/My.pm + /usr/local/bin/perl /usr/local/bin/enc2xs -Q -O \ + -o encode_t.c -f encode_t.fnm + Reading myascii (myascii) + Writing compiled form + 128 bytes in string tables + 384 bytes (75%) saved spotting duplicates + 1 bytes (0.775%) saved using substrings + .... + chmod 644 blib/arch/auto/Encode/My/My.bs + $ + +The time it takes varies depending on how fast your machine is and +how large your encoding is. Unless you are working on something big +like euc-tw, it won't take too long. + +=item 5.Z<> + +You can "make install" already but you should test first. + + $ make test + PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib \ + -e 'use Test::Harness qw(&runtests $verbose); \ + $verbose=0; runtests @ARGV;' t/*.t + t/My....ok + All tests successful. + Files=1, Tests=2, 0 wallclock secs + ( 0.09 cusr + 0.01 csys = 0.09 CPU) + +=item 6.Z<> + +If you are content with the test result, just "make install" + +=item 7.Z<> + +If you want to add your encoding to Encode's demand-loading list +(so you don't have to "use Encode::YourEncoding"), run + + enc2xs -C + +to update Encode::ConfigLocal, a module that controls local settings. +After that, "use Encode;" is enough to load your encodings on demand. + +=back + +=head1 The Unicode Character Map + +Encode uses the Unicode Character Map (UCM) format for source character +mappings. This format is used by IBM's ICU package and was adopted +by Nick Ing-Simmons for use with the Encode module. Since UCM is +more flexible than Tcl's Encoding Map and far more user-friendly, +this is the recommended format for Encode now. + +A UCM file looks like this. + + # + # Comments + # + "US-ascii" # Required + "ascii" # Optional + 1 # Required; usually 1 + 1 # Max. # of bytes/char + \x3F # Substitution char + # + CHARMAP + \x00 |0 # + \x01 |0 # + \x02 |0 # + .... + \x7C |0 # VERTICAL LINE + \x7D |0 # RIGHT CURLY BRACKET + \x7E |0 # TILDE + \x7F |0 # + END CHARMAP + +=over 4 + +=item * + +Anything that follows C<#> is treated as a comment. + +=item * + +The header section continues until a line containing the word +CHARMAP. This section has a form of IkeywordE value>, one +pair per line. Strings used as values must be quoted. Barewords are +treated as numbers. I<\xXX> represents a byte. + +Most of the keywords are self-explanatory. I means +substitution character, not subcharacter. When you decode a Unicode +sequence to this encoding but no matching character is found, the byte +sequence defined here will be used. For most cases, the value here is +\x3F; in ASCII, this is a question mark. + +=item * + +CHARMAP starts the character map section. Each line has a form as +follows: + + \xXX.. |0 # comment + ^ ^ ^ + | | +- Fallback flag + | +-------- Encoded byte sequence + +-------------- Unicode Character ID in hex + +The format is roughly the same as a header section except for the +fallback flag: | followed by 0..3. The meaning of the possible +values is as follows: + +=over 4 + +=item |0 + +Round trip safe. A character decoded to Unicode encodes back to the +same byte sequence. Most characters have this flag. + +=item |1 + +Fallback for unicode -> encoding. When seen, enc2xs adds this +character for the encode map only. + +=item |2 + +Skip sub-char mapping should there be no code point. + +=item |3 + +Fallback for encoding -> unicode. When seen, enc2xs adds this +character for the decode map only. + +=back + +=item * + +And finally, END OF CHARMAP ends the section. + +=back + +When you are manually creating a UCM file, you should copy ascii.ucm +or an existing encoding which is close to yours, rather than write +your own from scratch. + +When you do so, make sure you leave at least B to B as +is, unless your environment is EBCDIC. + +B: not all features in UCM are implemented. For example, +icu:state is not used. Because of that, you need to write a perl +module if you want to support algorithmical encodings, notably +the ISO-2022 series. Such modules include L, +L, and L. + +=head2 Coping with duplicate mappings + +When you create a map, you SHOULD make your mappings round-trip safe. +That is, C stands for all characters that are marked as C<|0>. Here is +how to make sure: + +=over 4 + +=item * + +Sort your map in Unicode order. + +=item * + +When you have a duplicate entry, mark either one with '|1' or '|3'. + +=item * + +And make sure the '|1' or '|3' entry FOLLOWS the '|0' entry. + +=back + +Here is an example from big5-eten. + + \xF9\xF9 |0 + \xA2\xA4 |3 + +Internally Encoding -> Unicode and Unicode -> Encoding Map looks like +this; + + E to U U to E + -------------------------------------- + \xF9\xF9 => U2550 U2550 => \xF9\xF9 + \xA2\xA4 => U2550 + +So it is round-trip safe for \xF9\xF9. But if the line above is upside +down, here is what happens. + + E to U U to E + -------------------------------------- + \xA2\xA4 => U2550 U2550 => \xF9\xF9 + (\xF9\xF9 => U2550 is now overwritten!) + +The Encode package comes with F, a crude but sufficient +utility to check the integrity of a UCM file. Check under the +Encode/bin directory for this. + +When in doubt, you can use F, yet another utility under +Encode/bin directory. + +=head1 Bookmarks + +=over 4 + +=item * + +ICU Home Page +L + +=item * + +ICU Character Mapping Tables +L + +=item * + +ICU:Conversion Data +L + +=back + +=head1 SEE ALSO + +L, +L, +L + +=cut + +# -Q to disable the duplicate codepoint test +# -S make mapping errors fatal +# -q to remove comments written to output files +# -O to enable the (brute force) substring optimiser +# -o to specify the output file name (else it's the first arg) +# -f to give a file with a list of input files (else use the args) +# -n to name the encoding (else use the basename of the input file. + +With %seen holding array refs: + + 865.66 real 28.80 user 8.79 sys + 7904 maximum resident set size + 1356 average shared memory size + 18566 average unshared data size + 229 average unshared stack size + 46080 page reclaims + 33373 page faults + +With %seen holding simple scalars: + + 342.16 real 27.11 user 3.54 sys + 8388 maximum resident set size + 1394 average shared memory size + 14969 average unshared data size + 236 average unshared stack size + 28159 page reclaims + 9839 page faults + +Yes, 5 minutes is faster than 15. Above is for CP936 in CN. Only difference is +how %seen is storing things its seen. So it is pathalogically bad on a 16M +RAM machine, but it's going to help even on modern machines. +Swapping is bad, m'kay :-) diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/encguess b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/encguess new file mode 100644 index 00000000..468a4e6e --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/encguess @@ -0,0 +1,148 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!./perl +use 5.008001; +use strict; +use warnings; +use Encode; +use Getopt::Std; +use Carp; +use Encode::Guess; +$Getopt::Std::STANDARD_HELP_VERSION = 1; + +my %opt; +getopts( "huSs:", \%opt ); +my @suspect_list; +list_valid_suspects() and exit if $opt{S}; +@suspect_list = split /:,/, $opt{s} if $opt{s}; +HELP_MESSAGE() if $opt{h}; +HELP_MESSAGE() unless @ARGV; +do_guess($_) for @ARGV; + +sub read_file { + my $filename = shift; + local $/; + open my $fh, '<:raw', $filename or croak "$filename:$!"; + my $content = <$fh>; + close $fh; + return $content; +} + +sub do_guess { + my $filename = shift; + my $data = read_file($filename); + my $enc = guess_encoding( $data, @suspect_list ); + if ( !ref($enc) && $opt{u} ) { + return 1; + } + print "$filename\t"; + if ( ref($enc) ) { + print $enc->mime_name(); + } + else { + print "unknown"; + } + print "\n"; + return 1; +} + +sub list_valid_suspects { + print join( "\n", Encode->encodings(":all") ); + print "\n"; + return 1; +} + +sub HELP_MESSAGE { + exec 'pod2usage', $0 or die "pod2usage: $!" +} +__END__ +=head1 NAME + +encguess - guess character encodings of files + +=head1 VERSION + +$Id: encguess,v 0.1 2015/02/05 10:34:19 dankogai Exp $ + +=head1 SYNOPSIS + + encguess [switches] filename... + +=head2 SWITCHES + +=over 2 + +=item -h + +show this message and exit. + +=item -s + +specify a list of "suspect encoding types" to test, +seperated by either C<:> or C<,> + +=item -S + +output a list of all acceptable encoding types that can be used with +the -s param + +=item -u + +suppress display of unidentified types + +=back + +=head2 EXAMPLES: + +=over 2 + +=item * + +Guess encoding of a file named C, using only the default +suspect types. + + encguess test.txt + +=item * + +Guess the encoding type of a file named C, using the suspect +types C. + + encguess -s euc-jp,shiftjis,7bit-jis test.txt + encguess -s euc-jp:shiftjis:7bit-jis test.txt + +=item * + +Guess the encoding type of several files, do not display results for +unidentified files. + + encguess -us euc-jp,shiftjis,7bit-jis test*.txt + +=back + +=head1 DESCRIPTION + +The encoding identification is done by checking one encoding type at a +time until all but the right type are eliminated. The set of encoding +types to try is defined by the -s parameter and defaults to ascii, +utf8 and UTF-16/32 with BOM. This can be overridden by passing one or +more encoding types via the -s parameter. If you need to pass in +multiple suspect encoding types, use a quoted string with the a space +separating each value. + +=head1 SEE ALSO + +L, L + +=head1 LICENSE AND COPYRIGHT + +Copyright 2015 Michael LaGrasta and Dan Kogai. + +This program is free software; you can redistribute it and/or modify it +under the terms of the the Artistic License (2.0). You may obtain a +copy of the full license at: + +L + +=cut diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/env.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/env.exe new file mode 100644 index 00000000..cc913f16 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/env.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ex b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ex new file mode 100644 index 00000000..ce8c2394 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ex differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/expand.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/expand.exe new file mode 100644 index 00000000..a16d4057 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/expand.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/expr.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/expr.exe new file mode 100644 index 00000000..ee8605f5 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/expr.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/factor.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/factor.exe new file mode 100644 index 00000000..fb843566 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/factor.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/false.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/false.exe new file mode 100644 index 00000000..b91956c0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/false.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fgrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fgrep new file mode 100644 index 00000000..7389264c --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fgrep @@ -0,0 +1,2 @@ +#!/bin/sh +exec grep -F "$@" diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/file.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/file.exe new file mode 100644 index 00000000..1dcd91f3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/file.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/find.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/find.exe new file mode 100644 index 00000000..598e4d12 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/find.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/flock.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/flock.exe new file mode 100644 index 00000000..116c8ed4 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/flock.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fmt.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fmt.exe new file mode 100644 index 00000000..c0ff3453 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fmt.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fold.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fold.exe new file mode 100644 index 00000000..c50abe12 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/fold.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gawk-4.1.3.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gawk-4.1.3.exe new file mode 100644 index 00000000..277ff54b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gawk-4.1.3.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gawk.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gawk.exe new file mode 100644 index 00000000..277ff54b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gawk.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gcc.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gcc.exe new file mode 100644 index 00000000..0c64107d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gcc.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gccbug b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gccbug new file mode 100644 index 00000000..a09dc828 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gccbug @@ -0,0 +1,558 @@ +#!/bin/sh +# Submit a problem report to a GNATS site. +# Copyright (C) 1993, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc. +# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a +# version written by Heinz G. Seidl (hgs@cygnus.com). +# +# This file is part of GNU GNATS. +# +# GNU GNATS is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU GNATS is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU GNATS; see the file COPYING3. If not see +# . + +# The version of this send-pr. +VERSION=3.113 + +# The submitter-id for your site. +SUBMITTER=net + +# The default mail address for PR submissions. +GNATS_ADDR=gcc-gnats@gcc.gnu.org + +# The default release for this host. +# We have to guess at what program_transform_name might have done. +# "sed 1q" because neither "head -1" nor "head -n 1" is universal, argh. + +DEFAULT_GCC="`echo $0 | sed -e 's/bug//'`" +DEFAULT_RELEASE="`$DEFAULT_GCC --version | sed 1q`" + +# The default organization. +DEFAULT_ORGANIZATION= + +# What mailer to use. This must come after the config file, since it is +# host-dependent. +# Copied from cvsbug +if [ -f /usr/sbin/sendmail ]; then + MAIL_AGENT="/usr/sbin/sendmail -oi -t" +else + MAIL_AGENT="/usr/lib/sendmail -oi -t" +fi +MAILER=`echo $MAIL_AGENT | sed -e 's, .*,,'` +if [ ! -f "$MAILER" ] ; then + echo "$COMMAND: Cannot file mail program \"$MAILER\"." + echo "$COMMAND: Please fix the MAIL_AGENT entry in the $COMMAND file." + exit 1 +fi + + +# How to read the passwd database. +PASSWD="cat /etc/passwd" + +ECHON=bsd + +if [ $ECHON = bsd ] ; then + ECHON1="echo -n" + ECHON2= +elif [ $ECHON = sysv ] ; then + ECHON1=echo + ECHON2='\c' +else + ECHON1=echo + ECHON2= +fi + +# + +if [ -z "$TMPDIR" ]; then + TMPDIR=/tmp +else + if [ "`echo $TMPDIR | grep '/$'`" != "" ]; then + TMPDIR="`echo $TMPDIR | sed -e 's,/$,,'`" + fi +fi + +if [ no = yes ]; then + TEMP0=`mktemp $TMPDIR/poXXXXXX` || exit 1 + TEMP=`mktemp $TMPDIR/pXXXXXX` || exit 1 + BAD=`mktemp $TMPDIR/pbadXXXXXX` || exit 1 + REF=`mktemp $TMPDIR/pfXXXXXX` || exit 1 + REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF" +else + TEMPD=$TMPDIR/pd$$ + TEMP0=$TEMPD/po$$ + TEMP=$TEMPD/p$$ + BAD=$TEMPD/pbad$$ + REF=$TEMPD/pf$$ + mkdir $TEMPD || exit 1 + REMOVE_TEMP="rm -rf $TEMPD" +fi + +# find a user name +if [ "$LOGNAME" = "" ]; then + if [ "$USER" != "" ]; then + LOGNAME="$USER" + else + LOGNAME="UNKNOWN" + fi +fi + +FROM="$LOGNAME" +REPLY_TO="${REPLY_TO:-${REPLYTO:-$LOGNAME}}" + +# Find out the name of the originator of this PR. +if [ -n "$NAME" ]; then + ORIGINATOR="$NAME" +elif [ -f $HOME/.fullname ]; then + ORIGINATOR="`sed -e '1q' $HOME/.fullname`" +else + # Must use temp file due to incompatibilities in quoting behavior + # and to protect shell metacharacters in the expansion of $LOGNAME + $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP0 + ORIGINATOR="`cat $TEMP0`" + rm -f $TEMP0 +fi + +if [ -n "$ORGANIZATION" ]; then + if [ -f "$ORGANIZATION" ]; then + ORGANIZATION="`cat $ORGANIZATION`" + fi +else + if [ -n "$DEFAULT_ORGANIZATION" ]; then + ORGANIZATION="$DEFAULT_ORGANIZATION" + elif [ -f $HOME/.organization ]; then + ORGANIZATION="`cat $HOME/.organization`" + fi +fi + +# If they don't have a preferred editor set, then use +if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then + EDIT=vi + else + EDIT="$EDITOR" + fi +else + EDIT="$VISUAL" +fi + +# Find out some information. +SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \ + ( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""` +ARCH=`[ -f /bin/arch ] && /bin/arch` +MACHINE=`[ -f /bin/machine ] && /bin/machine` + +COMMAND=`echo $0 | sed -e 's,.*/,,'` +USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [-s severity] + [-c address] [--request-id] [--version]" +REMOVE= +BATCH= +CC= +SEVERITY_C= + +while [ $# -gt 0 ]; do + case "$1" in + -r) ;; # Ignore for backward compat. + -t | --to) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi + shift ; GNATS_ADDR="$1" + EXPLICIT_GNATS_ADDR=true + ;; + -f | --file) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi + shift ; IN_FILE="$1" + if [ "$IN_FILE" != "-" -a ! -r "$IN_FILE" ]; then + echo "$COMMAND: cannot read $IN_FILE" + $REMOVE_TEMP + exit 1 + fi + ;; + -b | --batch) BATCH=true ;; + -c | --cc) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi + shift ; CC="$1" + ;; + -s | --severity) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi + shift ; SEVERITY_C="$1" + ;; + -p | -P | --print) PRINT=true ;; + -L | --list) FORMAT=norm ;; + -l | -CL | --lisp) FORMAT=lisp ;; + --request-id) REQUEST_ID=true ;; + -h | --help) echo "$USAGE"; $REMOVE_TEMP; exit 0 ;; + -V | --version) cat < max) { max = length($0); } } + END {print max + 1;}'` + c=`expr 70 / $l` + if [ $c -eq 0 ]; then c=1; fi + echo "$CATEGORIES" | \ + awk 'BEGIN {print "Known categories:"; i = 0 } + { printf ("%-'$l'.'$l's", $0); if ((++i % '$c') == 0) { print "" } } + END { print ""; }' + $REMOVE_TEMP + exit 0 + ;; +esac + +ORIGINATOR_C='' +ORGANIZATION_C='' +SYNOPSIS_C='' +if [ -z "$SEVERITY_C" ]; then + SEVERITY_C='<[ non-critical | serious | critical ] (one line)>' +fi +PRIORITY_C='<[ low | medium ] (one line)>' +CATEGORY_C='' +RELEASE_C='' +ENVIRONMENT_C='' +DESCRIPTION_C='' +HOW_TO_REPEAT_C='' +FIX_C='' + +# Catch some signals. ($xs kludge needed by Sun /bin/sh) +xs=0 +trap '$REMOVE_TEMP; exit $xs' 0 +trap 'echo "$COMMAND: Aborting ..."; $REMOVE_TEMP; xs=1; exit' 1 3 13 15 + +# If they told us to use a specific file, then do so. +if [ -n "$IN_FILE" ]; then + if [ "$IN_FILE" = "-" ]; then + # The PR is coming from the standard input. + if [ -n "$EXPLICIT_GNATS_ADDR" ]; then + sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" > $TEMP + else + cat > $TEMP + fi + else + # Use the file they named. + if [ -n "$EXPLICIT_GNATS_ADDR" ]; then + sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" $IN_FILE > $TEMP + else + cat $IN_FILE > $TEMP + fi + fi +else + + if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then + # If their PR_FORM points to a bogus entry, then bail. + if [ ! -f "$PR_FORM" -o ! -r "$PR_FORM" -o ! -s "$PR_FORM" ]; then + echo "$COMMAND: can't seem to read your template file (\`$PR_FORM'), ignoring PR_FORM" + sleep 1 + PRINT_INTERN=bad_prform + fi + fi + + if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then + cp $PR_FORM $TEMP || + ( echo "$COMMAND: could not copy $PR_FORM" ; xs=1; exit ) + else + for file in $TEMP $REF ; do + cat > $file << '__EOF__' +SEND-PR: -*- send-pr -*- +SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as +SEND-PR: will all comments (text enclosed in `<' and `>'). +SEND-PR: +SEND-PR: Please consult the GCC manual if you are not sure how to +SEND-PR: fill out a problem report. +SEND-PR: Note that the Synopsis field is mandatory. The Subject (for +SEND-PR: the mail) will be made the same as Synopsis unless explicitly +SEND-PR: changed. +SEND-PR: +SEND-PR: Choose from the following categories: +SEND-PR: +__EOF__ + + # Format the categories so they fit onto lines. + l=`echo "$CATEGORIES" | \ + awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } } + END {print max + 1;}'` + c=`expr 61 / $l` + if [ $c -eq 0 ]; then c=1; fi + echo "$CATEGORIES" | \ + awk 'BEGIN {printf "SEND-PR: "; i = 0 } + { printf ("%-'$l'.'$l's", $0); + if ((++i % '$c') == 0) { printf "\nSEND-PR: " } } + END { printf "\nSEND-PR:\n"; }' >> $file + + cat >> $file << __EOF__ +To: $GNATS_ADDR +Subject: +From: $FROM +Reply-To: $REPLYTO +Cc: $CC +X-send-pr-version: $VERSION +X-GNATS-Notify: + + +>Submitter-Id: $SUBMITTER +>Originator: $ORIGINATOR +>Organization: ${ORGANIZATION-$ORGANIZATION_C} +>Confidential: no +SEND-PR: Leave "Confidential" as "no"; all GCC PRs are public. +>Synopsis: $SYNOPSIS_C +>Severity: $SEVERITY_C +SEND-PR: critical GCC is completely not operational; no work-around known. +SEND-PR: serious GCC is not working properly; a work-around is possible. +SEND-PR: non-critical Report indicates minor problem. +>Priority: $PRIORITY_C +SEND-PR: medium The problem should be solved in the next release. +SEND-PR: low The problem should be solve in a future release. +>Category: $CATEGORY_C +>Class: <[ doc-bug | accepts-illegal | rejects-legal | wrong-code | ice-on-legal-code| ice-on-illegal-code | pessimizes-code | sw-bug | change-request | support ] (one line)> +SEND-PR: doc-bug The documentation is incorrect. +SEND-PR: accepts-illegal GCC fails to reject erroneous code. +SEND-PR: rejects-legal GCC gives an error message for correct code. +SEND-PR: wrong-code The machine code generated by gcc is incorrect. +SEND-PR: ice-on-legal-code GCC gives an Internal Compiler Error (ICE) +SEND-PR: for correct code +SEND-PR: ice-on-illegal-code GCC gives an ICE instead of reporting an error +SEND-PR: pessimizes-code GCC misses an important optimization opportunity +SEND-PR: sw-bug Software bug of some other class than above +SEND-PR: change-request A feature in GCC is missing. +SEND-PR: support I need help with gcc. +>Release: ${DEFAULT_RELEASE-$RELEASE_C} +>Environment: +`[ -n "$SYSTEM" ] && echo System: $SYSTEM` +`[ -n "$ARCH" ] && echo Architecture: $ARCH` +`[ -n "$MACHINE" ] && echo Machine: $MACHINE` + $ENVIRONMENT_C +host: i386-pc-mingw32 +build: i386-pc-mingw32 +target: i386-pc-mingw32 +__EOF__ + cat >> $file << \__EOF__ +configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw +__EOF__ + cat >> $file << __EOF__ +>Description: + $DESCRIPTION_C +>How-To-Repeat: + $HOW_TO_REPEAT_C +>Fix: + $FIX_C +__EOF__ + done + fi + + if [ "$PRINT" = true -o "$PRINT_INTERN" = true ]; then + cat $TEMP + xs=0; exit + fi + + chmod u+w $TEMP + if [ -z "$REQUEST_ID" ]; then + eval $EDIT $TEMP + else + ed -s $TEMP << '__EOF__' +/^Subject/s/^Subject:.*/Subject: request for a customer id/ +/^>Category/s/^>Category:.*/>Category: send-pr/ +w +q +__EOF__ + fi + + if cmp -s $REF $TEMP ; then + echo "$COMMAND: problem report not filled out, therefore not sent" + xs=1; exit + fi +fi + +# +# Check the enumeration fields + +# This is a "sed-subroutine" with one keyword parameter +# (with workaround for Sun sed bug) +# +SED_CMD=' +/$PATTERN/{ +s||| +s|<.*>|| +s|^[ ]*|| +s|[ ]*$|| +p +q +}' + + +while [ -z "$REQUEST_ID" ]; do + CNT=0 + + # 1) Confidential + # + PATTERN=">Confidential:" + CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + case "$CONFIDENTIAL" in + no) CNT=`expr $CNT + 1` ;; + *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;; + esac + # + # 2) Severity + # + PATTERN=">Severity:" + SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + case "$SEVERITY" in + ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;; + *) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'." + esac + # + # 3) Priority + # + PATTERN=">Priority:" + PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + case "$PRIORITY" in + ""|low|medium) CNT=`expr $CNT + 1` ;; + high) echo "$COMMAND: \`Priority: high' is reserved for GCC maintainers." ;; + *) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'." + esac + # + # 4) Category + # + PATTERN=">Category:" + CATEGORY=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + FOUND= + for C in $CATEGORIES + do + if [ "$C" = "$CATEGORY" ]; then FOUND=true ; break ; fi + done + if [ -n "$FOUND" ]; then + CNT=`expr $CNT + 1` + else + if [ -z "$CATEGORY" ]; then + echo "$COMMAND: you must include a Category: field in your report." + else + echo "$COMMAND: \`$CATEGORY' is not a known category." + fi + fi + # + # 5) Class + # + PATTERN=">Class:" + CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP` + case "$CLASS" in + ""|doc-bug|accepts-illegal|rejects-legal|wrong-code|ice-on-legal-code|ice-on-illegal-code|pessimizes-code|sw-bug|change-request|support) CNT=`expr $CNT + 1` ;; + *) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'." + esac + # + # 6) Check that synopsis is not empty + # + if grep "^>Synopsis:[ ]*${SYNOPSIS_C}\$" $TEMP > /dev/null + then + echo "$COMMAND: Synopsis must not be empty." + else + CNT=`expr $CNT + 1` + fi + + [ $CNT -lt 6 -a -z "$BATCH" ] && + echo "Errors were found with the problem report." + + while true; do + if [ -z "$BATCH" ]; then + $ECHON1 "a)bort, e)dit or s)end? $ECHON2" + read input + else + if [ $CNT -eq 6 ]; then + input=s + else + input=a + fi + fi + case "$input" in + a*) + if [ -z "$BATCH" ]; then + echo "$COMMAND: the problem report remains in $BAD and is not sent." + REMOVE_TEMP="rm -f $TEMP0 $TEMP $REF" + mv $TEMP $BAD + else + echo "$COMMAND: the problem report is not sent." + fi + xs=1; exit + ;; + e*) + eval $EDIT $TEMP + continue 2 + ;; + s*) + break 2 + ;; + esac + done +done + +# +# Make sure the mail has got a Subject. If not, use the same as +# in Synopsis. +# + +if grep '^Subject:[ ]*$' $TEMP > /dev/null +then + SYNOPSIS=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[ ]*//'` + ed -s $TEMP << __EOF__ +/^Subject:/s/:.*\$/: $SYNOPSIS/ +w +q +__EOF__ +fi + +# +# Remove comments and send the problem report +# (we have to use patterns, where the comment contains regex chars) +# +# /^>Originator:/s;$ORIGINATOR;; +sed -e " +/^SEND-PR:/d +/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;; +/^>Confidential:/s;<.*>;; +/^>Synopsis:/s;$SYNOPSIS_C;; +/^>Severity:/s;<.*>;; +/^>Priority:/s;<.*>;; +/^>Category:/s;$CATEGORY_C;; +/^>Class:/s;<.*>;; +/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;; +/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;; +/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;; +/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;; +/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;; +" $TEMP > $REF + +if $MAIL_AGENT < $REF; then + echo "$COMMAND: problem report sent" + xs=0; exit +else + echo "$COMMAND: mysterious mail failure." + if [ -z "$BATCH" ]; then + echo "$COMMAND: the problem report remains in $BAD and is not sent." + REMOVE_TEMP="rm -f $TEMP0 $TEMP $REF" + mv $REF $BAD + else + echo "$COMMAND: the problem report is not sent." + fi + xs=1; exit +fi diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gcov.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gcov.exe new file mode 100644 index 00000000..5cc3e2b6 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gcov.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdb-python27.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdb-python27.exe new file mode 100644 index 00000000..fbbad85a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdb-python27.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdb.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdb.exe new file mode 100644 index 00000000..7dd9eca2 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdb.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdbserver.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdbserver.exe new file mode 100644 index 00000000..9ac6f103 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gdbserver.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getconf.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getconf.exe new file mode 100644 index 00000000..df063ed0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getconf.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getfacl.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getfacl.exe new file mode 100644 index 00000000..21bffdcc Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getfacl.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getopt.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getopt.exe new file mode 100644 index 00000000..22eae1a3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/getopt.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gkill.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gkill.exe new file mode 100644 index 00000000..3628bff8 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gkill.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gprof.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gprof.exe new file mode 100644 index 00000000..ad86cd1d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gprof.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/grep.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/grep.exe new file mode 100644 index 00000000..db9072ab Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/grep.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/groups.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/groups.exe new file mode 100644 index 00000000..23b14fa9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/groups.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gunzip b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gunzip new file mode 100644 index 00000000..65fa8e30 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gunzip @@ -0,0 +1,57 @@ +#!/bin/sh +# Uncompress files. This is the inverse of gzip. + +# Copyright (C) 2007, 2010-2016 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +version="gunzip (gzip) 1.7 +Copyright (C) 2007, 2011-2016 Free Software Foundation, Inc. +This is free software. You may redistribute copies of it under the terms of +the GNU General Public License . +There is NO WARRANTY, to the extent permitted by law. + +Written by Paul Eggert." + +usage="Usage: $0 [OPTION]... [FILE]... +Uncompress FILEs (by default, in-place). + +Mandatory arguments to long options are mandatory for short options too. + + -c, --stdout write on standard output, keep original files unchanged + -f, --force force overwrite of output file and compress links + -k, --keep keep (don't delete) input files + -l, --list list compressed file contents + -n, --no-name do not save or restore the original name and time stamp + -N, --name save or restore the original name and time stamp + -q, --quiet suppress all warnings + -r, --recursive operate recursively on directories + -S, --suffix=SUF use suffix SUF on compressed files + --synchronous synchronous output (safer if system crashes, but slower) + -t, --test test compressed file integrity + -v, --verbose verbose mode + --help display this help and exit + --version display version information and exit + +With no FILE, or when FILE is -, read standard input. + +Report bugs to ." + +case $1 in +--help) exec echo "$usage";; +--version) exec echo "$version";; +esac + +exec gzip -d "$@" diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gzexe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gzexe new file mode 100644 index 00000000..719b80bd --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gzexe @@ -0,0 +1,227 @@ +#!/bin/sh +# gzexe: compressor for Unix executables. +# Use this only for binaries that you do not use frequently. +# +# The compressed version is a shell script which decompresses itself after +# skipping $skip lines of shell commands. We try invoking the compressed +# executable with the original name (for programs looking at their name). +# We also try to retain the original file permissions on the compressed file. +# For safety reasons, gzexe will not create setuid or setgid shell scripts. + +# WARNING: the first line of this file must be either : or #!/bin/sh +# The : is required for some old versions of csh. +# On Ultrix, /bin/sh is too buggy, change the first line to: #!/bin/sh5 + + +# Copyright (C) 1998, 2002, 2004, 2006-2007, 2010-2016 Free Software +# Foundation, Inc. +# Copyright (C) 1993 Jean-loup Gailly + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +version='gzexe (gzip) 1.7 +Copyright (C) 2007, 2011-2016 Free Software Foundation, Inc. +This is free software. You may redistribute copies of it under the terms of +the GNU General Public License . +There is NO WARRANTY, to the extent permitted by law. + +Written by Jean-loup Gailly.' + +usage="Usage: $0 [OPTION] FILE... +Rename each FILE with a compressed version of itself, renaming FILE to FILE~. + + -d Decompress each FILE instead of compressing it. + --help display this help and exit + --version output version information and exit + +Report bugs to ." + +decomp=0 +res=0 +while :; do + case $1 in + -d) decomp=1; shift;; + --h*) exec echo "$usage";; + --v*) exec echo "$version";; + --) shift; break;; + *) break;; + esac +done + +if test $# -eq 0; then + echo >&2 "$0: missing operand +Try \`$0 --help' for more information." + exit 1 +fi + +tmp= +trap 'res=$? + test -n "$tmp" && rm -f "$tmp" + (exit $res); exit $res +' 0 1 2 3 5 10 13 15 + +mktemp_status= + +for i do + case $i in + -*) file=./$i;; + *) file=$i;; + esac + if test ! -f "$file" || test ! -r "$file"; then + res=$? + echo >&2 "$0: $i is not a readable regular file" + continue + fi + if test $decomp -eq 0; then + if sed -e 1d -e 2q "$file" | grep "^skip=[0-9][0-9]*$" >/dev/null; then + echo >&2 "$0: $i is already gzexe'd" + continue + fi + fi + if test -u "$file"; then + echo >&2 "$0: $i has setuid permission, unchanged" + continue + fi + if test -g "$file"; then + echo >&2 "$0: $i has setgid permission, unchanged" + continue + fi + case /$file in + */basename | */bash | */cat | */chmod | */cp | \ + */dirname | */echo | */expr | */gzip | \ + */ln | */mkdir | */mktemp | */mv | */rm | \ + */sed | */sh | */sleep | */test | */tail) + echo >&2 "$0: $i might depend on itself"; continue;; + esac + + dir=`dirname "$file"` || dir=$TMPDIR + test -d "$dir" && test -w "$dir" && test -x "$dir" || dir=/tmp + test -n "$tmp" && rm -f "$tmp" + if test -z "$mktemp_status"; then + type mktemp >/dev/null 2>&1 + mktemp_status=$? + fi + if test $mktemp_status -eq 0; then + tmp=`TMPDIR=$dir mktemp` + else + tmp=$dir/gzexe$$ + fi && { cp -p "$file" "$tmp" 2>/dev/null || cp "$file" "$tmp"; } || { + res=$? + echo >&2 "$0: cannot copy $file" + continue + } + if test -w "$tmp"; then + writable=1 + else + writable=0 + chmod u+w "$tmp" || { + res=$? + echo >&2 "$0: cannot chmod $tmp" + continue + } + fi + if test $decomp -eq 0; then + (cat <<'EOF' && +#!/bin/sh +skip=44 + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +umask=`umask` +umask 77 + +gztmpdir= +trap 'res=$? + test -n "$gztmpdir" && rm -fr "$gztmpdir" + (exit $res); exit $res +' 0 1 2 3 5 10 13 15 + +if type mktemp >/dev/null 2>&1; then + gztmpdir=`mktemp -d` +else + gztmpdir=/tmp/gztmp$$; mkdir $gztmpdir +fi || { (exit 127); exit 127; } + +gztmp=$gztmpdir/$0 +case $0 in +-* | */*' +') mkdir -p "$gztmp" && rm -r "$gztmp";; +*/*) gztmp=$gztmpdir/`basename "$0"`;; +esac || { (exit 127); exit 127; } + +case `echo X | tail -n +1 2>/dev/null` in +X) tail_n=-n;; +*) tail_n=;; +esac +if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then + umask $umask + chmod 700 "$gztmp" + (sleep 5; rm -fr "$gztmpdir") 2>/dev/null & + "$gztmp" ${1+"$@"}; res=$? +else + echo >&2 "Cannot decompress $0" + (exit 127); res=127 +fi; exit $res +EOF + gzip -cv9 "$file") > "$tmp" || { + res=$? + echo >&2 "$0: compression not possible for $i, file unchanged." + continue + } + + else + # decompression + skip=44 + skip_line=`sed -e 1d -e 2q "$file"` + case $skip_line in + skip=[0-9] | skip=[0-9][0-9] | skip=[0-9][0-9][0-9]) + eval "$skip_line";; + esac + case `echo X | tail -n +1 2>/dev/null` in + X) tail_n=-n;; + *) tail_n=;; + esac + tail $tail_n +$skip "$file" | gzip -cd > "$tmp" || { + res=$? + echo >&2 "$0: $i probably not in gzexe format, file unchanged." + continue + } + fi + test $writable -eq 1 || chmod u-w "$tmp" || { + res=$? + echo >&2 "$0: $tmp: cannot chmod" + continue + } + ln -f "$file" "$file~" || { + res=$? + echo >&2 "$0: cannot backup $i as $i~" + continue + } + mv -f "$tmp" "$file" || { + res=$? + echo >&2 "$0: cannot rename $tmp to $i" + continue + } + tmp= +done +(exit $res); exit $res diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gzip.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gzip.exe new file mode 100644 index 00000000..a79375c9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/gzip.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/h2ph b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/h2ph new file mode 100644 index 00000000..36c968ee --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/h2ph @@ -0,0 +1,986 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +use strict; + +use Config; +use File::Path qw(mkpath); +use Getopt::Std; + +# Make sure read permissions for all are set: +if (defined umask && (umask() & 0444)) { + umask (umask() & ~0444); +} + +getopts('Dd:rlhaQe'); +use vars qw($opt_D $opt_d $opt_r $opt_l $opt_h $opt_a $opt_Q $opt_e); +die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a); +my @inc_dirs = inc_dirs() if $opt_a; + +my $Exit = 0; + +my $Dest_dir = $opt_d || $Config{installsitearch}; +die "Destination directory $Dest_dir doesn't exist or isn't a directory\n" + unless -d $Dest_dir; + +my @isatype = qw( + char uchar u_char + short ushort u_short + int uint u_int + long ulong u_long + FILE key_t caddr_t + float double size_t +); + +my %isatype; +@isatype{@isatype} = (1) x @isatype; +my $inif = 0; +my %Is_converted; +my %bad_file = (); + +@ARGV = ('-') unless @ARGV; + +build_preamble_if_necessary(); + +sub reindent($) { + my($text) = shift; + $text =~ s/\n/\n /g; + $text =~ s/ /\t/g; + $text; +} + +my ($t, $tab, %curargs, $new, $eval_index, $dir, $name, $args, $outfile); +my ($incl, $incl_type, $incl_quote, $next); +while (defined (my $file = next_file())) { + if (-l $file and -d $file) { + link_if_possible($file) if ($opt_l); + next; + } + + # Recover from header files with unbalanced cpp directives + $t = ''; + $tab = 0; + + # $eval_index goes into '#line' directives, to help locate syntax errors: + $eval_index = 1; + + if ($file eq '-') { + open(IN, "-"); + open(OUT, ">-"); + } else { + ($outfile = $file) =~ s/\.h$/.ph/ || next; + print "$file -> $outfile\n" unless $opt_Q; + if ($file =~ m|^(.*)/|) { + $dir = $1; + mkpath "$Dest_dir/$dir"; + } + + if ($opt_a) { # automagic mode: locate header file in @inc_dirs + foreach (@inc_dirs) { + chdir $_; + last if -f $file; + } + } + + open(IN,"$file") || (($Exit = 1),(warn "Can't open $file: $!\n"),next); + open(OUT,">$Dest_dir/$outfile") || die "Can't create $outfile: $!\n"; + } + + print OUT + "require '_h2ph_pre.ph';\n\n", + "no warnings qw(redefine misc);\n\n"; + + while (defined (local $_ = next_line($file))) { + if (s/^\s*\#\s*//) { + if (s/^define\s+(\w+)//) { + $name = $1; + $new = ''; + s/\s+$//; + s/\(\w+\s*\(\*\)\s*\(\w*\)\)\s*(-?\d+)/$1/; # (int (*)(foo_t))0 + if (s/^\(([\w,\s]*)\)//) { + $args = $1; + my $proto = '() '; + if ($args ne '') { + $proto = ''; + foreach my $arg (split(/,\s*/,$args)) { + $arg =~ s/^\s*([^\s].*[^\s])\s*$/$1/; + $curargs{$arg} = 1; + } + $args =~ s/\b(\w)/\$$1/g; + $args = "my($args) = \@_;\n$t "; + } + s/^\s+//; + expr(); + $new =~ s/(["\\])/\\$1/g; #"]); + EMIT($proto); + } else { + s/^\s+//; + expr(); + + $new = 1 if $new eq ''; + + # Shunt around such directives as '#define FOO FOO': + next if $new =~ /^\s*&\Q$name\E\s*\z/; + + $new = reindent($new); + $args = reindent($args); + $new =~ s/(['\\])/\\$1/g; #']); + + print OUT $t, 'eval '; + if ($opt_h) { + print OUT "\"\\n#line $eval_index $outfile\\n\" . "; + $eval_index++; + } + print OUT "'sub $name () {$new;}' unless defined(&$name);\n"; + } + } elsif (/^(include|import|include_next)\s*([<\"])(.*)[>\"]/) { + $incl_type = $1; + $incl_quote = $2; + $incl = $3; + if (($incl_type eq 'include_next') || + ($opt_e && exists($bad_file{$incl}))) { + $incl =~ s/\.h$/.ph/; + print OUT ($t, + "eval {\n"); + $tab += 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + print OUT ($t, "my(\@REM);\n"); + if ($incl_type eq 'include_next') { + print OUT ($t, + "my(\%INCD) = map { \$INC{\$_} => 1 } ", + "(grep { \$_ eq \"$incl\" } ", + "keys(\%INC));\n"); + print OUT ($t, + "\@REM = map { \"\$_/$incl\" } ", + "(grep { not exists(\$INCD{\"\$_/$incl\"})", + " and -f \"\$_/$incl\" } \@INC);\n"); + } else { + print OUT ($t, + "\@REM = map { \"\$_/$incl\" } ", + "(grep {-r \"\$_/$incl\" } \@INC);\n"); + } + print OUT ($t, + "require \"\$REM[0]\" if \@REM;\n"); + $tab -= 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + print OUT ($t, + "};\n"); + print OUT ($t, + "warn(\$\@) if \$\@;\n"); + } else { + $incl =~ s/\.h$/.ph/; + # copy the prefix in the quote syntax (#include "x.h") case + if ($incl !~ m|/| && $incl_quote eq q{"} && $file =~ m|^(.*)/|) { + $incl = "$1/$incl"; + } + print OUT $t,"require '$incl';\n"; + } + } elsif (/^ifdef\s+(\w+)/) { + print OUT $t,"if(defined(&$1)) {\n"; + $tab += 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + } elsif (/^ifndef\s+(\w+)/) { + print OUT $t,"unless(defined(&$1)) {\n"; + $tab += 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + } elsif (s/^if\s+//) { + $new = ''; + $inif = 1; + expr(); + $inif = 0; + print OUT $t,"if($new) {\n"; + $tab += 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + } elsif (s/^elif\s+//) { + $new = ''; + $inif = 1; + expr(); + $inif = 0; + $tab -= 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + print OUT $t,"}\n elsif($new) {\n"; + $tab += 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + } elsif (/^else/) { + $tab -= 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + print OUT $t,"} else {\n"; + $tab += 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + } elsif (/^endif/) { + $tab -= 4; + $t = "\t" x ($tab / 8) . ' ' x ($tab % 8); + print OUT $t,"}\n"; + } elsif(/^undef\s+(\w+)/) { + print OUT $t, "undef(&$1) if defined(&$1);\n"; + } elsif(/^error\s+(".*")/) { + print OUT $t, "die($1);\n"; + } elsif(/^error\s+(.*)/) { + print OUT $t, "die(\"", quotemeta($1), "\");\n"; + } elsif(/^warning\s+(.*)/) { + print OUT $t, "warn(\"", quotemeta($1), "\");\n"; + } elsif(/^ident\s+(.*)/) { + print OUT $t, "# $1\n"; + } + } elsif (/^\s*(typedef\s*)?enum\s*(\s+[a-zA-Z_]\w*\s*)?/) { # { for vi + until(/\{[^}]*\}.*;/ || /;/) { + last unless defined ($next = next_line($file)); + chomp $next; + # drop "#define FOO FOO" in enums + $next =~ s/^\s*#\s*define\s+(\w+)\s+\1\s*$//; + # #defines in enums (aliases) + $next =~ s/^\s*#\s*define\s+(\w+)\s+(\w+)\s*$/$1 = $2,/; + $_ .= $next; + print OUT "# $next\n" if $opt_D; + } + s/#\s*if.*?#\s*endif//g; # drop #ifdefs + s@/\*.*?\*/@@g; + s/\s+/ /g; + next unless /^\s?(typedef\s?)?enum\s?([a-zA-Z_]\w*)?\s?\{(.*)\}\s?([a-zA-Z_]\w*)?\s?;/; + (my $enum_subs = $3) =~ s/\s//g; + my @enum_subs = split(/,/, $enum_subs); + my $enum_val = -1; + foreach my $enum (@enum_subs) { + my ($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/; + $enum_name or next; + $enum_value =~ s/^=//; + $enum_val = (length($enum_value) ? $enum_value : $enum_val + 1); + if ($opt_h) { + print OUT ($t, + "eval(\"\\n#line $eval_index $outfile\\n", + "sub $enum_name () \{ $enum_val; \}\") ", + "unless defined(\&$enum_name);\n"); + ++ $eval_index; + } else { + print OUT ($t, + "eval(\"sub $enum_name () \{ $enum_val; \}\") ", + "unless defined(\&$enum_name);\n"); + } + } + } elsif (/^(?:__extension__\s+)?(?:extern|static)\s+(?:__)?inline(?:__)?\s+/ + and !/;\s*$/ and !/{\s*}\s*$/) + { # { for vi + # This is a hack to parse the inline functions in the glibc headers. + # Warning: massive kludge ahead. We suppose inline functions + # are mainly constructed like macros. + while (1) { + last unless defined ($next = next_line($file)); + chomp $next; + undef $_, last if $next =~ /__THROW\s*;/ + or $next =~ /^(__extension__|extern|static)\b/; + $_ .= " $next"; + print OUT "# $next\n" if $opt_D; + last if $next =~ /^}|^{.*}\s*$/; + } + next if not defined; # because it's only a prototype + s/\b(__extension__|extern|static|(?:__)?inline(?:__)?)\b//g; + # violently drop #ifdefs + s/#\s*if.*?#\s*endif//g + and print OUT "# some #ifdef were dropped here -- fill in the blanks\n"; + if (s/^(?:\w|\s|\*)*\s(\w+)\s*//) { + $name = $1; + } else { + warn "name not found"; next; # shouldn't occur... + } + my @args; + if (s/^\(([^()]*)\)\s*(\w+\s*)*//) { + for my $arg (split /,/, $1) { + if ($arg =~ /(\w+)\s*$/) { + $curargs{$1} = 1; + push @args, $1; + } + } + } + $args = ( + @args + ? "my(" . (join ',', map "\$$_", @args) . ") = \@_;\n$t " + : "" + ); + my $proto = @args ? '' : '() '; + $new = ''; + s/\breturn\b//g; # "return" doesn't occur in macros usually... + expr(); + # try to find and perlify local C variables + our @local_variables = (); # needs to be a our(): (?{...}) bug workaround + { + use re "eval"; + my $typelist = join '|', keys %isatype; + $new =~ s[' + (?:(?:__)?const(?:__)?\s+)? + (?:(?:un)?signed\s+)? + (?:long\s+)? + (?:$typelist)\s+ + (\w+) + (?{ push @local_variables, $1 }) + '] + [my \$$1]gx; + $new =~ s[' + (?:(?:__)?const(?:__)?\s+)? + (?:(?:un)?signed\s+)? + (?:long\s+)? + (?:$typelist)\s+ + ' \s+ &(\w+) \s* ; + (?{ push @local_variables, $1 }) + ] + [my \$$1;]gx; + } + $new =~ s/&$_\b/\$$_/g for @local_variables; + $new =~ s/(["\\])/\\$1/g; #"]); + # now that's almost like a macro (we hope) + EMIT($proto); + } + } + $Is_converted{$file} = 1; + if ($opt_e && exists($bad_file{$file})) { + unlink($Dest_dir . '/' . $outfile); + $next = ''; + } else { + print OUT "1;\n"; + queue_includes_from($file) if $opt_a; + } +} + +if ($opt_e && (scalar(keys %bad_file) > 0)) { + warn "Was unable to convert the following files:\n"; + warn "\t" . join("\n\t",sort(keys %bad_file)) . "\n"; +} + +exit $Exit; + +sub EMIT { + my $proto = shift; + + $new = reindent($new); + $args = reindent($args); + if ($t ne '') { + $new =~ s/(['\\])/\\$1/g; #']); + if ($opt_h) { + print OUT $t, + "eval \"\\n#line $eval_index $outfile\\n\" . 'sub $name $proto\{\n$t ${args}eval q($new);\n$t}' unless defined(\&$name);\n"; + $eval_index++; + } else { + print OUT $t, + "eval 'sub $name $proto\{\n$t ${args}eval q($new);\n$t}' unless defined(\&$name);\n"; + } + } else { + print OUT "unless(defined(\&$name)) {\n sub $name $proto\{\n\t${args}eval q($new);\n }\n}\n"; + } + %curargs = (); + return; +} + +sub expr { + if (/\b__asm__\b/) { # freak out + $new = '"(assembly code)"'; + return + } + my $joined_args; + if(keys(%curargs)) { + $joined_args = join('|', keys(%curargs)); + } + while ($_ ne '') { + s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator + s/^\&([\(a-z\)]+)/$1/i; # hack for things that take the address of + s/^(\s+)// && do {$new .= ' '; next;}; + s/^0X([0-9A-F]+)[UL]*//i + && do {my $hex = $1; + $hex =~ s/^0+//; + if (length $hex > 8 && !$Config{use64bitint}) { + # Croak if nv_preserves_uv_bits < 64 ? + $new .= hex(substr($hex, -8)) + + 2**32 * hex(substr($hex, 0, -8)); + # The above will produce "erroneous" code + # if the hex constant was e.g. inside UINT64_C + # macro, but then again, h2ph is an approximation. + } else { + $new .= lc("0x$hex"); + } + next;}; + s/^(-?\d+\.\d+E[-+]?\d+)[FL]?//i && do {$new .= $1; next;}; + s/^(\d+)\s*[LU]*//i && do {$new .= $1; next;}; + s/^("(\\"|[^"])*")// && do {$new .= $1; next;}; + s/^'((\\"|[^"])*)'// && do { + if ($curargs{$1}) { + $new .= "ord('\$$1')"; + } else { + $new .= "ord('$1')"; + } + next; + }; + # replace "sizeof(foo)" with "{foo}" + # also, remove * (C dereference operator) to avoid perl syntax + # problems. Where the %sizeof array comes from is anyone's + # guess (c2ph?), but this at least avoids fatal syntax errors. + # Behavior is undefined if sizeof() delimiters are unbalanced. + # This code was modified to able to handle constructs like this: + # sizeof(*(p)), which appear in the HP-UX 10.01 header files. + s/^sizeof\s*\(// && do { + $new .= '$sizeof'; + my $lvl = 1; # already saw one open paren + # tack { on the front, and skip it in the loop + $_ = "{" . "$_"; + my $index = 1; + # find balanced closing paren + while ($index <= length($_) && $lvl > 0) { + $lvl++ if substr($_, $index, 1) eq "("; + $lvl-- if substr($_, $index, 1) eq ")"; + $index++; + } + # tack } on the end, replacing ) + substr($_, $index - 1, 1) = "}"; + # remove pesky * operators within the sizeof argument + substr($_, 0, $index - 1) =~ s/\*//g; + next; + }; + # Eliminate typedefs + /\(([\w\s]+)[\*\s]*\)\s*[\w\(]/ && do { + my $doit = 1; + foreach (split /\s+/, $1) { # Make sure all the words are types, + unless($isatype{$_} or $_ eq 'struct' or $_ eq 'union'){ + $doit = 0; + last; + } + } + if( $doit ){ + s/\([\w\s]+[\*\s]*\)// && next; # then eliminate them. + } + }; + # struct/union member, including arrays: + s/^([_A-Z]\w*(\[[^\]]+\])?((\.|->)[_A-Z]\w*(\[[^\]]+\])?)+)//i && do { + my $id = $1; + $id =~ s/(\.|(->))([^\.\-]*)/->\{$3\}/g; + $id =~ s/\b([^\$])($joined_args)/$1\$$2/g if length($joined_args); + while($id =~ /\[\s*([^\$\&\d\]]+)\]/) { + my($index) = $1; + $index =~ s/\s//g; + if(exists($curargs{$index})) { + $index = "\$$index"; + } else { + $index = "&$index"; + } + $id =~ s/\[\s*([^\$\&\d\]]+)\]/[$index]/; + } + $new .= " (\$$id)"; + }; + s/^([_a-zA-Z]\w*)// && do { + my $id = $1; + if ($id eq 'struct' || $id eq 'union') { + s/^\s+(\w+)//; + $id .= ' ' . $1; + $isatype{$id} = 1; + } elsif ($id =~ /^((un)?signed)|(long)|(short)$/) { + while (s/^\s+(\w+)//) { $id .= ' ' . $1; } + $isatype{$id} = 1; + } + if ($curargs{$id}) { + $new .= "\$$id"; + $new .= '->' if /^[\[\{]/; + } elsif ($id eq 'defined') { + $new .= 'defined'; + } elsif (/^\s*\(/) { + s/^\s*\((\w),/("$1",/ if $id =~ /^_IO[WR]*$/i; # cheat + $new .= " &$id"; + } elsif ($isatype{$id}) { + if ($new =~ /\{\s*$/) { + $new .= "'$id'"; + } elsif ($new =~ /\(\s*$/ && /^[\s*]*\)/) { + $new =~ s/\(\s*$//; + s/^[\s*]*\)//; + } else { + $new .= q(').$id.q('); + } + } else { + if ($inif) { + if ($new =~ /defined\s*$/) { + $new .= '(&' . $id . ')'; + } elsif ($new =~ /defined\s*\($/) { + $new .= '&' . $id; + } else { + $new .= '(defined(&' . $id . ') ? &' . $id . ' : undef)'; + } + } elsif (/^\[/) { + $new .= " \$$id"; + } else { + $new .= ' &' . $id; + } + } + next; + }; + s/^(.)// && do { if ($1 ne '#') { $new .= $1; } next;}; + } +} + + +sub next_line +{ + my $file = shift; + my ($in, $out); + my $pre_sub_tri_graphs = 1; + + READ: while (not eof IN) { + $in .= ; + chomp $in; + next unless length $in; + + while (length $in) { + if ($pre_sub_tri_graphs) { + # Preprocess all tri-graphs + # including things stuck in quoted string constants. + $in =~ s/\?\?=/#/g; # | ??=| #| + $in =~ s/\?\?\!/|/g; # | ??!| || + $in =~ s/\?\?'/^/g; # | ??'| ^| + $in =~ s/\?\?\(/[/g; # | ??(| [| + $in =~ s/\?\?\)/]/g; # | ??)| ]| + $in =~ s/\?\?\-/~/g; # | ??-| ~| + $in =~ s/\?\?\//\\/g; # | ??/| \| + $in =~ s/\?\?/}/g; # | ??>| }| + } + if ($in =~ /^\#ifdef __LANGUAGE_PASCAL__/) { + # Tru64 disassembler.h evilness: mixed C and Pascal. + while () { + last if /^\#endif/; + } + $in = ""; + next READ; + } + if ($in =~ /^extern inline / && # Inlined assembler. + $^O eq 'linux' && $file =~ m!(?:^|/)asm/[^/]+\.h$!) { + while () { + last if /^}/; + } + $in = ""; + next READ; + } + if ($in =~ s/\\$//) { # \-newline + $out .= ' '; + next READ; + } elsif ($in =~ s/^([^"'\\\/]+)//) { # Passthrough + $out .= $1; + } elsif ($in =~ s/^(\\.)//) { # \... + $out .= $1; + } elsif ($in =~ /^'/) { # '... + if ($in =~ s/^('(\\.|[^'\\])*')//) { + $out .= $1; + } else { + next READ; + } + } elsif ($in =~ /^"/) { # "... + if ($in =~ s/^("(\\.|[^"\\])*")//) { + $out .= $1; + } else { + next READ; + } + } elsif ($in =~ s/^\/\/.*//) { # //... + # fall through + } elsif ($in =~ m/^\/\*/) { # /*... + # C comment removal adapted from perlfaq6: + if ($in =~ s/^\/\*[^*]*\*+([^\/*][^*]*\*+)*\///) { + $out .= ' '; + } else { # Incomplete /* */ + next READ; + } + } elsif ($in =~ s/^(\/)//) { # /... + $out .= $1; + } elsif ($in =~ s/^([^\'\"\\\/]+)//) { + $out .= $1; + } elsif ($^O eq 'linux' && + $file =~ m!(?:^|/)linux/byteorder/pdp_endian\.h$! && + $in =~ s!\'T KNOW!!) { + $out =~ s!I DON$!I_DO_NOT_KNOW!; + } else { + if ($opt_e) { + warn "Cannot parse $file:\n$in\n"; + $bad_file{$file} = 1; + $in = ''; + $out = undef; + last READ; + } else { + die "Cannot parse:\n$in\n"; + } + } + } + + last READ if $out =~ /\S/; + } + + return $out; +} + + +# Handle recursive subdirectories without getting a grotesquely big stack. +# Could this be implemented using File::Find? +sub next_file +{ + my $file; + + while (@ARGV) { + $file = shift @ARGV; + + if ($file eq '-' or -f $file or -l $file) { + return $file; + } elsif (-d $file) { + if ($opt_r) { + expand_glob($file); + } else { + print STDERR "Skipping directory '$file'\n"; + } + } elsif ($opt_a) { + return $file; + } else { + print STDERR "Skipping '$file': not a file or directory\n"; + } + } + + return undef; +} + + +# Put all the files in $directory into @ARGV for processing. +sub expand_glob +{ + my ($directory) = @_; + + $directory =~ s:/$::; + + opendir DIR, $directory; + foreach (readdir DIR) { + next if ($_ eq '.' or $_ eq '..'); + + # expand_glob() is going to be called until $ARGV[0] isn't a + # directory; so push directories, and unshift everything else. + if (-d "$directory/$_") { push @ARGV, "$directory/$_" } + else { unshift @ARGV, "$directory/$_" } + } + closedir DIR; +} + + +# Given $file, a symbolic link to a directory in the C include directory, +# make an equivalent symbolic link in $Dest_dir, if we can figure out how. +# Otherwise, just duplicate the file or directory. +sub link_if_possible +{ + my ($dirlink) = @_; + my $target = eval 'readlink($dirlink)'; + + if ($target =~ m:^\.\./: or $target =~ m:^/:) { + # The target of a parent or absolute link could leave the $Dest_dir + # hierarchy, so let's put all of the contents of $dirlink (actually, + # the contents of $target) into @ARGV; as a side effect down the + # line, $dirlink will get created as an _actual_ directory. + expand_glob($dirlink); + } else { + if (-l "$Dest_dir/$dirlink") { + unlink "$Dest_dir/$dirlink" or + print STDERR "Could not remove link $Dest_dir/$dirlink: $!\n"; + } + + if (eval 'symlink($target, "$Dest_dir/$dirlink")') { + print "Linking $target -> $Dest_dir/$dirlink\n"; + + # Make sure that the link _links_ to something: + if (! -e "$Dest_dir/$target") { + mkpath("$Dest_dir/$target", 0755) or + print STDERR "Could not create $Dest_dir/$target/\n"; + } + } else { + print STDERR "Could not symlink $target -> $Dest_dir/$dirlink: $!\n"; + } + } +} + + +# Push all #included files in $file onto our stack, except for STDIN +# and files we've already processed. +sub queue_includes_from +{ + my ($file) = @_; + my $line; + + return if ($file eq "-"); + + open HEADER, $file or return; + while (defined($line =
)) { + while (/\\$/) { # Handle continuation lines + chop $line; + $line .=
; + } + + if ($line =~ /^#\s*include\s+([<"])(.*?)[>"]/) { + my ($delimiter, $new_file) = ($1, $2); + # copy the prefix in the quote syntax (#include "x.h") case + if ($delimiter eq q{"} && $file =~ m|^(.*)/|) { + $new_file = "$1/$new_file"; + } + push(@ARGV, $new_file) unless $Is_converted{$new_file}; + } + } + close HEADER; +} + + +# Determine include directories; $Config{usrinc} should be enough for (all +# non-GCC?) C compilers, but gcc uses additional include directories. +sub inc_dirs +{ + my $from_gcc = `LC_ALL=C $Config{cc} -v -E - < /dev/null 2>&1 | awk '/^#include/, /^End of search list/' | grep '^ '`; + length($from_gcc) ? (split(' ', $from_gcc), $Config{usrinc}) : ($Config{usrinc}); +} + + +# Create "_h2ph_pre.ph", if it doesn't exist or was built by a different +# version of h2ph. +sub build_preamble_if_necessary +{ + # Increment $VERSION every time this function is modified: + my $VERSION = 4; + my $preamble = "$Dest_dir/_h2ph_pre.ph"; + + # Can we skip building the preamble file? + if (-r $preamble) { + # Extract version number from first line of preamble: + open PREAMBLE, $preamble or die "Cannot open $preamble: $!"; + my $line = ; + $line =~ /(\b\d+\b)/; + close PREAMBLE or die "Cannot close $preamble: $!"; + + # Don't build preamble if a compatible preamble exists: + return if $1 == $VERSION; + } + + my (%define) = _extract_cc_defines(); + + open PREAMBLE, ">$preamble" or die "Cannot open $preamble: $!"; + print PREAMBLE "# This file was created by h2ph version $VERSION\n"; + # Prevent non-portable hex constants from warning. + # + # We still produce an overflow warning if we can't represent + # a hex constant as an integer. + print PREAMBLE "no warnings qw(portable);\n"; + + foreach (sort keys %define) { + if ($opt_D) { + print PREAMBLE "# $_=$define{$_}\n"; + } + if ($define{$_} =~ /^\((.*)\)$/) { + # parenthesized value: d=(v) + $define{$_} = $1; + } + if (/^(\w+)\((\w)\)$/) { + my($macro, $arg) = ($1, $2); + my $def = $define{$_}; + $def =~ s/$arg/\$\{$arg\}/g; + print PREAMBLE < 10; + print PREAMBLE + "unless (defined &$_) { sub $_() { $code } }\n\n"; + } elsif ($define{$_} =~ /^\w+$/) { + my $def = $define{$_}; + if ($isatype{$def}) { + print PREAMBLE + "unless (defined &$_) { sub $_() { \"$def\" } }\n\n"; + } else { + print PREAMBLE + "unless (defined &$_) { sub $_() { &$def } }\n\n"; + } + } else { + print PREAMBLE + "unless (defined &$_) { sub $_() { \"", + quotemeta($define{$_}), "\" } }\n\n"; + } + } + print PREAMBLE "\n1;\n"; # avoid 'did not return a true value' when empty + close PREAMBLE or die "Cannot close $preamble: $!"; +} + + +# %Config contains information on macros that are pre-defined by the +# system's compiler. We need this information to make the .ph files +# function with perl as the .h files do with cc. +sub _extract_cc_defines +{ + my %define; + my $allsymbols = join " ", + @Config{'ccsymbols', 'cppsymbols', 'cppccsymbols'}; + + # Split compiler pre-definitions into 'key=value' pairs: + while ($allsymbols =~ /([^\s]+)=((\\\s|[^\s])+)/g) { + $define{$1} = $2; + if ($opt_D) { + print STDERR "$_: $1 -> $2\n"; + } + } + + return %define; +} + + +1; + +############################################################################## +__END__ + +=head1 NAME + +h2ph - convert .h C header files to .ph Perl header files + +=head1 SYNOPSIS + +B + +=head1 DESCRIPTION + +I +converts any C header files specified to the corresponding Perl header file +format. +It is most easily run while in /usr/include: + + cd /usr/include; h2ph * sys/* + +or + + cd /usr/include; h2ph * sys/* arpa/* netinet/* + +or + + cd /usr/include; h2ph -r -l . + +The output files are placed in the hierarchy rooted at Perl's +architecture dependent library directory. You can specify a different +hierarchy with a B<-d> switch. + +If run with no arguments, filters standard input to standard output. + +=head1 OPTIONS + +=over 4 + +=item -d destination_dir + +Put the resulting B<.ph> files beneath B, instead of +beneath the default Perl library location (C<$Config{'installsitearch'}>). + +=item -r + +Run recursively; if any of B are directories, then run I +on all files in those directories (and their subdirectories, etc.). B<-r> +and B<-a> are mutually exclusive. + +=item -a + +Run automagically; convert B, as well as any B<.h> files +which they include. This option will search for B<.h> files in all +directories which your C compiler ordinarily uses. B<-a> and B<-r> are +mutually exclusive. + +=item -l + +Symbolic links will be replicated in the destination directory. If B<-l> +is not specified, then links are skipped over. + +=item -h + +Put 'hints' in the .ph files which will help in locating problems with +I. In those cases when you B a B<.ph> file containing syntax +errors, instead of the cryptic + + [ some error condition ] at (eval mmm) line nnn + +you will see the slightly more helpful + + [ some error condition ] at filename.ph line nnn + +However, the B<.ph> files almost double in size when built using B<-h>. + +=item -e + +If an error is encountered during conversion, output file will be removed and +a warning emitted instead of terminating the conversion immediately. + +=item -D + +Include the code from the B<.h> file as a comment in the B<.ph> file. +This is primarily used for debugging I. + +=item -Q + +'Quiet' mode; don't print out the names of the files being converted. + +=back + +=head1 ENVIRONMENT + +No environment variables are used. + +=head1 FILES + + /usr/include/*.h + /usr/include/sys/*.h + +etc. + +=head1 AUTHOR + +Larry Wall + +=head1 SEE ALSO + +perl(1) + +=head1 DIAGNOSTICS + +The usual warnings if it can't read or write the files involved. + +=head1 BUGS + +Doesn't construct the %sizeof array for you. + +It doesn't handle all C constructs, but it does attempt to isolate +definitions inside evals so that you can get at the definitions +that it can translate. + +It's only intended as a rough tool. +You may need to dicker with the files produced. + +You have to run this program by hand; it's not run as part of the Perl +installation. + +Doesn't handle complicated expressions built piecemeal, a la: + + enum { + FIRST_VALUE, + SECOND_VALUE, + #ifdef ABC + THIRD_VALUE + #endif + }; + +Doesn't necessarily locate all of your C compiler's internally-defined +symbols. + +=cut + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/h2xs b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/h2xs new file mode 100644 index 00000000..f0516e1d --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/h2xs @@ -0,0 +1,2205 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +use warnings; + +=head1 NAME + +h2xs - convert .h C header files to Perl extensions + +=head1 SYNOPSIS + +B [B ...] [headerfile ... [extra_libraries]] + +B B<-h>|B<-?>|B<--help> + +=head1 DESCRIPTION + +I builds a Perl extension from C header files. The extension +will include functions which can be used to retrieve the value of any +#define statement which was in the C header files. + +The I will be used for the name of the extension. If +module_name is not supplied then the name of the first header file +will be used, with the first character capitalized. + +If the extension might need extra libraries, they should be included +here. The extension Makefile.PL will take care of checking whether +the libraries actually exist and how they should be loaded. The extra +libraries should be specified in the form -lm -lposix, etc, just as on +the cc command line. By default, the Makefile.PL will search through +the library path determined by Configure. That path can be augmented +by including arguments of the form B<-L/another/library/path> in the +extra-libraries argument. + +In spite of its name, I may also be used to create a skeleton pure +Perl module. See the B<-X> option. + +=head1 OPTIONS + +=over 5 + +=item B<-A>, B<--omit-autoload> + +Omit all autoload facilities. This is the same as B<-c> but also +removes the S> statement from the .pm file. + +=item B<-B>, B<--beta-version> + +Use an alpha/beta style version number. Causes version number to +be "0.00_01" unless B<-v> is specified. + +=item B<-C>, B<--omit-changes> + +Omits creation of the F file, and adds a HISTORY section to +the POD template. + +=item B<-F>, B<--cpp-flags>=I + +Additional flags to specify to C preprocessor when scanning header for +function declarations. Writes these options in the generated F +too. + +=item B<-M>, B<--func-mask>=I + +selects functions/macros to process. + +=item B<-O>, B<--overwrite-ok> + +Allows a pre-existing extension directory to be overwritten. + +=item B<-P>, B<--omit-pod> + +Omit the autogenerated stub POD section. + +=item B<-X>, B<--omit-XS> + +Omit the XS portion. Used to generate a skeleton pure Perl module. +C<-c> and C<-f> are implicitly enabled. + +=item B<-a>, B<--gen-accessors> + +Generate an accessor method for each element of structs and unions. The +generated methods are named after the element name; will return the current +value of the element if called without additional arguments; and will set +the element to the supplied value (and return the new value) if called with +an additional argument. Embedded structures and unions are returned as a +pointer rather than the complete structure, to facilitate chained calls. + +These methods all apply to the Ptr type for the structure; additionally +two methods are constructed for the structure type itself, C<_to_ptr> +which returns a Ptr type pointing to the same structure, and a C +method to construct and return a new structure, initialised to zeroes. + +=item B<-b>, B<--compat-version>=I + +Generates a .pm file which is backwards compatible with the specified +perl version. + +For versions < 5.6.0, the changes are. + - no use of 'our' (uses 'use vars' instead) + - no 'use warnings' + +Specifying a compatibility version higher than the version of perl you +are using to run h2xs will have no effect. If unspecified h2xs will default +to compatibility with the version of perl you are using to run h2xs. + +=item B<-c>, B<--omit-constant> + +Omit C from the .xs file and corresponding specialised +C from the .pm file. + +=item B<-d>, B<--debugging> + +Turn on debugging messages. + +=item B<-e>, B<--omit-enums>=[I] + +If I is not given, skip all constants that are defined in +a C enumeration. Otherwise skip only those constants that are defined in an +enum whose name matches I. + +Since I is optional, make sure that this switch is followed +by at least one other switch if you omit I and have some +pending arguments such as header-file names. This is ok: + + h2xs -e -n Module::Foo foo.h + +This is not ok: + + h2xs -n Module::Foo -e foo.h + +In the latter, foo.h is taken as I. + +=item B<-f>, B<--force> + +Allows an extension to be created for a header even if that header is +not found in standard include directories. + +=item B<-g>, B<--global> + +Include code for safely storing static data in the .xs file. +Extensions that do no make use of static data can ignore this option. + +=item B<-h>, B<-?>, B<--help> + +Print the usage, help and version for this h2xs and exit. + +=item B<-k>, B<--omit-const-func> + +For function arguments declared as C, omit the const attribute in the +generated XS code. + +=item B<-m>, B<--gen-tied-var> + +B: for each variable declared in the header file(s), declare +a perl variable of the same name magically tied to the C variable. + +=item B<-n>, B<--name>=I + +Specifies a name to be used for the extension, e.g., S<-n RPC::DCE> + +=item B<-o>, B<--opaque-re>=I + +Use "opaque" data type for the C types matched by the regular +expression, even if these types are C-equivalent to types +from typemaps. Should not be used without B<-x>. + +This may be useful since, say, types which are C-equivalent +to integers may represent OS-related handles, and one may want to work +with these handles in OO-way, as in C<$handle-Edo_something()>. +Use C<-o .> if you want to handle all the Ced types as opaque +types. + +The type-to-match is whitewashed (except for commas, which have no +whitespace before them, and multiple C<*> which have no whitespace +between them). + +=item B<-p>, B<--remove-prefix>=I + +Specify a prefix which should be removed from the Perl function names, +e.g., S<-p sec_rgy_> This sets up the XS B keyword and removes +the prefix from functions that are autoloaded via the C +mechanism. + +=item B<-s>, B<--const-subs>=I + +Create a perl subroutine for the specified macros rather than autoload +with the constant() subroutine. These macros are assumed to have a +return type of B, e.g., +S<-s sec_rgy_wildcard_name,sec_rgy_wildcard_sid>. + +=item B<-t>, B<--default-type>=I + +Specify the internal type that the constant() mechanism uses for macros. +The default is IV (signed integer). Currently all macros found during the +header scanning process will be assumed to have this type. Future versions +of C may gain the ability to make educated guesses. + +=item B<--use-new-tests> + +When B<--compat-version> (B<-b>) is present the generated tests will use +C rather than C which is the default for versions before +5.6.2. C will be added to PREREQ_PM in the generated +C. + +=item B<--use-old-tests> + +Will force the generation of test code that uses the older C module. + +=item B<--skip-exporter> + +Do not use C and/or export any symbol. + +=item B<--skip-ppport> + +Do not use C: no portability to older version. + +=item B<--skip-autoloader> + +Do not use the module C; but keep the constant() function +and C for constants. + +=item B<--skip-strict> + +Do not use the pragma C. + +=item B<--skip-warnings> + +Do not use the pragma C. + +=item B<-v>, B<--version>=I + +Specify a version number for this extension. This version number is added +to the templates. The default is 0.01, or 0.00_01 if C<-B> is specified. +The version specified should be numeric. + +=item B<-x>, B<--autogen-xsubs> + +Automatically generate XSUBs basing on function declarations in the +header file. The package C should be installed. If this +option is specified, the name of the header file may look like +C. In this case NAME1 is used instead of the specified +string, but XSUBs are emitted only for the declarations included from +file NAME2. + +Note that some types of arguments/return-values for functions may +result in XSUB-declarations/typemap-entries which need +hand-editing. Such may be objects which cannot be converted from/to a +pointer (like C), pointers to functions, or arrays. See +also the section on L>. + +=back + +=head1 EXAMPLES + + + # Default behavior, extension is Rusers + h2xs rpcsvc/rusers + + # Same, but extension is RUSERS + h2xs -n RUSERS rpcsvc/rusers + + # Extension is rpcsvc::rusers. Still finds + h2xs rpcsvc::rusers + + # Extension is ONC::RPC. Still finds + h2xs -n ONC::RPC rpcsvc/rusers + + # Without constant() or AUTOLOAD + h2xs -c rpcsvc/rusers + + # Creates templates for an extension named RPC + h2xs -cfn RPC + + # Extension is ONC::RPC. + h2xs -cfn ONC::RPC + + # Extension is a pure Perl module with no XS code. + h2xs -X My::Module + + # Extension is Lib::Foo which works at least with Perl5.005_03. + # Constants are created for all #defines and enums h2xs can find + # in foo.h. + h2xs -b 5.5.3 -n Lib::Foo foo.h + + # Extension is Lib::Foo which works at least with Perl5.005_03. + # Constants are created for all #defines but only for enums + # whose names do not start with 'bar_'. + h2xs -b 5.5.3 -e '^bar_' -n Lib::Foo foo.h + + # Makefile.PL will look for library -lrpc in + # additional directory /opt/net/lib + h2xs rpcsvc/rusers -L/opt/net/lib -lrpc + + # Extension is DCE::rgynbase + # prefix "sec_rgy_" is dropped from perl function names + h2xs -n DCE::rgynbase -p sec_rgy_ dce/rgynbase + + # Extension is DCE::rgynbase + # prefix "sec_rgy_" is dropped from perl function names + # subroutines are created for sec_rgy_wildcard_name and + # sec_rgy_wildcard_sid + h2xs -n DCE::rgynbase -p sec_rgy_ \ + -s sec_rgy_wildcard_name,sec_rgy_wildcard_sid dce/rgynbase + + # Make XS without defines in perl.h, but with function declarations + # visible from perl.h. Name of the extension is perl1. + # When scanning perl.h, define -DEXT=extern -DdEXT= -DINIT(x)= + # Extra backslashes below because the string is passed to shell. + # Note that a directory with perl header files would + # be added automatically to include path. + h2xs -xAn perl1 -F "-DEXT=extern -DdEXT= -DINIT\(x\)=" perl.h + + # Same with function declaration in proto.h as visible from perl.h. + h2xs -xAn perl2 perl.h,proto.h + + # Same but select only functions which match /^av_/ + h2xs -M '^av_' -xAn perl2 perl.h,proto.h + + # Same but treat SV* etc as "opaque" types + h2xs -o '^[S]V \*$' -M '^av_' -xAn perl2 perl.h,proto.h + +=head2 Extension based on F<.h> and F<.c> files + +Suppose that you have some C files implementing some functionality, +and the corresponding header files. How to create an extension which +makes this functionality accessible in Perl? The example below +assumes that the header files are F and +I, and you want the perl module be named as +C. If you need some preprocessor directives and/or +linking with external libraries, see the flags C<-F>, C<-L> and C<-l> +in L<"OPTIONS">. + +=over + +=item Find the directory name + +Start with a dummy run of h2xs: + + h2xs -Afn Ext::Ension + +The only purpose of this step is to create the needed directories, and +let you know the names of these directories. From the output you can +see that the directory for the extension is F. + +=item Copy C files + +Copy your header files and C files to this directory F. + +=item Create the extension + +Run h2xs, overwriting older autogenerated files: + + h2xs -Oxan Ext::Ension interface_simple.h interface_hairy.h + +h2xs looks for header files I changing to the extension +directory, so it will find your header files OK. + +=item Archive and test + +As usual, run + + cd Ext/Ension + perl Makefile.PL + make dist + make + make test + +=item Hints + +It is important to do C as early as possible. This way you +can easily merge(1) your changes to autogenerated files if you decide +to edit your C<.h> files and rerun h2xs. + +Do not forget to edit the documentation in the generated F<.pm> file. + +Consider the autogenerated files as skeletons only, you may invent +better interfaces than what h2xs could guess. + +Consider this section as a guideline only, some other options of h2xs +may better suit your needs. + +=back + +=head1 ENVIRONMENT + +No environment variables are used. + +=head1 AUTHOR + +Larry Wall and others + +=head1 SEE ALSO + +L, L, L, and L. + +=head1 DIAGNOSTICS + +The usual warnings if it cannot read or write the files involved. + +=head1 LIMITATIONS of B<-x> + +F would not distinguish whether an argument to a C function +which is of the form, say, C, is an input, output, or +input/output parameter. In particular, argument declarations of the +form + + int + foo(n) + int *n + +should be better rewritten as + + int + foo(n) + int &n + +if C is an input parameter. + +Additionally, F has no facilities to intuit that a function + + int + foo(addr,l) + char *addr + int l + +takes a pair of address and length of data at this address, so it is better +to rewrite this function as + + int + foo(sv) + SV *addr + PREINIT: + STRLEN len; + char *s; + CODE: + s = SvPV(sv,len); + RETVAL = foo(s, len); + OUTPUT: + RETVAL + +or alternately + + static int + my_foo(SV *sv) + { + STRLEN len; + char *s = SvPV(sv,len); + + return foo(s, len); + } + + MODULE = foo PACKAGE = foo PREFIX = my_ + + int + foo(sv) + SV *sv + +See L and L for additional details. + +=cut + +# ' # Grr +use strict; + + +my( $H2XS_VERSION ) = ' $Revision: 1.23 $ ' =~ /\$Revision:\s+([^\s]+)/; +my $TEMPLATE_VERSION = '0.01'; +my @ARGS = @ARGV; +my $compat_version = $]; + +use Getopt::Long; +use Config; +use Text::Wrap; +$Text::Wrap::huge = 'overflow'; +$Text::Wrap::columns = 80; +use ExtUtils::Constant qw (WriteConstants WriteMakefileSnippet autoload); +use File::Compare; +use File::Path; + +sub usage { + warn "@_\n" if @_; + die <. + --skip-strict Do not use the pragma C. + --skip-warnings Do not use the pragma C. + -v, --version Specify a version number for this extension. + -x, --autogen-xsubs Autogenerate XSUBs using C::Scan. + --use-xsloader Use XSLoader in backward compatible modules (ignored + when used with -X). + +extra_libraries + are any libraries that might be needed for loading the + extension, e.g. -lm would try to link in the math library. +EOFUSAGE +} + +my ($opt_A, + $opt_B, + $opt_C, + $opt_F, + $opt_M, + $opt_O, + $opt_P, + $opt_X, + $opt_a, + $opt_c, + $opt_d, + $opt_e, + $opt_f, + $opt_g, + $opt_h, + $opt_k, + $opt_m, + $opt_n, + $opt_o, + $opt_p, + $opt_s, + $opt_v, + $opt_x, + $opt_b, + $opt_t, + $new_test, + $old_test, + $skip_exporter, + $skip_ppport, + $skip_autoloader, + $skip_strict, + $skip_warnings, + $use_xsloader + ); + +Getopt::Long::Configure('bundling'); +Getopt::Long::Configure('pass_through'); + +my %options = ( + 'omit-autoload|A' => \$opt_A, + 'beta-version|B' => \$opt_B, + 'omit-changes|C' => \$opt_C, + 'cpp-flags|F=s' => \$opt_F, + 'func-mask|M=s' => \$opt_M, + 'overwrite_ok|O' => \$opt_O, + 'omit-pod|P' => \$opt_P, + 'omit-XS|X' => \$opt_X, + 'gen-accessors|a' => \$opt_a, + 'compat-version|b=s' => \$opt_b, + 'omit-constant|c' => \$opt_c, + 'debugging|d' => \$opt_d, + 'omit-enums|e:s' => \$opt_e, + 'force|f' => \$opt_f, + 'global|g' => \$opt_g, + 'help|h|?' => \$opt_h, + 'omit-const-func|k' => \$opt_k, + 'gen-tied-var|m' => \$opt_m, + 'name|n=s' => \$opt_n, + 'opaque-re|o=s' => \$opt_o, + 'remove-prefix|p=s' => \$opt_p, + 'const-subs|s=s' => \$opt_s, + 'default-type|t=s' => \$opt_t, + 'version|v=s' => \$opt_v, + 'autogen-xsubs|x' => \$opt_x, + 'use-new-tests' => \$new_test, + 'use-old-tests' => \$old_test, + 'skip-exporter' => \$skip_exporter, + 'skip-ppport' => \$skip_ppport, + 'skip-autoloader' => \$skip_autoloader, + 'skip-warnings' => \$skip_warnings, + 'skip-strict' => \$skip_strict, + 'use-xsloader' => \$use_xsloader, + ); + +GetOptions(%options) || usage; + +usage if $opt_h; + +if( $opt_b ){ + usage "You cannot use -b and -m at the same time.\n" if ($opt_b && $opt_m); + $opt_b =~ /^v?(\d+)\.(\d+)\.(\d+)/ || + usage "You must provide the backwards compatibility version in X.Y.Z form. " + . "(i.e. 5.5.0)\n"; + my ($maj,$min,$sub) = ($1,$2,$3); + if ($maj < 5 || ($maj == 5 && $min < 6)) { + $compat_version = + $sub ? sprintf("%d.%03d%02d",$maj,$min,$sub) : + sprintf("%d.%03d", $maj,$min); + } else { + $compat_version = sprintf("%d.%03d%03d",$maj,$min,$sub); + } +} else { + my ($maj,$min,$sub) = $compat_version =~ /(\d+)\.(\d\d\d)(\d*)/; + $sub ||= 0; + warn sprintf <<'EOF', $maj,$min,$sub; +Defaulting to backwards compatibility with perl %d.%d.%d +If you intend this module to be compatible with earlier perl versions, please +specify a minimum perl version with the -b option. + +EOF +} + +if( $opt_B ){ + $TEMPLATE_VERSION = '0.00_01'; +} + +if( $opt_v ){ + $TEMPLATE_VERSION = $opt_v; + + # check if it is numeric + my $temp_version = $TEMPLATE_VERSION; + my $beta_version = $temp_version =~ s/(\d)_(\d\d)/$1$2/; + my $notnum; + { + local $SIG{__WARN__} = sub { $notnum = 1 }; + use warnings 'numeric'; + $temp_version = 0+$temp_version; + } + + if ($notnum) { + my $module = $opt_n || 'Your::Module'; + warn <<"EOF"; +You have specified a non-numeric version. Unless you supply an +appropriate VERSION class method, users may not be able to specify a +minimum required version with C. + +EOF + } + else { + $opt_B = $beta_version; + } +} + +# -A implies -c. +$skip_autoloader = $opt_c = 1 if $opt_A; + +# -X implies -c and -f +$opt_c = $opt_f = 1 if $opt_X; + +$opt_t ||= 'IV'; + +my %const_xsub; +%const_xsub = map { $_,1 } split(/,+/, $opt_s) if $opt_s; + +my $extralibs = ''; + +my @path_h; + +while (my $arg = shift) { + if ($arg =~ /^-l/i) { + $extralibs .= "$arg "; + next; + } + last if $extralibs; + push(@path_h, $arg); +} + +usage "Must supply header file or module name\n" + unless (@path_h or $opt_n); + +my $fmask; +my $tmask; + +$fmask = qr{$opt_M} if defined $opt_M; +$tmask = qr{$opt_o} if defined $opt_o; +my $tmask_all = $tmask && $opt_o eq '.'; + +if ($opt_x) { + eval {require C::Scan; 1} + or die <= 0.70 + or die <curdir(), $Config{usrinc}, + (split / +/, $Config{locincpth} // ""), '/usr/include'); + } + foreach my $path_h (@path_h) { + $name ||= $path_h; + $module ||= do { + $name =~ s/\.h$//; + if ( $name !~ /::/ ) { + $name =~ s#^.*/##; + $name = "\u$name"; + } + $name; + }; + + if( $path_h =~ s#::#/#g && $opt_n ){ + warn "Nesting of headerfile ignored with -n\n"; + } + $path_h .= ".h" unless $path_h =~ /\.h$/; + my $fullpath = $path_h; + $path_h =~ s/,.*$// if $opt_x; + $fullpath{$path_h} = $fullpath; + + # Minor trickery: we can't chdir() before we processed the headers + # (so know the name of the extension), but the header may be in the + # extension directory... + my $tmp_path_h = $path_h; + my $rel_path_h = $path_h; + my @dirs = @paths; + if (not -f $path_h) { + my $found; + for my $dir (@paths) { + $found++, last + if -f ($path_h = File::Spec->catfile($dir, $tmp_path_h)); + } + if ($found) { + $rel_path_h = $path_h; + $fullpath{$path_h} = $fullpath; + } else { + (my $epath = $module) =~ s,::,/,g; + $epath = File::Spec->catdir('ext', $epath) if -d 'ext'; + $rel_path_h = File::Spec->catfile($epath, $tmp_path_h); + $path_h = $tmp_path_h; # Used during -x + push @dirs, $epath; + } + } + + if (!$opt_c) { + die "Can't find $tmp_path_h in @dirs\n" + if ( ! $opt_f && ! -f "$rel_path_h" ); + # Scan the header file (we should deal with nested header files) + # Record the names of simple #define constants into const_names + # Function prototypes are processed below. + open(CH, "<$rel_path_h") || die "Can't open $rel_path_h: $!\n"; + defines: + while () { + if ($pre_sub_tri_graphs) { + # Preprocess all tri-graphs + # including things stuck in quoted string constants. + s/\?\?=/#/g; # | ??=| #| + s/\?\?\!/|/g; # | ??!| || + s/\?\?'/^/g; # | ??'| ^| + s/\?\?\(/[/g; # | ??(| [| + s/\?\?\)/]/g; # | ??)| ]| + s/\?\?\-/~/g; # | ??-| ~| + s/\?\?\//\\/g; # | ??/| \| + s/\?\?/}/g; # | ??>| }| + } + if (/^[ \t]*#[ \t]*define\s+([\$\w]+)\b(?!\()\s*(?=[^"\s])(.*)/) { + my $def = $1; + my $rest = $2; + $rest =~ s!/\*.*?(\*/|\n)|//.*!!g; # Remove comments + $rest =~ s/^\s+//; + $rest =~ s/\s+$//; + if ($rest eq '') { + print("Skip empty $def\n") if $opt_d; + next defines; + } + # Cannot do: (-1) and ((LHANDLE)3) are OK: + #print("Skip non-wordy $def => $rest\n"), + # next defines if $rest =~ /[^\w\$]/; + if ($rest =~ /"/) { + print("Skip stringy $def => $rest\n") if $opt_d; + next defines; + } + print "Matched $_ ($def)\n" if $opt_d; + $seen_define{$def} = $rest; + $_ = $def; + next if /^_.*_h_*$/i; # special case, but for what? + if (defined $opt_p) { + if (!/^$opt_p(\d)/) { + ++$prefix{$_} if s/^$opt_p//; + } + else { + warn "can't remove $opt_p prefix from '$_'!\n"; + } + } + $prefixless{$def} = $_; + if (!$fmask or /$fmask/) { + print "... Passes mask of -M.\n" if $opt_d and $fmask; + $const_names{$_}++; + } + } + } + if (defined $opt_e and !$opt_e) { + close(CH); + } + else { + # Work from miniperl too - on "normal" systems + my $SEEK_SET = eval 'use Fcntl qw/SEEK_SET/; SEEK_SET' || 0; + seek CH, 0, $SEEK_SET; + my $src = do { local $/; }; + close CH; + no warnings 'uninitialized'; + + # Remove C and C++ comments + $src =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs; + $src =~ s#//.*$##gm; + + while ($src =~ /\benum\s*([\w_]*)\s*\{\s([^}]+)\}/gsc) { + my ($enum_name, $enum_body) = ($1, $2); + # skip enums matching $opt_e + next if $opt_e && $enum_name =~ /$opt_e/; + my $val = 0; + for my $item (split /,/, $enum_body) { + next if $item =~ /\A\s*\Z/; + my ($key, $declared_val) = $item =~ /(\w+)\s*(?:=\s*(.*))?/; + $val = defined($declared_val) && length($declared_val) ? $declared_val : 1 + $val; + $seen_define{$key} = $val; + $const_names{$key} = { name => $key, macro => 1 }; + } + } # while (...) + } # if (!defined $opt_e or $opt_e) + } + } +} + +# Save current directory so that C::Scan can use it +my $cwd = File::Spec->rel2abs( File::Spec->curdir ); + +# As Ilya suggested, use a name that contains - and then it can't clash with +# the names of any packages. A directory 'fallback' will clash with any +# new pragmata down the fallback:: tree, but that seems unlikely. +my $constscfname = 'const-c.inc'; +my $constsxsfname = 'const-xs.inc'; +my $fallbackdirname = 'fallback'; + +my $ext = chdir 'ext' ? 'ext/' : ''; + +my @modparts = split(/::/,$module); +my $modpname = join('-', @modparts); +my $modfname = pop @modparts; +my $modpmdir = join '/', 'lib', @modparts; +my $modpmname = join '/', $modpmdir, $modfname.'.pm'; + +if ($opt_O) { + warn "Overwriting existing $ext$modpname!!!\n" if -e $modpname; +} +else { + die "Won't overwrite existing $ext$modpname\n" if -e $modpname; +} +-d "$modpname" || mkpath([$modpname], 0, 0775); +chdir($modpname) || die "Can't chdir $ext$modpname: $!\n"; + +my %types_seen; +my %std_types; +my $fdecls = []; +my $fdecls_parsed = []; +my $typedef_rex; +my %typedefs_pre; +my %known_fnames; +my %structs; + +my @fnames; +my @fnames_no_prefix; +my %vdecl_hash; +my @vdecls; + +if( ! $opt_X ){ # use XS, unless it was disabled + unless ($skip_ppport) { + require Devel::PPPort; + warn "Writing $ext$modpname/ppport.h\n"; + Devel::PPPort::WriteFile('ppport.h') + || die "Can't create $ext$modpname/ppport.h: $!\n"; + } + open(XS, ">$modfname.xs") || die "Can't create $ext$modpname/$modfname.xs: $!\n"; + if ($opt_x) { + warn "Scanning typemaps...\n"; + get_typemap(); + my @td; + my @good_td; + my $addflags = $opt_F || ''; + + foreach my $filename (@path_h) { + my $c; + my $filter; + + if ($fullpath{$filename} =~ /,/) { + $filename = $`; + $filter = $'; + } + warn "Scanning $filename for functions...\n"; + my @styles = $Config{gccversion} ? qw(C++ C9X GNU) : qw(C++ C9X); + $c = C::Scan->new('filename' => $filename, 'filename_filter' => $filter, + 'add_cppflags' => $addflags, 'c_styles' => \@styles); + $c->set('includeDirs' => ["$Config::Config{archlib}/CORE", $cwd]); + + $c->get('keywords')->{'__restrict'} = 1; + + push @$fdecls_parsed, @{ $c->get('parsed_fdecls') }; + push(@$fdecls, @{$c->get('fdecls')}); + + push @td, @{$c->get('typedefs_maybe')}; + if ($opt_a) { + my $structs = $c->get('typedef_structs'); + @structs{keys %$structs} = values %$structs; + } + + if ($opt_m) { + %vdecl_hash = %{ $c->get('vdecl_hash') }; + @vdecls = sort keys %vdecl_hash; + for (local $_ = 0; $_ < @vdecls; ++$_) { + my $var = $vdecls[$_]; + my($type, $post) = @{ $vdecl_hash{$var} }; + if (defined $post) { + warn "Can't handle variable '$type $var $post', skipping.\n"; + splice @vdecls, $_, 1; + redo; + } + $type = normalize_type($type); + $vdecl_hash{$var} = $type; + } + } + + unless ($tmask_all) { + warn "Scanning $filename for typedefs...\n"; + my $td = $c->get('typedef_hash'); + # eval {require 'dumpvar.pl'; ::dumpValue($td)} or warn $@ if $opt_d; + my @f_good_td = grep $td->{$_}[1] eq '', keys %$td; + push @good_td, @f_good_td; + @typedefs_pre{@f_good_td} = map $_->[0], @$td{@f_good_td}; + } + } + { local $" = '|'; + $typedef_rex = qr(\b(?[$i][1] =~ /$fmask/; # [1] is NAME + push @good, $i; + print "... Function $fdecls_parsed->[$i][1] passes -M mask.\n" + if $opt_d; + } + $fdecls = [@$fdecls[@good]]; + $fdecls_parsed = [@$fdecls_parsed[@good]]; + } + @fnames = sort map $_->[1], @$fdecls_parsed; # 1 is NAME + # Sort declarations: + { + my %h = map( ($_->[1], $_), @$fdecls_parsed); + $fdecls_parsed = [ @h{@fnames} ]; + } + @fnames_no_prefix = @fnames; + @fnames_no_prefix + = sort map { ++$prefix{$_} if s/^$opt_p(?!\d)//; $_ } @fnames_no_prefix + if defined $opt_p; + # Remove macros which expand to typedefs + print "Typedefs are @td.\n" if $opt_d; + my %td = map {($_, $_)} @td; + # Add some other possible but meaningless values for macros + for my $k (qw(char double float int long short unsigned signed void)) { + $td{"$_$k"} = "$_$k" for ('', 'signed ', 'unsigned '); + } + # eval {require 'dumpvar.pl'; ::dumpValue( [\@td, \%td] ); 1} or warn $@; + my $n = 0; + my %bad_macs; + while (keys %td > $n) { + $n = keys %td; + my ($k, $v); + while (($k, $v) = each %seen_define) { + # print("found '$k'=>'$v'\n"), + $bad_macs{$k} = $td{$k} = $td{$v} if exists $td{$v}; + } + } + # Now %bad_macs contains names of bad macros + for my $k (keys %bad_macs) { + delete $const_names{$prefixless{$k}}; + print "Ignoring macro $k which expands to a typedef name '$bad_macs{$k}'\n" if $opt_d; + } + } +} +my (@const_specs, @const_names); + +for (sort(keys(%const_names))) { + my $v = $const_names{$_}; + + push(@const_specs, ref($v) ? $v : $_); + push(@const_names, $_); +} + +-d $modpmdir || mkpath([$modpmdir], 0, 0775); +open(PM, ">$modpmname") || die "Can't create $ext$modpname/$modpmname: $!\n"; + +$" = "\n\t"; +warn "Writing $ext$modpname/$modpmname\n"; + +print PM <<"END"; +package $module; + +use $compat_version; +END + +print PM <<"END" unless $skip_strict; +use strict; +END + +print PM "use warnings;\n" unless $skip_warnings or $compat_version < 5.006; + +unless( $opt_X || $opt_c || $opt_A ){ + # we'll have an AUTOLOAD(), and it will have $AUTOLOAD and + # will want Carp. + print PM <<'END'; +use Carp; +END +} + +print PM <<'END' unless $skip_exporter; + +require Exporter; +END + +my $use_Dyna = (not $opt_X and $compat_version < 5.006 and not $use_xsloader); +print PM <<"END" if $use_Dyna; # use DynaLoader, unless XS was disabled +require DynaLoader; +END + + +# Are we using AutoLoader or not? +unless ($skip_autoloader) { # no autoloader whatsoever. + unless ($opt_c) { # we're doing the AUTOLOAD + print PM "use AutoLoader;\n"; + } + else { + print PM "use AutoLoader qw(AUTOLOAD);\n" + } +} + +if ( $compat_version < 5.006 ) { + my $vars = '$VERSION @ISA'; + $vars .= ' @EXPORT @EXPORT_OK %EXPORT_TAGS' unless $skip_exporter; + $vars .= ' $AUTOLOAD' unless $opt_X || $opt_c || $opt_A; + $vars .= ' $XS_VERSION' if $opt_B && !$opt_X; + print PM "use vars qw($vars);"; +} + +# Determine @ISA. +my @modISA; +push @modISA, 'Exporter' unless $skip_exporter; +push @modISA, 'DynaLoader' if $use_Dyna; # no XS +my $myISA = "our \@ISA = qw(@modISA);"; +$myISA =~ s/^our // if $compat_version < 5.006; + +print PM "\n$myISA\n\n"; + +my @exported_names = (@const_names, @fnames_no_prefix, map '$'.$_, @vdecls); + +my $tmp=''; +$tmp .= <<"END" unless $skip_exporter; +# Items to export into callers namespace by default. Note: do not export +# names by default without a very good reason. Use EXPORT_OK instead. +# Do not simply export all your public functions/methods/constants. + +# This allows declaration use $module ':all'; +# If you do not need this, moving things directly into \@EXPORT or \@EXPORT_OK +# will save memory. +our %EXPORT_TAGS = ( 'all' => [ qw( + @exported_names +) ] ); + +our \@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } ); + +our \@EXPORT = qw( + @const_names +); + +END + +$tmp .= "our \$VERSION = '$TEMPLATE_VERSION';\n"; +if ($opt_B) { + $tmp .= "our \$XS_VERSION = \$VERSION;\n" unless $opt_X; + $tmp .= "\$VERSION = eval \$VERSION; # see L\n"; +} +$tmp .= "\n"; + +$tmp =~ s/^our //mg if $compat_version < 5.006; +print PM $tmp; + +if (@vdecls) { + printf PM "our(@{[ join ', ', map '$'.$_, @vdecls ]});\n\n"; +} + + +print PM autoload ($module, $compat_version) unless $opt_c or $opt_X; + +if( ! $opt_X ){ # print bootstrap, unless XS is disabled + if ($use_Dyna) { + $tmp = <<"END"; +bootstrap $module \$VERSION; +END + } else { + $tmp = <<"END"; +require XSLoader; +XSLoader::load('$module', \$VERSION); +END + } + $tmp =~ s:\$VERSION:\$XS_VERSION:g if $opt_B; + print PM $tmp; +} + +# tying the variables can happen only after bootstrap +if (@vdecls) { + printf PM <))[0,6]; + if (defined $username && defined $author) { + $author =~ s/,.*$//; # in case of sub fields + my $domain = $Config{'mydomain'}; + $domain =~ s/^\.//; + $email = "$username\@$domain"; + } + }; + +$author =~ s/'/\\'/g if defined $author; +$author ||= "A. U. Thor"; +$email ||= 'a.u.thor@a.galaxy.far.far.away'; + +$licence = sprintf << "DEFAULT", $^V; +Copyright (C) ${\(1900 + (localtime) [5])} by $author + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version %vd or, +at your option, any later version of Perl 5 you may have available. +DEFAULT + +my $revhist = ''; +$revhist = < should be removed. +# +#EOD + $exp_doc .= <${email}E +# +#=head1 COPYRIGHT AND LICENSE +# +$licence_hash +# +#=cut +END + +$pod =~ s/^\#//gm unless $opt_P; +print PM $pod unless $opt_P; + +close PM; + + +if( ! $opt_X ){ # print XS, unless it is disabled +warn "Writing $ext$modpname/$modfname.xs\n"; + +print XS <<"END"; +#define PERL_NO_GET_CONTEXT +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +END + +print XS <<"END" unless $skip_ppport; +#include "ppport.h" + +END + +if( @path_h ){ + foreach my $path_h (@path_h_ini) { + my($h) = $path_h; + $h =~ s#^/usr/include/##; + if ($^O eq 'VMS') { $h =~ s#.*vms\]#sys/# or $h =~ s#.*[:>\]]##; } + print XS qq{#include <$h>\n}; + } + print XS "\n"; +} + +print XS <<"END" if $opt_g; + +/* Global Data */ + +#define MY_CXT_KEY "${module}::_guts" XS_VERSION + +typedef struct { + /* Put Global Data in here */ + int dummy; /* you can access this elsewhere as MY_CXT.dummy */ +} my_cxt_t; + +START_MY_CXT + +END + +my %pointer_typedefs; +my %struct_typedefs; + +sub td_is_pointer { + my $type = shift; + my $out = $pointer_typedefs{$type}; + return $out if defined $out; + my $otype = $type; + $out = ($type =~ /\*$/); + # This converts only the guys which do not have trailing part in the typedef + if (not $out + and $typedef_rex and $type =~ s/($typedef_rex)/$typedefs_pre{$1}/go) { + $type = normalize_type($type); + print "Is-Pointer: Type mutation via typedefs: $otype ==> $type\n" + if $opt_d; + $out = td_is_pointer($type); + } + return ($pointer_typedefs{$otype} = $out); +} + +sub td_is_struct { + my $type = shift; + my $out = $struct_typedefs{$type}; + return $out if defined $out; + my $otype = $type; + $out = ($type =~ /^(struct|union)\b/) && !td_is_pointer($type); + # This converts only the guys which do not have trailing part in the typedef + if (not $out + and $typedef_rex and $type =~ s/($typedef_rex)/$typedefs_pre{$1}/go) { + $type = normalize_type($type); + print "Is-Struct: Type mutation via typedefs: $otype ==> $type\n" + if $opt_d; + $out = td_is_struct($type); + } + return ($struct_typedefs{$otype} = $out); +} + +print_tievar_subs(\*XS, $_, $vdecl_hash{$_}) for @vdecls; + +if( ! $opt_c ) { + # We write the "sample" files used when this module is built by perl without + # ExtUtils::Constant. + # h2xs will later check that these are the same as those generated by the + # code embedded into Makefile.PL + unless (-d $fallbackdirname) { + mkdir "$fallbackdirname" or die "Cannot mkdir $fallbackdirname: $!\n"; + } + warn "Writing $ext$modpname/$fallbackdirname/$constscfname\n"; + warn "Writing $ext$modpname/$fallbackdirname/$constsxsfname\n"; + my $cfallback = File::Spec->catfile($fallbackdirname, $constscfname); + my $xsfallback = File::Spec->catfile($fallbackdirname, $constsxsfname); + WriteConstants ( C_FILE => $cfallback, + XS_FILE => $xsfallback, + DEFAULT_TYPE => $opt_t, + NAME => $module, + NAMES => \@const_specs, + ); + print XS "#include \"$constscfname\"\n"; +} + + +my $prefix = defined $opt_p ? "PREFIX = $opt_p" : ''; + +# Now switch from C to XS by issuing the first MODULE declaration: +print XS <<"END"; + +MODULE = $module PACKAGE = $module $prefix + +END + +# If a constant() function was #included then output a corresponding +# XS declaration: +print XS "INCLUDE: $constsxsfname\n" unless $opt_c; + +print XS <<"END" if $opt_g; + +BOOT: +{ + MY_CXT_INIT; + /* If any of the fields in the my_cxt_t struct need + to be initialised, do it here. + */ +} + +END + +foreach (sort keys %const_xsub) { + print XS <<"END"; +char * +$_() + + CODE: +#ifdef $_ + RETVAL = $_; +#else + croak("Your vendor has not defined the $module macro $_"); +#endif + + OUTPUT: + RETVAL + +END +} + +my %seen_decl; +my %typemap; + +sub print_decl { + my $fh = shift; + my $decl = shift; + my ($type, $name, $args) = @$decl; + return if $seen_decl{$name}++; # Need to do the same for docs as well? + + my @argnames = map {$_->[1]} @$args; + my @argtypes = map { normalize_type( $_->[0], 1 ) } @$args; + if ($opt_k) { + s/^\s*const\b\s*// for @argtypes; + } + my @argarrays = map { $_->[4] || '' } @$args; + my $numargs = @$args; + if ($numargs and $argtypes[-1] eq '...') { + $numargs--; + $argnames[-1] = '...'; + } + local $" = ', '; + $type = normalize_type($type, 1); + + print $fh <<"EOP"; + +$type +$name(@argnames) +EOP + + for my $arg (0 .. $numargs - 1) { + print $fh <<"EOP"; + $argtypes[$arg] $argnames[$arg]$argarrays[$arg] +EOP + } +} + +sub print_tievar_subs { + my($fh, $name, $type) = @_; + print $fh <[0] =~ /_ANON/) { + if (defined $item->[2]) { + push @items, map [ + @$_[0, 1], "$item->[2]_$_->[2]", "$item->[2].$_->[2]", + ], @{ $structs{$item->[0]} }; + } else { + push @items, @{ $structs{$item->[0]} }; + } + } else { + my $type = normalize_type($item->[0]); + my $ttype = $structs{$type} ? normalize_type("$type *") : $type; + print $fh <<"EOF"; +$ttype +$item->[2](THIS, __value = NO_INIT) + $ptrname THIS + $type __value + PROTOTYPE: \$;\$ + CODE: + if (items > 1) + THIS->$item->[-1] = __value; + RETVAL = @{[ + $type eq $ttype ? "THIS->$item->[-1]" : "&(THIS->$item->[-1])" + ]}; + OUTPUT: + RETVAL + +EOF + } + } +} + +sub accessor_docs { + my($name, $struct) = @_; + return unless defined $struct && $name !~ /\s|_ANON/; + $name = normalize_type($name); + my $ptrname = $name . 'Ptr'; + my @items = @$struct; + my @list; + while (@items) { + my $item = shift @items; + if ($item->[0] =~ /_ANON/) { + if (defined $item->[2]) { + push @items, map [ + @$_[0, 1], "$item->[2]_$_->[2]", "$item->[2].$_->[2]", + ], @{ $structs{$item->[0]} }; + } else { + push @items, @{ $structs{$item->[0]} }; + } + } else { + push @list, $item->[2]; + } + } + my $methods = (join '(...)>, C<', @list) . '(...)'; + + my $pod = <<"EOF"; +# +#=head2 Object and class methods for C<$name>/C<$ptrname> +# +#The principal Perl representation of a C object of type C<$name> is an +#object of class C<$ptrname> which is a reference to an integer +#representation of a C pointer. To create such an object, one may use +#a combination +# +# my \$buffer = $name->new(); +# my \$obj = \$buffer->_to_ptr(); +# +#This exercises the following two methods, and an additional class +#C<$name>, the internal representation of which is a reference to a +#packed string with the C structure. Keep in mind that \$buffer should +#better survive longer than \$obj. +# +#=over +# +#=item C<\$object_of_type_$name-E_to_ptr()> +# +#Converts an object of type C<$name> to an object of type C<$ptrname>. +# +#=item C<$name-Enew()> +# +#Creates an empty object of type C<$name>. The corresponding packed +#string is zeroed out. +# +#=item C<$methods> +# +#return the current value of the corresponding element if called +#without additional arguments. Set the element to the supplied value +#(and return the new value) if called with an additional argument. +# +#Applicable to objects of type C<$ptrname>. +# +#=back +# +EOF + $pod =~ s/^\#//gm; + return $pod; +} + +# Should be called before any actual call to normalize_type(). +sub get_typemap { + # We do not want to read ./typemap by obvios reasons. + my @tm = qw(../../../typemap ../../typemap ../typemap); + my $stdtypemap = "$Config::Config{privlib}/ExtUtils/typemap"; + unshift @tm, $stdtypemap; + my $proto_re = "[" . quotemeta('\$%&*@;') . "]" ; + + # Start with useful default values + $typemap{float} = 'T_NV'; + + foreach my $typemap (@tm) { + next unless -e $typemap ; + # skip directories, binary files etc. + warn " Scanning $typemap\n"; + warn("Warning: ignoring non-text typemap file '$typemap'\n"), next + unless -T $typemap ; + open(TYPEMAP, $typemap) + or warn ("Warning: could not open typemap file '$typemap': $!\n"), next; + my $mode = 'Typemap'; + while () { + next if /^\s*\#/; + if (/^INPUT\s*$/) { $mode = 'Input'; next; } + elsif (/^OUTPUT\s*$/) { $mode = 'Output'; next; } + elsif (/^TYPEMAP\s*$/) { $mode = 'Typemap'; next; } + elsif ($mode eq 'Typemap') { + next if /^\s*($|\#)/ ; + my ($type, $image); + if ( ($type, $image) = + /^\s*(.*?\S)\s+(\S+)\s*($proto_re*)\s*$/o + # This may reference undefined functions: + and not ($image eq 'T_PACKED' and $typemap eq $stdtypemap)) { + $typemap{normalize_type($type)} = $image; + } + } + } + close(TYPEMAP) or die "Cannot close $typemap: $!"; + } + %std_types = %types_seen; + %types_seen = (); +} + + +sub normalize_type { # Second arg: do not strip const's before \* + my $type = shift; + my $do_keep_deep_const = shift; + # If $do_keep_deep_const this is heuristic only + my $keep_deep_const = ($do_keep_deep_const ? '\b(?![^(,)]*\*)' : ''); + my $ignore_mods + = "(?:\\b(?:(?:__const__|const)$keep_deep_const|static|inline|__inline__)\\b\\s*)*"; + if ($do_keep_deep_const) { # Keep different compiled /RExen/o separately! + $type =~ s/$ignore_mods//go; + } + else { + $type =~ s/$ignore_mods//go; + } + $type =~ s/([^\s\w])/ $1 /g; + $type =~ s/\s+$//; + $type =~ s/^\s+//; + $type =~ s/\s+/ /g; + $type =~ s/\* (?=\*)/*/g; + $type =~ s/\. \. \./.../g; + $type =~ s/ ,/,/g; + $types_seen{$type}++ + unless $type eq '...' or $type eq 'void' or $std_types{$type}; + $type; +} + +my $need_opaque; + +sub assign_typemap_entry { + my $type = shift; + my $otype = $type; + my $entry; + if ($tmask and $type =~ /$tmask/) { + print "Type $type matches -o mask\n" if $opt_d; + $entry = (td_is_struct($type) ? "T_OPAQUE_STRUCT" : "T_PTROBJ"); + } + elsif ($typedef_rex and $type =~ s/($typedef_rex)/$typedefs_pre{$1}/go) { + $type = normalize_type $type; + print "Type mutation via typedefs: $otype ==> $type\n" if $opt_d; + $entry = assign_typemap_entry($type); + } + # XXX good do better if our UV happens to be long long + return "T_NV" if $type =~ /^(unsigned\s+)?long\s+(long|double)\z/; + $entry ||= $typemap{$otype} + || (td_is_struct($type) ? "T_OPAQUE_STRUCT" : "T_PTROBJ"); + $typemap{$otype} = $entry; + $need_opaque = 1 if $entry eq "T_OPAQUE_STRUCT"; + return $entry; +} + +for (@vdecls) { + print_tievar_xsubs(\*XS, $_, $vdecl_hash{$_}); +} + +if ($opt_x) { + for my $decl (@$fdecls_parsed) { print_decl(\*XS, $decl) } + if ($opt_a) { + while (my($name, $struct) = each %structs) { + print_accessors(\*XS, $name, $struct); + } + } +} + +close XS; + +if (%types_seen) { + my $type; + warn "Writing $ext$modpname/typemap\n"; + open TM, ">typemap" or die "Cannot open typemap file for write: $!"; + + for $type (sort keys %types_seen) { + my $entry = assign_typemap_entry $type; + print TM $type, "\t" x (5 - int((length $type)/8)), "\t$entry\n" + } + + print TM <<'EOP' if $need_opaque; # Older Perls do not have correct entry +############################################################################# +INPUT +T_OPAQUE_STRUCT + if (sv_derived_from($arg, \"${ntype}\")) { + STRLEN len; + char *s = SvPV((SV*)SvRV($arg), len); + + if (len != sizeof($var)) + croak(\"Size %d of packed data != expected %d\", + len, sizeof($var)); + $var = *($type *)s; + } + else + croak(\"$var is not of type ${ntype}\") +############################################################################# +OUTPUT +T_OPAQUE_STRUCT + sv_setref_pvn($arg, \"${ntype}\", (char *)&$var, sizeof($var)); +EOP + + close TM or die "Cannot close typemap file for write: $!"; +} + +} # if( ! $opt_X ) + +warn "Writing $ext$modpname/Makefile.PL\n"; +open(PL, ">Makefile.PL") || die "Can't create $ext$modpname/Makefile.PL: $!\n"; + +my $prereq_pm = ''; + +if ( $compat_version < 5.006002 and $new_test ) +{ + $prereq_pm .= q%'Test::More' => 0, %; +} +elsif ( $compat_version < 5.006002 ) +{ + $prereq_pm .= q%'Test' => 0, %; +} + +if (!$opt_X and $use_xsloader) +{ + $prereq_pm .= q%'XSLoader' => 0, %; +} + +print PL <<"END"; +use $compat_version; +use ExtUtils::MakeMaker; +# See lib/ExtUtils/MakeMaker.pm for details of how to influence +# the contents of the Makefile that is written. +WriteMakefile( + NAME => '$module', + VERSION_FROM => '$modpmname', # finds \$VERSION, requires EU::MM from perl >= 5.5 + PREREQ_PM => {$prereq_pm}, # e.g., Module::Name => 1.1 + ABSTRACT_FROM => '$modpmname', # retrieve abstract from module + AUTHOR => '$author <$email>', + #LICENSE => 'perl', + #Value must be from legacy list of licenses here + #http://search.cpan.org/perldoc?Module%3A%3ABuild%3A%3AAPI +END +if (!$opt_X) { # print C stuff, unless XS is disabled + $opt_F = '' unless defined $opt_F; + my $I = (((glob '*.h') || (glob '*.hh')) ? '-I.' : ''); + my $Ihelp = ($I ? '-I. ' : ''); + my $Icomment = ($I ? '' : < ['$extralibs'], # e.g., '-lm' + DEFINE => '$opt_F', # e.g., '-DHAVE_SOMETHING' +$Icomment INC => '$I', # e.g., '${Ihelp}-I/usr/include/other' +END + + my $C = grep {$_ ne "$modfname.c"} + (glob '*.c'), (glob '*.cc'), (glob '*.C'); + my $Cpre = ($C ? '' : '# '); + my $Ccomment = ($C ? '' : < '\$(O_FILES)', # link all the C files too +END +} # ' # Grr +print PL ");\n"; +if (!$opt_c) { + my $generate_code = + WriteMakefileSnippet ( C_FILE => $constscfname, + XS_FILE => $constsxsfname, + DEFAULT_TYPE => $opt_t, + NAME => $module, + NAMES => \@const_specs, + ); + print PL <<"END"; +if (eval {require ExtUtils::Constant; 1}) { + # If you edit these definitions to change the constants used by this module, + # you will need to use the generated $constscfname and $constsxsfname + # files to replace their "fallback" counterparts before distributing your + # changes. +$generate_code +} +else { + use File::Copy; + use File::Spec; + foreach my \$file ('$constscfname', '$constsxsfname') { + my \$fallback = File::Spec->catfile('$fallbackdirname', \$file); + copy (\$fallback, \$file) or die "Can't copy \$fallback to \$file: \$!"; + } +} +END + + eval $generate_code; + if ($@) { + warn <<"EOM"; +Attempting to test constant code in $ext$modpname/Makefile.PL: +$generate_code +__END__ +gave unexpected error $@ +Please report the circumstances of this bug in h2xs version $H2XS_VERSION +using the perlbug script. +EOM + } else { + my $fail; + + foreach my $file ($constscfname, $constsxsfname) { + my $fallback = File::Spec->catfile($fallbackdirname, $file); + if (compare($file, $fallback)) { + warn << "EOM"; +Files "$ext$modpname/$fallbackdirname/$file" and "$ext$modpname/$file" differ. +EOM + $fail++; + } + } + if ($fail) { + warn fill ('','', <<"EOM") . "\n"; +It appears that the code in $ext$modpname/Makefile.PL does not autogenerate +the files $ext$modpname/$constscfname and $ext$modpname/$constsxsfname +correctly. + +Please report the circumstances of this bug in h2xs version $H2XS_VERSION +using the perlbug script. +EOM + } else { + unlink $constscfname, $constsxsfname; + } + } +} +close(PL) || die "Can't close $ext$modpname/Makefile.PL: $!\n"; + +# Create a simple README since this is a CPAN requirement +# and it doesn't hurt to have one +warn "Writing $ext$modpname/README\n"; +open(RM, ">README") || die "Can't create $ext$modpname/README:$!\n"; +my $thisyear = (gmtime)[5] + 1900; +my $rmhead = "$modpname version $TEMPLATE_VERSION"; +my $rmheadeq = "=" x length($rmhead); + +my $rm_prereq; + +if ( $compat_version < 5.006002 and $new_test ) +{ + $rm_prereq = 'Test::More'; +} +elsif ( $compat_version < 5.006002 ) +{ + $rm_prereq = 'Test'; +} +else +{ + $rm_prereq = 'blah blah blah'; +} + +print RM <<_RMEND_; +$rmhead +$rmheadeq + +The README is used to introduce the module and provide instructions on +how to install the module, any machine dependencies it may have (for +example C compilers and installed libraries) and any other information +that should be provided before the module is installed. + +A README file is required for CPAN modules since CPAN extracts the +README file from a module distribution so that people browsing the +archive can use it get an idea of the modules uses. It is usually a +good idea to provide version information here so that people can +decide whether fixes for the module are worth downloading. + +INSTALLATION + +To install this module type the following: + + perl Makefile.PL + make + make test + make install + +DEPENDENCIES + +This module requires these other modules and libraries: + + $rm_prereq + +COPYRIGHT AND LICENCE + +Put the correct copyright and licence information here. + +$licence + +_RMEND_ +close(RM) || die "Can't close $ext$modpname/README: $!\n"; + +my $testdir = "t"; +my $testfile = "$testdir/$modpname.t"; +unless (-d "$testdir") { + mkdir "$testdir" or die "Cannot mkdir $testdir: $!\n"; +} +warn "Writing $ext$modpname/$testfile\n"; +my $tests = @const_names ? 2 : 1; + +open EX, ">$testfile" or die "Can't create $ext$modpname/$testfile: $!\n"; + +print EX <<_END_; +# Before 'make install' is performed this script should be runnable with +# 'make test'. After 'make install' it should work as 'perl $modpname.t' + +######################### + +# change 'tests => $tests' to 'tests => last_test_to_print'; + +use strict; +use warnings; + +_END_ + +my $test_mod = 'Test::More'; + +if ( $old_test or ($compat_version < 5.006002 and not $new_test )) +{ + my $test_mod = 'Test'; + + print EX <<_END_; +use Test; +BEGIN { plan tests => $tests }; +use $module; +ok(1); # If we made it this far, we're ok. + +_END_ + + if (@const_names) { + my $const_names = join " ", @const_names; + print EX <<'_END_'; + +my $fail; +foreach my $constname (qw( +_END_ + + print EX wrap ("\t", "\t", $const_names); + print EX (")) {\n"); + + print EX <<_END_; + next if (eval "my \\\$a = \$constname; 1"); + if (\$\@ =~ /^Your vendor has not defined $module macro \$constname/) { + print "# pass: \$\@"; + } else { + print "# fail: \$\@"; + \$fail = 1; + } +} +if (\$fail) { + print "not ok 2\\n"; +} else { + print "ok 2\\n"; +} + +_END_ + } +} +else +{ + print EX <<_END_; +use Test::More tests => $tests; +BEGIN { use_ok('$module') }; + +_END_ + + if (@const_names) { + my $const_names = join " ", @const_names; + print EX <<'_END_'; + +my $fail = 0; +foreach my $constname (qw( +_END_ + + print EX wrap ("\t", "\t", $const_names); + print EX (")) {\n"); + + print EX <<_END_; + next if (eval "my \\\$a = \$constname; 1"); + if (\$\@ =~ /^Your vendor has not defined $module macro \$constname/) { + print "# pass: \$\@"; + } else { + print "# fail: \$\@"; + \$fail = 1; + } + +} + +ok( \$fail == 0 , 'Constants' ); +_END_ + } +} + +print EX <<_END_; +######################### + +# Insert your test code below, the $test_mod module is use()ed here so read +# its man page ( perldoc $test_mod ) for help writing this test script. + +_END_ + +close(EX) || die "Can't close $ext$modpname/$testfile: $!\n"; + +unless ($opt_C) { + warn "Writing $ext$modpname/Changes\n"; + $" = ' '; + open(EX, ">Changes") || die "Can't create $ext$modpname/Changes: $!\n"; + @ARGS = map {/[\s\"\'\`\$*?^|&<>\[\]\{\}\(\)]/ ? "'$_'" : $_} @ARGS; + print EX <MANIFEST') or die "Can't create MANIFEST: $!"; +my @files = grep { -f } (<*>, , <$fallbackdirname/*>, <$modpmdir/*>); +if (!@files) { + eval {opendir(D,'.');}; + unless ($@) { @files = readdir(D); closedir(D); } +} +if (!@files) { @files = map {chomp && $_} `ls`; } +if ($^O eq 'VMS') { + foreach (@files) { + # Clip trailing '.' for portability -- non-VMS OSs don't expect it + s%\.$%%; + # Fix up for case-sensitive file systems + s/$modfname/$modfname/i && next; + $_ = "\U$_" if $_ eq 'manifest' or $_ eq 'changes'; + $_ = 'Makefile.PL' if $_ eq 'makefile.pl'; + } +} +print MANI join("\n",@files), "\n"; +close MANI; diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/head.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/head.exe new file mode 100644 index 00000000..93cf57d6 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/head.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hexdump.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hexdump.exe new file mode 100644 index 00000000..990839fc Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hexdump.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hostid.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hostid.exe new file mode 100644 index 00000000..d6a1f708 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hostid.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hostname.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hostname.exe new file mode 100644 index 00000000..ebb0937a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/hostname.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/id.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/id.exe new file mode 100644 index 00000000..75de1537 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/id.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/igawk b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/igawk new file mode 100644 index 00000000..70edf606 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/igawk @@ -0,0 +1,138 @@ +#! /bin/sh +# igawk --- like gawk but do @include processing +# +# Arnold Robbins, arnold@skeeve.com, Public Domain +# July 1993 +# December 2010, minor edits + +if [ "$1" = debug ] +then + set -x + shift +fi + +# A literal newline, so that program text is formatted correctly +n=' +' + +# Initialize variables to empty +program= +opts= + +while [ $# -ne 0 ] # loop over arguments +do + case $1 in + --) shift + break ;; + + -W) shift + # The ${x?'message here'} construct prints a + # diagnostic if $x is the null string + set -- -W"${@?'missing operand'}" + continue ;; + + -[vF]) opts="$opts $1 '${2?'missing operand'}'" + shift ;; + + -[vF]*) opts="$opts '$1'" ;; + + -f) program="$program$n@include ${2?'missing operand'}" + shift ;; + + -f*) f=$(expr "$1" : '-f\(.*\)') + program="$program$n@include $f" ;; + + -[W-]file=*) + f=$(expr "$1" : '-.file=\(.*\)') + program="$program$n@include $f" ;; + + -[W-]file) + program="$program$n@include ${2?'missing operand'}" + shift ;; + + -[W-]source=*) + t=$(expr "$1" : '-.source=\(.*\)') + program="$program$n$t" ;; + + -[W-]source) + program="$program$n${2?'missing operand'}" + shift ;; + + -[W-]version) + echo igawk: version 3.0 1>&2 + gawk --version + exit 0 ;; + + -[W-]*) opts="$opts '$1'" ;; + + *) break ;; + esac + shift +done + +if [ -z "$program" ] +then + program=${1?'missing program'} + shift +fi + +# At this point, `program' has the program. +expand_prog=' + +function pathto(file, i, t, junk) +{ + if (index(file, "/") != 0) + return file + + if (file == "-") + return file + + for (i = 1; i <= ndirs; i++) { + t = (pathlist[i] "/" file) + if ((getline junk < t) > 0) { + # found it + close(t) + return t + } + } + return "" +} +BEGIN { + path = ENVIRON["AWKPATH"] + ndirs = split(path, pathlist, ":") + for (i = 1; i <= ndirs; i++) { + if (pathlist[i] == "") + pathlist[i] = "." + } + stackptr = 0 + input[stackptr] = ARGV[1] # ARGV[1] is first file + + for (; stackptr >= 0; stackptr--) { + while ((getline < input[stackptr]) > 0) { + if (tolower($1) != "@include") { + print + continue + } + fpath = pathto($2) + if (fpath == "") { + printf("igawk: %s:%d: cannot find %s\n", + input[stackptr], FNR, $2) > "/dev/stderr" + continue + } + if (! (fpath in processed)) { + processed[fpath] = input[stackptr] + input[++stackptr] = fpath # push onto stack + } else + print $2, "included in", input[stackptr], + "already included in", + processed[fpath] > "/dev/stderr" + } + close(input[stackptr]) + } +}' # close quote ends `expand_prog' variable + +processed_program=$(gawk -- "$expand_prog" /dev/stdin << EOF +$program +EOF +) +eval gawk $opts -- '"$processed_program"' '"$@"' diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/infocmp.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/infocmp.exe new file mode 100644 index 00000000..e21f4594 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/infocmp.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/infotocap b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/infotocap new file mode 100644 index 00000000..465f7ff1 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/infotocap differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/install.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/install.exe new file mode 100644 index 00000000..439bc13d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/install.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/instmodsh b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/instmodsh new file mode 100644 index 00000000..8ad3af26 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/instmodsh @@ -0,0 +1,195 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!/usr/bin/perl -w + +use strict; +use IO::File; +use ExtUtils::Packlist; +use ExtUtils::Installed; + +use vars qw($Inst @Modules); + + +=head1 NAME + +instmodsh - A shell to examine installed modules + +=head1 SYNOPSIS + + instmodsh + +=head1 DESCRIPTION + +A little interface to ExtUtils::Installed to examine installed modules, +validate your packlists and even create a tarball from an installed module. + +=head1 SEE ALSO + +ExtUtils::Installed + +=cut + + +my $Module_Help = < - Create a tar archive of the module + h - Display module help + q - Quit the module +EOF + +my %Module_Commands = ( + f => \&list_installed, + d => \&list_directories, + v => \&validate_packlist, + t => \&create_archive, + h => \&module_help, + ); + +sub do_module($) { + my ($module) = @_; + + print($Module_Help); + MODULE_CMD: while (1) { + print("$module cmd? "); + + my $reply = ; chomp($reply); + my($cmd) = $reply =~ /^(\w)\b/; + + last if $cmd eq 'q'; + + if( $Module_Commands{$cmd} ) { + $Module_Commands{$cmd}->($reply, $module); + } + elsif( $cmd eq 'q' ) { + last MODULE_CMD; + } + else { + module_help(); + } + } +} + + +sub list_installed { + my($reply, $module) = @_; + + my $class = (split(' ', $reply))[1]; + $class = 'all' unless $class; + + my @files; + if (eval { @files = $Inst->files($module, $class); }) { + print("$class files in $module are:\n ", + join("\n ", @files), "\n"); + } + else { + print($@); + } +}; + + +sub list_directories { + my($reply, $module) = @_; + + my $class = (split(' ', $reply))[1]; + $class = 'all' unless $class; + + my @dirs; + if (eval { @dirs = $Inst->directories($module, $class); }) { + print("$class directories in $module are:\n ", + join("\n ", @dirs), "\n"); + } + else { + print($@); + } +} + + +sub create_archive { + my($reply, $module) = @_; + + my $file = (split(' ', $reply))[1]; + + if( !(defined $file and length $file) ) { + print "No tar file specified\n"; + } + elsif( eval { require Archive::Tar } ) { + Archive::Tar->create_archive($file, 0, $Inst->files($module)); + } + else { + my($first, @rest) = $Inst->files($module); + system('tar', 'cvf', $file, $first); + for my $f (@rest) { + system('tar', 'rvf', $file, $f); + } + print "Can't use tar\n" if $?; + } +} + + +sub validate_packlist { + my($reply, $module) = @_; + + if (my @missing = $Inst->validate($module)) { + print("Files missing from $module are:\n ", + join("\n ", @missing), "\n"); + } + else { + print("$module has no missing files\n"); + } +} + +sub module_help { + print $Module_Help; +} + + + +############################################################################## + +sub toplevel() +{ +my $help = < - Select a module + q - Quit the program +EOF +print($help); +while (1) + { + print("cmd? "); + my $reply = ; chomp($reply); + CASE: + { + $reply eq 'l' and do + { + print("Installed modules are:\n ", join("\n ", @Modules), "\n"); + last CASE; + }; + $reply =~ /^m\s+/ and do + { + do_module((split(' ', $reply))[1]); + last CASE; + }; + $reply eq 'q' and do + { + exit(0); + }; + # Default + print($help); + } + } +} + + +############################################################################### + +$Inst = ExtUtils::Installed->new(); +@Modules = $Inst->modules(); +toplevel(); + +############################################################################### diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ipcmk.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ipcmk.exe new file mode 100644 index 00000000..2753807a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ipcmk.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/isosize.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/isosize.exe new file mode 100644 index 00000000..c3bd6fa5 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/isosize.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/join.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/join.exe new file mode 100644 index 00000000..5c4a8f14 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/join.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/json_pp b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/json_pp new file mode 100644 index 00000000..9c363d53 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/json_pp @@ -0,0 +1,208 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!/usr/bin/perl + +use strict; +use Getopt::Long; + +use JSON::PP (); + +my $VERSION = '1.00'; + +# imported from JSON-XS/bin/json_xs + +my %allow_json_opt = map { $_ => 1 } qw( + ascii latin1 utf8 pretty indent space_before space_after relaxed canonical allow_nonref + allow_singlequote allow_barekey allow_bignum loose escape_slash +); + + +GetOptions( + 'v' => \( my $opt_verbose ), + 'f=s' => \( my $opt_from = 'json' ), + 't=s' => \( my $opt_to = 'json' ), + 'json_opt=s' => \( my $json_opt = 'pretty' ), + 'V' => \( my $version ), +) or die "Usage: $0 [-v] -f from_format [-t to_format]\n"; + + +if ( $version ) { + print "$VERSION\n"; + exit; +} + + +$json_opt = '' if $json_opt eq '-'; + +my @json_opt = grep { $allow_json_opt{ $_ } or die "'$_' is invalid json opttion" } split/,/, $json_opt; + +my %F = ( + 'json' => sub { + my $json = JSON::PP->new; + $json->$_() for @json_opt; + $json->decode( $_ ); + }, + 'eval' => sub { + my $v = eval "no strict;\n#line 1 \"input\"\n$_"; + die "$@" if $@; + return $v; + }, +); + + +my %T = ( + 'null' => sub { "" }, + 'json' => sub { + my $json = JSON::PP->new; + $json->$_() for @json_opt; + $json->encode( $_ ); + }, + 'dumper' => sub { + require Data::Dumper; + Data::Dumper::Dumper($_) + }, +); + + + +$F{$opt_from} + or die "$opt_from: not a valid fromformat\n"; + +$T{$opt_to} + or die "$opt_from: not a valid toformat\n"; + +local $/; +$_ = ; + +$_ = $F{$opt_from}->(); +$_ = $T{$opt_to}->(); + +print $_; + + +__END__ + +=pod + +=encoding utf8 + +=head1 NAME + +json_pp - JSON::PP command utility + +=head1 SYNOPSIS + + json_pp [-v] [-f from_format] [-t to_format] [-json_opt options_to_json] + +=head1 DESCRIPTION + +json_pp converts between some input and output formats (one of them is JSON). +This program was copied from L and modified. + +The default input format is json and the default output format is json with pretty option. + +=head1 OPTIONS + +=head2 -f + + -f from_format + +Reads a data in the given format from STDIN. + +Format types: + +=over + +=item json + +as JSON + +=item eval + +as Perl code + +=back + +=head2 -t + +Writes a data in the given format to STDOUT. + +=over + +=item null + +no action. + +=item json + +as JSON + +=item dumper + +as Data::Dumper + +=back + +=head2 -json_opt + +options to JSON::PP + +Acceptable options are: + + ascii latin1 utf8 pretty indent space_before space_after relaxed canonical allow_nonref + allow_singlequote allow_barekey allow_bignum loose escape_slash + +=head2 -v + +Verbose option, but currently no action in fact. + +=head2 -V + +Prints version and exits. + + +=head1 EXAMPLES + + $ perl -e'print q|{"foo":"あい","bar":1234567890000000000000000}|' |\ + json_pp -f json -t dumper -json_opt pretty,utf8,allow_bignum + + $VAR1 = { + 'bar' => bless( { + 'value' => [ + '0000000', + '0000000', + '5678900', + '1234' + ], + 'sign' => '+' + }, 'Math::BigInt' ), + 'foo' => "\x{3042}\x{3044}" + }; + + $ perl -e'print q|{"foo":"あい","bar":1234567890000000000000000}|' |\ + json_pp -f json -t dumper -json_opt pretty + + $VAR1 = { + 'bar' => '1234567890000000000000000', + 'foo' => "\x{e3}\x{81}\x{82}\x{e3}\x{81}\x{84}" + }; + +=head1 SEE ALSO + +L, L + +=head1 AUTHOR + +Makamaka Hannyaharamitu, Emakamaka[at]cpan.orgE + + +=head1 COPYRIGHT AND LICENSE + +Copyright 2010 by Makamaka Hannyaharamitu + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/kill.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/kill.exe new file mode 100644 index 00000000..343bd33e Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/kill.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lastlog.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lastlog.exe new file mode 100644 index 00000000..a69cbe73 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lastlog.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ld.bfd.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ld.bfd.exe new file mode 100644 index 00000000..c9f0c22b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ld.bfd.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ld.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ld.exe new file mode 100644 index 00000000..c9f0c22b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ld.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ldd.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ldd.exe new file mode 100644 index 00000000..2788c382 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ldd.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ldh.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ldh.exe new file mode 100644 index 00000000..0f343315 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ldh.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libexpat-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libexpat-1.dll new file mode 100644 index 00000000..ead838f9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libexpat-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgcc_s_dw2-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgcc_s_dw2-1.dll new file mode 100644 index 00000000..b2c6a7e9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgcc_s_dw2-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgmp-10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgmp-10.dll new file mode 100644 index 00000000..32f39738 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgmp-10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgomp-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgomp-1.dll new file mode 100644 index 00000000..0edce5e3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libgomp-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libiconv-2.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libiconv-2.dll new file mode 100644 index 00000000..049244df Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libiconv-2.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libintl-8.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libintl-8.dll new file mode 100644 index 00000000..c7e10441 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libintl-8.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libmpc-2.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libmpc-2.dll new file mode 100644 index 00000000..1924b6c8 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libmpc-2.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libmpfr-1.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libmpfr-1.dll new file mode 100644 index 00000000..85c2222e Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libmpfr-1.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libnetcfg b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libnetcfg new file mode 100644 index 00000000..c1b8cb77 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libnetcfg @@ -0,0 +1,721 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +=head1 NAME + +libnetcfg - configure libnet + +=head1 DESCRIPTION + +The libnetcfg utility can be used to configure the libnet. +Starting from perl 5.8 libnet is part of the standard Perl +distribution, but the libnetcfg can be used for any libnet +installation. + +=head1 USAGE + +Without arguments libnetcfg displays the current configuration. + + $ libnetcfg + # old config ./libnet.cfg + daytime_hosts ntp1.none.such + ftp_int_passive 0 + ftp_testhost ftp.funet.fi + inet_domain none.such + nntp_hosts nntp.none.such + ph_hosts + pop3_hosts pop.none.such + smtp_hosts smtp.none.such + snpp_hosts + test_exist 1 + test_hosts 1 + time_hosts ntp.none.such + # libnetcfg -h for help + $ + +It tells where the old configuration file was found (if found). + +The C<-h> option will show a usage message. + +To change the configuration you will need to use either the C<-c> or +the C<-d> options. + +The default name of the old configuration file is by default +"libnet.cfg", unless otherwise specified using the -i option, +C<-i oldfile>, and it is searched first from the current directory, +and then from your module path. + +The default name of the new configuration file is "libnet.cfg", and by +default it is written to the current directory, unless otherwise +specified using the -o option, C<-o newfile>. + +=head1 SEE ALSO + +L, L + +=head1 AUTHORS + +Graham Barr, the original Configure script of libnet. + +Jarkko Hietaniemi, conversion into libnetcfg for inclusion into Perl 5.8. + +=cut + +# $Id: Configure,v 1.8 1997/03/04 09:22:32 gbarr Exp $ + +use strict; +use IO::File; +use Getopt::Std; +use ExtUtils::MakeMaker qw(prompt); +use File::Spec; + +use vars qw($opt_d $opt_c $opt_h $opt_o $opt_i); + +## +## +## + +my %cfg = (); +my @cfg = (); + +my($libnet_cfg_in,$libnet_cfg_out,$msg,$ans,$def,$have_old); + +## +## +## + +sub valid_host +{ + my $h = shift; + + defined($h) && (($cfg{'test_exist'} == 0) || gethostbyname($h)); +} + +## +## +## + +sub test_hostnames (\@) +{ + my $hlist = shift; + my @h = (); + my $host; + my $err = 0; + + foreach $host (@$hlist) + { + if(valid_host($host)) + { + push(@h, $host); + next; + } + warn "Bad hostname: '$host'\n"; + $err++; + } + @$hlist = @h; + $err ? join(" ",@h) : undef; +} + +## +## +## + +sub Prompt +{ + my($prompt,$def) = @_; + + $def = "" unless defined $def; + + chomp($prompt); + + if($opt_d) + { + print $prompt,," [",$def,"]\n"; + return $def; + } + prompt($prompt,$def); +} + +## +## +## + +sub get_host_list +{ + my($prompt,$def) = @_; + + $def = join(" ",@$def) if ref($def); + + my @hosts; + + do + { + my $ans = Prompt($prompt,$def); + + $ans =~ s/(\A\s+|\s+\Z)//g; + + @hosts = split(/\s+/, $ans); + } + while(@hosts && defined($def = test_hostnames(@hosts))); + + \@hosts; +} + +## +## +## + +sub get_hostname +{ + my($prompt,$def) = @_; + + my $host; + + while(1) + { + my $ans = Prompt($prompt,$def); + $host = ($ans =~ /(\S*)/)[0]; + last + if(!length($host) || valid_host($host)); + + $def ="" + if $def eq $host; + + print <<"EDQ"; + +*** ERROR: + Hostname '$host' does not seem to exist, please enter again + or a single space to clear any default + +EDQ + } + + length $host + ? $host + : undef; +} + +## +## +## + +sub get_bool ($$) +{ + my($prompt,$def) = @_; + + chomp($prompt); + + my $val = Prompt($prompt,$def ? "yes" : "no"); + + $val =~ /^y/i ? 1 : 0; +} + +## +## +## + +sub get_netmask ($$) +{ + my($prompt,$def) = @_; + + chomp($prompt); + + my %list; + @list{@$def} = (); + +MASK: + while(1) { + my $bad = 0; + my $ans = Prompt($prompt) or last; + + if($ans eq '*') { + %list = (); + next; + } + + if($ans eq '=') { + print "\n",( %list ? join("\n", sort keys %list) : 'none'),"\n\n"; + next; + } + + unless ($ans =~ m{^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})/(\d+))}) { + warn "Bad netmask '$ans'\n"; + next; + } + + my($remove,$bits,@ip) = ($1,$3,split(/\./, $2),0,0,0); + if ( $ip[0] < 1 || $bits < 1 || $bits > 32) { + warn "Bad netmask '$ans'\n"; + next MASK; + } + foreach my $byte (@ip) { + if ( $byte > 255 ) { + warn "Bad netmask '$ans'\n"; + next MASK; + } + } + + my $mask = sprintf("%d.%d.%d.%d/%d",@ip[0..3],$bits); + + if ($remove) { + delete $list{$mask}; + } + else { + $list{$mask} = 1; + } + + } + + [ keys %list ]; +} + +## +## +## + +sub default_hostname +{ + my $host; + my @host; + + foreach $host (@_) + { + if(defined($host) && valid_host($host)) + { + return $host + unless wantarray; + push(@host,$host); + } + } + + return wantarray ? @host : undef; +} + +## +## +## + +getopts('dcho:i:'); + +$libnet_cfg_in = "libnet.cfg" + unless(defined($libnet_cfg_in = $opt_i)); + +$libnet_cfg_out = "libnet.cfg" + unless(defined($libnet_cfg_out = $opt_o)); + +my %oldcfg = (); + +$Net::Config::CONFIGURE = 1; # Suppress load of user overrides +if( -f $libnet_cfg_in ) + { + %oldcfg = ( %{ do $libnet_cfg_in } ); + } +elsif (eval { require Net::Config }) + { + $have_old = 1; + %oldcfg = %Net::Config::NetConfig; + } + +map { $cfg{lc $_} = $cfg{$_}; delete $cfg{$_} if /[A-Z]/ } keys %cfg; + +#--------------------------------------------------------------------------- + +if ($opt_h) { + print <, and it is searched first from the current directory, +and then from your module path. + +The default name of the new configuration file is "libnet.cfg", and by +default it is written to the current directory, unless otherwise +specified using the -o option. + +EOU + exit(0); +} + +#--------------------------------------------------------------------------- + +{ + my $oldcfgfile; + my @inc; + push @inc, $ENV{PERL5LIB} if exists $ENV{PERL5LIB}; + push @inc, $ENV{PERLLIB} if exists $ENV{PERLLIB}; + push @inc, @INC; + for (@inc) { + my $trycfgfile = File::Spec->catfile($_, $libnet_cfg_in); + if (-f $trycfgfile && -r $trycfgfile) { + $oldcfgfile = $trycfgfile; + last; + } + } + print "# old config $oldcfgfile\n" if defined $oldcfgfile; + for (sort keys %oldcfg) { + printf "%-20s %s\n", $_, + ref $oldcfg{$_} ? @{$oldcfg{$_}} : $oldcfg{$_}; + } + unless ($opt_c || $opt_d) { + print "# $0 -h for help\n"; + exit(0); + } +} + +#--------------------------------------------------------------------------- + +$oldcfg{'test_exist'} = 1 unless exists $oldcfg{'test_exist'}; +$oldcfg{'test_hosts'} = 1 unless exists $oldcfg{'test_hosts'}; + +#--------------------------------------------------------------------------- + +if($have_old && !$opt_d) + { + $msg = <. To accept the +default, hit + +EDQ + +$msg = 'Enter a list of available NNTP hosts :'; + +$def = $oldcfg{'nntp_hosts'} || + [ default_hostname($ENV{NNTPSERVER},$ENV{NEWSHOST},'news') ]; + +$cfg{'nntp_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = 'Enter a list of available SMTP hosts :'; + +$def = $oldcfg{'smtp_hosts'} || + [ default_hostname(split(/:/,$ENV{SMTPHOSTS} || ""), 'mailhost') ]; + +$cfg{'smtp_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = 'Enter a list of available POP3 hosts :'; + +$def = $oldcfg{'pop3_hosts'} || []; + +$cfg{'pop3_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = 'Enter a list of available SNPP hosts :'; + +$def = $oldcfg{'snpp_hosts'} || []; + +$cfg{'snpp_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = 'Enter a list of available PH Hosts :' ; + +$def = $oldcfg{'ph_hosts'} || + [ default_hostname('dirserv') ]; + +$cfg{'ph_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = 'Enter a list of available TIME Hosts :' ; + +$def = $oldcfg{'time_hosts'} || []; + +$cfg{'time_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = 'Enter a list of available DAYTIME Hosts :' ; + +$def = $oldcfg{'daytime_hosts'} || $oldcfg{'time_hosts'}; + +$cfg{'daytime_hosts'} = get_host_list($msg,$def); + +#--------------------------------------------------------------------------- + +$msg = < external user & password +fwuser/fwpass => firewall user & password + +0) None +1) ----------------------- + USER user@remote.host + PASS pass +2) ----------------------- + USER fwuser + PASS fwpass + USER user@remote.host + PASS pass +3) ----------------------- + USER fwuser + PASS fwpass + SITE remote.site + USER user + PASS pass +4) ----------------------- + USER fwuser + PASS fwpass + OPEN remote.site + USER user + PASS pass +5) ----------------------- + USER user@fwuser@remote.site + PASS pass@fwpass +6) ----------------------- + USER fwuser@remote.site + PASS fwpass + USER user + PASS pass +7) ----------------------- + USER user@remote.host + PASS pass + AUTH fwuser + RESP fwpass + +Choice: +EDQ + $def = exists $oldcfg{'ftp_firewall_type'} ? $oldcfg{'ftp_firewall_type'} : 1; + $ans = Prompt($msg,$def); + $cfg{'ftp_firewall_type'} = 0+$ans; + $def = $oldcfg{'ftp_firewall'} || $ENV{FTP_FIREWALL}; + + $cfg{'ftp_firewall'} = get_hostname("FTP proxy hostname :", $def); +} +else { + delete $cfg{'ftp_firewall'}; +} + + +#--------------------------------------------------------------------------- + +if (defined $cfg{'ftp_firewall'}) + { + print <new($libnet_cfg_out, "w") or + die "Cannot create '$libnet_cfg_out': $!"; + +print "Writing $libnet_cfg_out\n"; + +print $fh "{\n"; + +my $key; +foreach $key (keys %cfg) { + my $val = $cfg{$key}; + if(!defined($val)) { + $val = "undef"; + } + elsif(ref($val)) { + $val = '[' . join(",", + map { + my $v = "undef"; + if(defined $_) { + ($v = $_) =~ s/'/\'/sog; + $v = "'" . $v . "'"; + } + $v; + } @$val ) . ']'; + } + else { + $val =~ s/'/\'/sog; + $val = "'" . $val . "'" if $val =~ /\D/; + } + print $fh "\t'",$key,"' => ",$val,",\n"; +} + +print $fh "}\n"; + +$fh->close; + +############################################################################ +############################################################################ + +exit 0; diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libpthread-2.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libpthread-2.dll new file mode 100644 index 00000000..b5173247 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libpthread-2.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libssp-0.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libssp-0.dll new file mode 100644 index 00000000..46c5feec Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/libssp-0.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/link.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/link.exe new file mode 100644 index 00000000..f563186b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/link.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ln.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ln.exe new file mode 100644 index 00000000..2e7fa919 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ln.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/locale.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/locale.exe new file mode 100644 index 00000000..3e3db031 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/locale.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/locate.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/locate.exe new file mode 100644 index 00000000..ede7a8f3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/locate.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/logger.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/logger.exe new file mode 100644 index 00000000..f17efc36 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/logger.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/login.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/login.exe new file mode 100644 index 00000000..a8c2e1d2 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/login.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/logname.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/logname.exe new file mode 100644 index 00000000..94a8b221 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/logname.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/look.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/look.exe new file mode 100644 index 00000000..89ba7836 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/look.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ls.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ls.exe new file mode 100644 index 00000000..4f85ab95 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/ls.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzcat b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzcat new file mode 100644 index 00000000..4dc090ec Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzcat differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzcmp b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzcmp new file mode 100644 index 00000000..9bec1419 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzcmp differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzdiff b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzdiff new file mode 100644 index 00000000..9bec1419 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzdiff differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzegrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzegrep new file mode 100644 index 00000000..a7199e42 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzegrep differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzfgrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzfgrep new file mode 100644 index 00000000..a7199e42 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzfgrep differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzgrep b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzgrep new file mode 100644 index 00000000..a7199e42 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzgrep differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzless b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzless new file mode 100644 index 00000000..2ee05ad7 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzless differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzma b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzma new file mode 100644 index 00000000..4dc090ec Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzma differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmadec.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmadec.exe new file mode 100644 index 00000000..f8da47e3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmadec.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmainfo.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmainfo.exe new file mode 100644 index 00000000..5c360f72 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmainfo.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmore b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmore new file mode 100644 index 00000000..0ce8c300 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/lzmore differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/make.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/make.exe new file mode 100644 index 00000000..4089e9c9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/make.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mcookie.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mcookie.exe new file mode 100644 index 00000000..81aa137a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mcookie.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/md5sum.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/md5sum.exe new file mode 100644 index 00000000..24ea0cc0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/md5sum.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw-get.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw-get.exe new file mode 100644 index 00000000..27aced70 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw-get.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw-get.exe~ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw-get.exe~ new file mode 100644 index 00000000..8ba7b61d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw-get.exe~ differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-gcc-4.5.2.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-gcc-4.5.2.exe new file mode 100644 index 00000000..209441e9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-gcc-4.5.2.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-gcc.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-gcc.exe new file mode 100644 index 00000000..488d23e2 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-gcc.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-make.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-make.exe new file mode 100644 index 00000000..0a5ce27b Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingw32-make.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingwm10.dll b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingwm10.dll new file mode 100644 index 00000000..926fb6ca Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mingwm10.dll differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/minidumper.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/minidumper.exe new file mode 100644 index 00000000..02980fc9 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/minidumper.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mintty.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mintty.exe new file mode 100644 index 00000000..42f3ded3 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mintty.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkdir.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkdir.exe new file mode 100644 index 00000000..12174393 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkdir.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkfifo.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkfifo.exe new file mode 100644 index 00000000..9a943260 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkfifo.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkgroup.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkgroup.exe new file mode 100644 index 00000000..13fa83ef Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkgroup.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mknod.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mknod.exe new file mode 100644 index 00000000..62d3cc20 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mknod.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkpasswd.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkpasswd.exe new file mode 100644 index 00000000..95c75675 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkpasswd.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkshortcut.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkshortcut.exe new file mode 100644 index 00000000..5b39c746 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mkshortcut.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mktemp.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mktemp.exe new file mode 100644 index 00000000..e1c1e763 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mktemp.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/more.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/more.exe new file mode 100644 index 00000000..60153922 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/more.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mount.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mount.exe new file mode 100644 index 00000000..9b086646 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mount.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mv.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mv.exe new file mode 100644 index 00000000..0fb959d7 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/mv.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/namei.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/namei.exe new file mode 100644 index 00000000..bf8afcbf Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/namei.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nice.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nice.exe new file mode 100644 index 00000000..b74fd8f0 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nice.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nl.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nl.exe new file mode 100644 index 00000000..5e874539 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nl.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nm.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nm.exe new file mode 100644 index 00000000..4714cb3d Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nm.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nohup.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nohup.exe new file mode 100644 index 00000000..a82b51e5 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nohup.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nproc.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nproc.exe new file mode 100644 index 00000000..015e1cf4 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/nproc.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/numfmt.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/numfmt.exe new file mode 100644 index 00000000..86a85659 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/numfmt.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/objcopy.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/objcopy.exe new file mode 100644 index 00000000..689cc5c2 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/objcopy.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/objdump.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/objdump.exe new file mode 100644 index 00000000..c91918e4 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/objdump.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/od.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/od.exe new file mode 100644 index 00000000..01fda106 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/od.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/passwd.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/passwd.exe new file mode 100644 index 00000000..b516df4a Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/passwd.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/paste.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/paste.exe new file mode 100644 index 00000000..a62ed638 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/paste.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pathchk.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pathchk.exe new file mode 100644 index 00000000..f1618c4c Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pathchk.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/peflags.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/peflags.exe new file mode 100644 index 00000000..f45ed504 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/peflags.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/peflagsall b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/peflagsall new file mode 100644 index 00000000..62b9eabe --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/peflagsall @@ -0,0 +1,354 @@ +#!/bin/ash + +# +# Copyright (c) 2009,2011 Charles Wilson +# Based on rebaseall by Jason Tishler +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# See the COPYING file for full license information. + +# Define constants +tp1=${0%/*} +tp2=${tp1:-.} +PATH=$(cd $tp2 && pwd):/usr/bin:/bin + +ProgramName=${0##*/} +ProgramOptions='p:d:t:s:T:knvh' +DefaultExtraArgs= +DefaultTSAware=1 +DefaultDynBase=0 +DefaultKeep= +DefaultDoNothing= +DefaultVerbose= +DefaultFileList= +DefaultSuffixes='exe|dll|so|oct' + +# Define functions +usage_string="usage: $ProgramName [-p extra_args] [-d bool] [-t bool] [-s suffix] [-T FileList | -] [-vnh]" +short_usage () +{ + echo "$usage_string" 1>&2 + exit 1 +} + +long_help () +{ + echo "$usage_string" + echo "When invoked with no arguments, $ProgramName modifies every cygwin $DefaultSuffixes" + echo "on the system: .exe files have their tsaware flag set, while .dll, .so and .oct" + echo "files have their dynamicbase flag removed. However, if any of [-d|-t|-s] are" + echo "specified then ONLY the actions so specified will occur." + echo " -p extra_args pass extra_args to peflags.exe" + echo " -d bool set the dynamicbase flag to 'bool' on all specified files" + echo " -t bool set the tsaware flag to 'bool' on all specified files" + echo " -s suffix search for all files with the specified suffix(es)" + echo " default: 'exe|dll|so|oct'" + echo " -T FileList in addition to files located via the normal search and" + echo " suffix list, also operate on files listed in FileList" + echo " May be '-' which indicates stdin" + echo " -n do not modify any files, but display the peflags commands" + echo " -k keep all temporary files" + echo " -v verbose mode" + echo " -h show this help" + echo "bool may be '0', '1', 'true', 'false', 'yes', or 'no'" + echo "Note: peflagsall will NOT set the dynamicbase flag on executables, nor will" + echo " it set the tsaware flag on dlls. If you must do this, use peflags itself" + exit 0 +} + +check_args_for_help() +{ + # we do this early, so that we can print help before + # the process-check. + for a in "$@" + do + case "$a" in + "--help"|"-help"|"-h") long_help ;; + esac + done +} + +to_bool_result= +to_bool() +{ + case "$1" in + [Tt][Rr][Uu][Ee] ) to_bool_result=1;; + [Ff][Aa][Ll][Ss][Ee] ) to_bool_result=0;; + [Yy][Ee][Ss] ) to_bool_result=1;; + [Nn][Oo] ) to_bool_result=0;; + [Yy] ) to_bool_result=1;; + [Nn] ) to_bool_result=0;; + 1|0 ) to_bool_result=$1;; + *) echo "Bad bool argument '$1'" 1>&2 + short_usage + exit 1 + esac +} + +cleanup() +{ + if test -z "$Keep" + then + rm -f "$TmpFile" "$ExeFile" "$DllFile" + else + echo "Saving temp files '$TmpDir/peflags_*' (may not exist)" 1>&2 + fi + exit $ExitCode +} + +verbose_only() +{ + if test -n "$Verbose" + then + echo "$@" 1>&2 + fi +} + +# Set traps +trap cleanup 1 2 15 + +# Set defaults +ExtraArgs=$DefaultExtraArgs +TSAware=$DefaultTSAware +DynBase=$DefaultDynBase +Keep=$DefaultKeep +DoNothing=$DefaultDoNothing +Verbose=$DefaultVerbose +FileList=$DefaultFileList +Suffixes=$DefaultSuffixes + +# Argument accumulators +ArgSuffixes= +ArgTSAware= +ArgDynBase= + +# First see if caller requested help +check_args_for_help "$@" + +# Determine platform +Platform=`uname -s` +case $Platform in + *MINGW* | *mingw* ) Platform=mingw ;; + *CYGWIN* | *cygwin* ) Platform=cygwin ;; + *MSYS* | *msys* ) Platform=msys ;; + * ) + echo "Unsupported platform: $Platform" 1>&2 + exit 1 + ;; +esac + +# Verify only ash or dash processes are running +ProcessResult=0 +case $Platform in + mingw|msys ) + /bin/ps -s | /bin/gawk '\ + # Count number of running ash or dash. \ + /\/bin\/(d)?ash(\.exe)?$/{ ash_cnt++; } \ + # Count number of ps and gawk. \ + /\/bin\/ps(\.exe)?$/{ cnt++; } \ + /\/bin\/gawk(\.exe)?$/{ cnt++; } \ + END{ \ + # Uncomment for testing: \ + # printf "TOTAL: %d CNT: %d ASH_CNT: %d\n", NR, cnt, ash_cnt; \ + # Only one of ps and gawk each may run. \ + if (cnt > 2) \ + exit 0; \ + # The total number of allowed processes is one less than the \ + # number of input lines. The extra line is the ps header output. \ + if (NR - cnt - ash_cnt > 1) \ + exit 0; \ + # All is well. \ + exit 1; \ + }' + ProcessResult=$? + ;; + cygwin ) + grep -E -q -i -v '/d?ash(.exe)?$' /proc/[0-9]*/exename + ProcessResult=$? + ;; +esac +if [ $ProcessResult -eq 0 -a -z "$RebaseDebug" ] +then + echo "$ProgramName: only ash or dash processes are allowed during this process." + echo " Exit all Cygwin processes and stop all Cygwin services." + echo " Execute ash (or dash) from Start/Run... or a cmd or command window." + echo " Execute '/bin/peflagsall' from ash (or dash)." + exit 2 +fi + +# Parse command line arguments +while getopts $ProgramOptions Option "$@" +do + case $Option in + p) ExtraArgs="$OPTARG";; + d) to_bool "$OPTARG"; ArgDynBase=$to_bool_result;; + t) to_bool "$OPTARG"; ArgTSAware=$to_bool_result;; + s) + if test -z "$ArgSuffixes" + then + ArgSuffixes="$OPTARG" + else + ArgSuffixes="$ArgSuffixes|$OPTARG" + fi + ;; + n) DoNothing=:;; + k) Keep=1;; + T) FileList="$OPTARG";; + v) Verbose=-v;; + h) long_help;; + \?) short_usage;; + esac +done + +# Evaluate command line arguments +if test -n "$ArgSuffixes" || test -n "$ArgDynBase" || test -n "$ArgTSAware" +then + echo "Using custom arguments; all default behavior suppressed" 1>&2 + Suffixes="$ArgSuffixes" + DynBase="$ArgDynBase" + TSAware="$ArgTSAware" +fi +if test -z "$Suffixes" +then + echo "Error: must specify suffixes (-s) when default behavior is suppressed" 1>&2 + short_usage +fi + + +# Set temp directory +TmpDir="${TMP:-${TEMP:-/tmp}}" + +# Validate temp directory +if [ ! -d "$TmpDir" ] +then + echo "$ProgramName: '$TmpDir' is not a directory" 1>&2 + exit 2 +fi +if [ ! -w "$TmpDir" ] +then + echo "$ProgramName: '$TmpDir' is not writable" 1>&2 + exit 2 +fi + +# Validate user supplied file list, if necessary +if [ -n "$FileList" -a ! -r "$FileList" -a "$FileList" != - ] +then + echo "$ProgramName: '$FileList' is not readable" 1>&2 + exit 2 +fi + +# Set temp files +TmpFile="$TmpDir/peflags.lst" +ExeFile="$TmpDir/peflags_exe.lst" +DllFile="$TmpDir/peflags_dll.lst" + +# Create file list +case $Platform in + cygwin) + find /etc/setup -name '*.lst.gz' | xargs gzip -d -c | + grep -E "\.($Suffixes)\$" | + sed -e '/cygwin1\.dll$/d' -e '/cyglsa.*\.dll$/d' \ + -e '/sys-root\/mingw/d' -e 's/^/\//' \ + -e '/d?ash\.exe$/d' -e '/peflags\.exe$/d' >"${TmpFile}" + ;; + msys) + for f in /bin /lib + do + find $f -type f | + grep -E "\.($Suffixes)\$" | + sed -e '/msys-1\.0.*\.dll$/d' -e '/cygwin1\.dll$/d' \ + -e '/cyglsa.*\.dll$/d' -e '/d?ash\.exe$/d' \ + -e '/peflags\.exe$/d' >>"$TmpFile" + done + ;; + mingw) ;; # no automatic files; only command line +esac + +# Append user supplied file list, if any +if [ -n "$FileList" ] +then + cat "$FileList" >>"$TmpFile" +fi + +# Split file list into two groups: exe's, and everything else +# (presumably, DLLs by any name). +sed -n -e '/\.[Ee][Xx][Ee]$/p' < "$TmpFile" > "$ExeFile" +sed -e '/\.[Ee][Xx][Ee]$/d' < "$TmpFile" > "$DllFile" +NumExes=`cat "$ExeFile" | sed -n '$='` +NumDlls=`cat "$DllFile" | sed -n '$='` + +# Prepare to do exes +DoExes= +TSAwareCmd="--tsaware=$TSAware" +if test -n "$NumExes" && test "$NumExes" -gt 0 +then + if test -n "$TSAware" || test -n "$ExtraArgs" + then + DoExes=1 + if test -z "$TSAware" + then + TSAwareCmd= + fi + else + verbose_only "Not processing $NumExes executables; neither -t nor -p specified" + fi +else + verbose_only "No executable files to process" +fi + +# Prepare to do dlls +DoDlls= +DynBaseCmd="--dynamicbase=$DynBase" +if test -n "$NumDlls" && test "$NumDlls" -gt 0 +then + if test -n "$DynBase" || test -n "$ExtraArgs" + then + DoDlls=1 + if test -z "$DynBase" + then + DynBaseCmd= + fi + else + verbose_only "Not processing $NumDlls dlls; neither -d nor -p specified" + fi +else + verbose_only "No dlls to process" +fi + +if test -n "$DoExes" +then + if test -n "$DoNothing" || test -n "$Verbose" + then + echo "peflags $Verbose $ExtraArgs $TSAwareCmd -T $ExeFile" 1>&2 + fi + $DoNothing peflags $Verbose $ExtraArgs $TSAwareCmd -T "$ExeFile" +fi +ExitCode=$? + +if test "$ExitCode" -eq 0 + then + if test -n "$DoDlls" ; then + if test -n "$DoNothing" || test -n "$Verbose" + then + echo "peflags $Verbose $ExtraArgs $DynBaseCmd -T $DllFile" 1>&2 + fi + $DoNothing peflags $Verbose $ExtraArgs $DynBaseCmd -T "$DllFile" + fi + ExitCode=$? +fi + +# Clean up +cleanup + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perl.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perl.exe new file mode 100644 index 00000000..84b09bd1 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perl.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perl5.22.2.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perl5.22.2.exe new file mode 100644 index 00000000..84b09bd1 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perl5.22.2.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlbug b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlbug new file mode 100644 index 00000000..086e7e79 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlbug @@ -0,0 +1,1514 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +my $config_tag1 = '5.22.2 - Sat Apr 30 15:59:30 CEST 2016'; + +my $patchlevel_date = 1460309636; +my @patches = Config::local_patches(); +my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches; + +use warnings; +use strict; +use Config; +use File::Spec; # keep perlbug Perl 5.005 compatible +use Getopt::Std; +use File::Basename 'basename'; + +sub paraprint; + +BEGIN { + eval { require Mail::Send;}; + $::HaveSend = ($@ eq ""); + eval { require Mail::Util; } ; + $::HaveUtil = ($@ eq ""); + # use secure tempfiles wherever possible + eval { require File::Temp; }; + $::HaveTemp = ($@ eq ""); + eval { require Module::CoreList; }; + $::HaveCoreList = ($@ eq ""); +}; + +my $Version = "1.40"; + +#TODO: +# make sure failure (transmission-wise) of Mail::Send is accounted for. +# (This may work now. Unsure of the original author's issue -JESSE 2008-06-08) +# - Test -b option + +my( $file, $usefile, $cc, $address, $bugaddress, $testaddress, $thanksaddress, + $filename, $messageid, $domain, $subject, $from, $verbose, $ed, $outfile, + $fh, $me, $body, $andcc, %REP, $ok, $thanks, $progname, + $Is_MSWin32, $Is_Linux, $Is_VMS, $Is_OpenBSD, + $report_about_module, $category, $severity, + %opt, $have_attachment, $attachments, $has_patch, $mime_boundary +); + +my $perl_version = $^V ? sprintf("%vd", $^V) : $]; + +my $config_tag2 = "$perl_version - $Config{cf_time}"; + +Init(); + +if ($opt{h}) { Help(); exit; } +if ($opt{d}) { Dump(*STDOUT); exit; } +if (!-t STDIN && !($ok and not $opt{n})) { + paraprint <<"EOF"; +Please use $progname interactively. If you want to +include a file, you can use the -f switch. +EOF + die "\n"; +} + +Query(); +Edit() unless $usefile || ($ok and not $opt{n}); +NowWhat(); +if ($outfile) { + save_message_to_disk($outfile); +} else { + Send(); + if ($thanks) { + print "\nThank you for taking the time to send a thank-you message!\n\n"; + + paraprint < { + 'default' => 'core', + 'ok' => 'install', + # Inevitably some of these will end up in RT whatever we do: + 'thanks' => 'thanks', + 'opts' => [qw(core docs install library utilities)], # patch, notabug + }, + 'severity' => { + 'default' => 'low', + 'ok' => 'none', + 'thanks' => 'none', + 'opts' => [qw(critical high medium low wishlist none)], # zero + }, + ); + die "Invalid alternative ($name) requested\n" unless grep(/^$name$/, keys %alts); + my $alt = ""; + my $what = $ok || $thanks; + if ($what) { + $alt = $alts{$name}{$what}; + } else { + my @alts = @{$alts{$name}{'opts'}}; + print "\n\n"; + paraprint < 5) { + die "Invalid $name: aborting.\n"; + } + $alt = _prompt('', "\u$name", $alts{$name}{'default'}); + $alt ||= $alts{$name}{'default'}; + } while !((($alt) = grep(/^$alt/i, @alts))); + } + lc $alt; +} + +sub Init { + # -------- Setup -------- + + $Is_MSWin32 = $^O eq 'MSWin32'; + $Is_VMS = $^O eq 'VMS'; + $Is_Linux = lc($^O) eq 'linux'; + $Is_OpenBSD = lc($^O) eq 'openbsd'; + + if (!getopts("Adhva:s:b:f:F:r:e:SCc:to:n:T:p:", \%opt)) { Help(); exit; }; + + # This comment is needed to notify metaconfig that we are + # using the $perladmin, $cf_by, and $cf_time definitions. + + # -------- Configuration --------- + + # perlbug address + $bugaddress = 'perlbug@perl.org'; + + # Test address + $testaddress = 'perlbug-test@perl.org'; + + # Thanks address + $thanksaddress = 'perl-thanks@perl.org'; + + if (basename ($0) =~ /^perlthanks/i) { + # invoked as perlthanks + $opt{T} = 1; + $opt{C} = 1; # don't send a copy to the local admin + } + + if ($opt{T}) { + $thanks = 'thanks'; + } + + $progname = $thanks ? 'perlthanks' : 'perlbug'; + # Target address + $address = $opt{a} || ($opt{t} ? $testaddress + : $thanks ? $thanksaddress : $bugaddress); + + # Users address, used in message and in From and Reply-To headers + $from = $opt{r} || ""; + + # Include verbose configuration information + $verbose = $opt{v} || 0; + + # Subject of bug-report message + $subject = $opt{s} || ""; + + # Send a file + $usefile = ($opt{f} || 0); + + # File to send as report + $file = $opt{f} || ""; + + # We have one or more attachments + $have_attachment = ($opt{p} || 0); + $mime_boundary = ('-' x 12) . "$Version.perlbug" if $have_attachment; + + # Comma-separated list of attachments + $attachments = $opt{p} || ""; + $has_patch = 0; # TBD based on file type + + for my $attachment (split /\s*,\s*/, $attachments) { + unless (-f $attachment && -r $attachment) { + die "The attachment $attachment is not a readable file: $!\n"; + } + $has_patch = 1 if $attachment =~ m/\.(patch|diff)$/; + } + + # File to output to + $outfile = $opt{F} || ""; + + # Body of report + $body = $opt{b} || ""; + + # Editor + $ed = $opt{e} || $ENV{VISUAL} || $ENV{EDITOR} || $ENV{EDIT} + || ($Is_VMS && "edit/tpu") + || ($Is_MSWin32 && "notepad") + || "vi"; + + # Not OK - provide build failure template by finessing OK report + if ($opt{n}) { + if (substr($opt{n}, 0, 2) eq 'ok' ) { + $opt{o} = substr($opt{n}, 1); + } else { + Help(); + exit(); + } + } + + # OK - send "OK" report for build on this system + $ok = ''; + if ($opt{o}) { + if ($opt{o} eq 'k' or $opt{o} eq 'kay') { + my $age = time - $patchlevel_date; + if ($opt{o} eq 'k' and $age > 60 * 24 * 60 * 60 ) { + my $date = localtime $patchlevel_date; + print <<"EOF"; +"perlbug -ok" and "perlbug -nok" do not report on Perl versions which +are more than 60 days old. This Perl version was constructed on +$date. If you really want to report this, use +"perlbug -okay" or "perlbug -nokay". +EOF + exit(); + } + # force these options + unless ($opt{n}) { + $opt{S} = 1; # don't prompt for send + $opt{b} = 1; # we have a body + $body = "Perl reported to build OK on this system.\n"; + } + $opt{C} = 1; # don't send a copy to the local admin + $opt{s} = 1; # we have a subject line + $subject = ($opt{n} ? 'Not ' : '') + . "OK: perl $perl_version ${patch_tags}on" + ." $::Config{'archname'} $::Config{'osvers'} $subject"; + $ok = 'ok'; + } else { + Help(); + exit(); + } + } + + # Possible administrator addresses, in order of confidence + # (Note that cf_email is not mentioned to metaconfig, since + # we don't really want it. We'll just take it if we have to.) + # + # This has to be after the $ok stuff above because of the way + # that $opt{C} is forced. + $cc = $opt{C} ? "" : ( + $opt{c} || $::Config{'perladmin'} + || $::Config{'cf_email'} || $::Config{'cf_by'} + ); + + if ($::HaveUtil) { + $domain = Mail::Util::maildomain(); + } elsif ($Is_MSWin32) { + $domain = $ENV{'USERDOMAIN'}; + } else { + require Sys::Hostname; + $domain = Sys::Hostname::hostname(); + } + + # Message-Id - rjsf + $messageid = "<$::Config{'version'}_${$}_".time."\@$domain>"; + + # My username + $me = $Is_MSWin32 ? $ENV{'USERNAME'} + : $^O eq 'os2' ? $ENV{'USER'} || $ENV{'LOGNAME'} + : eval { getpwuid($<) }; # May be missing + + $from = $::Config{'cf_email'} + if !$from && $::Config{'cf_email'} && $::Config{'cf_by'} && $me && + ($me eq $::Config{'cf_by'}); +} # sub Init + +sub Query { + # Explain what perlbug is + unless ($ok) { + if ($thanks) { + paraprint <<'EOF'; +This program provides an easy way to send a thank-you message back to the +authors and maintainers of perl. + +If you wish to submit a bug report, please run it without the -T flag +(or run the program perlbug rather than perlthanks) +EOF + } else { + paraprint <<"EOF"; +This program provides an easy way to create a message reporting a +bug in the core perl distribution (along with tests or patches) +to the volunteers who maintain perl at $address. To send a thank-you +note to $thanksaddress instead of a bug report, please run 'perlthanks'. + +Please do not use $0 to send test messages, test whether perl +works, or to report bugs in perl modules from CPAN. + +Suggestions for how to find help using Perl can be found at +http://perldoc.perl.org/perlcommunity.html +EOF + } + } + + # Prompt for subject of message, if needed + + if ($subject && TrivialSubject($subject)) { + $subject = ''; + } + + unless ($subject) { + print +"First of all, please provide a subject for the message.\n"; + if ( not $thanks) { + paraprint <first_release($entry); + if ($entry and not $first_release) { + paraprint <:raw', $filename) or die "Unable to create report file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + + my $reptype = !$ok ? ($thanks ? 'thank-you' : 'bug') + : $opt{n} ? "build failure" : "success"; + + print REP <) { + print REP $_ + } + close(F) or die "Error closing '$file': $!"; + } else { + if ($thanks) { + print REP <<'EOF'; + +----------------------------------------------------------------- +[Please enter your thank-you message here] + + + +[You're welcome to delete anything below this line] +----------------------------------------------------------------- +EOF + } else { + print REP <<'EOF'; + +----------------------------------------------------------------- +[Please describe your issue here] + + + +[Please do not change anything below this line] +----------------------------------------------------------------- +EOF + } + } + Dump(*REP); + close(REP) or die "Error closing report file: $!"; + + # Set up an initial report fingerprint so we can compare it later + _fingerprint_lines_in_report(); + +} # sub Query + +sub Dump { + local(*OUT) = @_; + + # these won't have been set if run with -d + $category ||= 'core'; + $severity ||= 'low'; + + print OUT <etry dit + next; + } elsif ( $action =~ /^[cq]/i ) { # ancel, uit + Cancel(); # cancel exits + } + } + # Ok. the user did what they needed to; + return; + + } +} + + +sub Cancel { + 1 while unlink($filename); # remove all versions under VMS + print "\nQuitting without sending your message.\n"; + exit(0); +} + +sub NowWhat { + # Report is done, prompt for further action + if( !$opt{S} ) { + while(1) { + my $menu = <ile/ve + if ( SaveMessage() ) { exit } + } elsif ($action =~ /^(d|l|sh)/i ) { # isplay, ist, ow + # Display the message + open(REP, '<:raw', $filename) or die "Couldn't open file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while () { print $_ } + close(REP) or die "Error closing report file '$filename': $!"; + if ($have_attachment) { + print "\n\n---\nAttachment(s):\n"; + for my $att (split /\s*,\s*/, $attachments) { print " $att\n"; } + } + } elsif ($action =~ /^su/i) { # bject + my $reply = _prompt( "Subject: $subject", "If the above subject is fine, press Enter. Otherwise, type a replacement now\nSubject"); + if ($reply ne '') { + unless (TrivialSubject($reply)) { + $subject = $reply; + print "Subject: $subject\n"; + } + } + } elsif ($action =~ /^se/i) { # end + # Send the message + my $reply = _prompt( "Are you certain you want to send this message?", 'Please type "yes" if you are','no'); + if ($reply =~ /^yes$/) { + last; + } else { + paraprint <dit, e-edit + # edit the message + Edit(); + } elsif ($action =~ /^[qc]/i) { # ancel, uit + Cancel(); + } elsif ($action =~ /^s/i) { + paraprint < 1); + close($fh); + return $filename; + } else { + # Bah. Fall back to doing things less securely. + my $dir = File::Spec->tmpdir(); + $filename = "bugrep0$$"; + $filename++ while -e File::Spec->catfile($dir, $filename); + $filename = File::Spec->catfile($dir, $filename); + } +} + +sub paraprint { + my @paragraphs = split /\n{2,}/, "@_"; + for (@paragraphs) { # implicit local $_ + s/(\S)\s*\n/$1 /g; + write; + print "\n"; + } +} + +sub _prompt { + my ($explanation, $prompt, $default) = (@_); + if ($explanation) { + print "\n\n"; + paraprint $explanation; + } + print $prompt. ($default ? " [$default]" :''). ": "; + my $result = scalar(<>); + chomp($result); + $result =~ s/^\s*(.*?)\s*$/$1/s; + if ($default && $result eq '') { + return $default; + } else { + return $result; + } +} + +sub _build_header { + my %attr = (@_); + + my $head = ''; + for my $header (keys %attr) { + $head .= "$header: ".$attr{$header}."\n"; + } + return $head; +} + +sub _message_headers { + my %headers = ( To => $address, Subject => $subject ); + $headers{'Cc'} = $cc if ($cc); + $headers{'Message-Id'} = $messageid if ($messageid); + $headers{'Reply-To'} = $from if ($from); + $headers{'From'} = $from if ($from); + if ($have_attachment) { + $headers{'MIME-Version'} = '1.0'; + $headers{'Content-Type'} = qq{multipart/mixed; boundary=\"$mime_boundary\"}; + } + return \%headers; +} + +sub _add_body_start { + my $body_start = <<"BODY_START"; +This is a multi-part message in MIME format. +--$mime_boundary +Content-Type: text/plain; format=fixed +Content-Transfer-Encoding: 8bit + +BODY_START + return $body_start; +} + +sub _add_attachments { + my $attach = ''; + for my $attachment (split /\s*,\s*/, $attachments) { + my $attach_file = basename($attachment); + $attach .= <<"ATTACHMENT"; + +--$mime_boundary +Content-Type: text/x-patch; name="$attach_file" +Content-Transfer-Encoding: 8bit +Content-Disposition: attachment; filename="$attach_file" + +ATTACHMENT + + open my $attach_fh, '<:raw', $attachment + or die "Couldn't open attachment '$attachment': $!\n"; + while (<$attach_fh>) { $attach .= $_; } + close($attach_fh) or die "Error closing attachment '$attachment': $!"; + } + + $attach .= "\n--$mime_boundary--\n"; + return $attach; +} + +sub build_complete_message { + my $content = _build_header(%{_message_headers()}) . "\n\n"; + $content .= _add_body_start() if $have_attachment; + open( REP, "<:raw", $filename ) or die "Couldn't open file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while () { $content .= $_; } + close(REP) or die "Error closing report file '$filename': $!"; + $content .= _add_attachments() if $have_attachment; + return $content; +} + +sub save_message_to_disk { + my $file = shift; + + open OUTFILE, '>:raw', $file or do { warn "Couldn't open '$file': $!\n"; return undef}; + binmode(OUTFILE, ':raw :crlf') if $Is_MSWin32; + + print OUTFILE build_complete_message(); + close(OUTFILE) or do { warn "Error closing $file: $!"; return undef }; + print "\nMessage saved.\n"; + return 1; +} + +sub _send_message_vms { + + my $mail_from = $from; + my $rcpt_to_to = $address; + my $rcpt_to_cc = $cc; + + map { $_ =~ s/^[^<]*[^>]*//; } ($mail_from, $rcpt_to_to, $rcpt_to_cc); + + if ( open my $sff_fh, '|-:raw', 'MCR TCPIP$SYSTEM:TCPIP$SMTP_SFF.EXE SYS$INPUT:' ) { + print $sff_fh "MAIL FROM:<$mail_from>\n"; + print $sff_fh "RCPT TO:<$rcpt_to_to>\n"; + print $sff_fh "RCPT TO:<$rcpt_to_cc>\n" if $rcpt_to_cc; + print $sff_fh "DATA\n"; + print $sff_fh build_complete_message(); + my $success = close $sff_fh; + if ($success ) { + print "\nMessage sent\n"; + return; + } + } + die "Mail transport failed (leaving bug report in $filename): $^E\n"; +} + +sub _send_message_mailsend { + my $msg = Mail::Send->new(); + my %headers = %{_message_headers()}; + for my $key ( keys %headers) { + $msg->add($key => $headers{$key}); + } + + $fh = $msg->open; + binmode($fh, ':raw'); + print $fh _add_body_start() if $have_attachment; + open(REP, "<:raw", $filename) or die "Couldn't open '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while () { print $fh $_ } + close(REP) or die "Error closing $filename: $!"; + print $fh _add_attachments() if $have_attachment; + $fh->close or die "Error sending mail: $!"; + + print "\nMessage sent.\n"; +} + +sub _probe_for_sendmail { + my $sendmail = ""; + for (qw(/usr/lib/sendmail /usr/sbin/sendmail /usr/ucblib/sendmail)) { + $sendmail = $_, last if -e $_; + } + if ( $^O eq 'os2' and $sendmail eq "" ) { + my $path = $ENV{PATH}; + $path =~ s:\\:/:; + my @path = split /$Config{'path_sep'}/, $path; + for (@path) { + $sendmail = "$_/sendmail", last if -e "$_/sendmail"; + $sendmail = "$_/sendmail.exe", last if -e "$_/sendmail.exe"; + } + } + return $sendmail; +} + +sub _send_message_sendmail { + my $sendmail = _probe_for_sendmail(); + unless ($sendmail) { + my $message_start = !$Is_Linux && !$Is_OpenBSD ? <<'EOT' : <<'EOT'; +It appears that there is no program which looks like "sendmail" on +your system and that the Mail::Send library from CPAN isn't available. +EOT +It appears that there is no program which looks like "sendmail" on +your system. +EOT + paraprint(<<"EOF"), die "\n"; +$message_start +Because of this, there's no easy way to automatically send your +message. + +A copy of your message has been saved in '$filename' for you to +send to '$address' with your normal mail client. +EOF + } + + open( SENDMAIL, "|-:raw", $sendmail, "-t", "-oi", "-f", $from ) + || die "'|$sendmail -t -oi -f $from' failed: $!"; + print SENDMAIL build_complete_message(); + if ( close(SENDMAIL) ) { + print "\nMessage sent\n"; + } else { + warn "\nSendmail returned status '", $? >> 8, "'\n"; + } +} + + + +# a strange way to check whether any significant editing +# has been done: check whether any new non-empty lines +# have been added. + +sub _fingerprint_lines_in_report { + my $new_lines = 0; + # read in the report template once so that + # we can track whether the user does any editing. + # yes, *all* whitespace is ignored. + + open(REP, '<:raw', $filename) or die "Unable to open report file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while (my $line = ) { + $line =~ s/\s+//g; + $new_lines++ if (!$REP{$line}); + + } + close(REP) or die "Error closing report file '$filename': $!"; + # returns the number of lines with content that wasn't there when last we looked + return $new_lines; +} + + + +format STDOUT = +^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~ +$_ +. + +__END__ + +=head1 NAME + +perlbug - how to submit bug reports on Perl + +=head1 SYNOPSIS + +B + +B S<[ B<-v> ]> S<[ B<-a> I
]> S<[ B<-s> I ]> +S<[ B<-b> I | B<-f> I ]> S<[ B<-F> I ]> +S<[ B<-r> I ]> +S<[ B<-e> I ]> S<[ B<-c> I | B<-C> ]> +S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-A> ]> S<[ B<-h> ]> S<[ B<-T> ]> + +B S<[ B<-v> ]> S<[ B<-r> I ]> + S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]> + +B + +=head1 DESCRIPTION + + +This program is designed to help you generate and send bug reports +(and thank-you notes) about perl5 and the modules which ship with it. + +In most cases, you can just run it interactively from a command +line without any special arguments and follow the prompts. + +If you have found a bug with a non-standard port (one that was not +part of the I), a binary distribution, or a +non-core module (such as Tk, DBI, etc), then please see the +documentation that came with that distribution to determine the +correct place to report bugs. + +If you are unable to send your report using B (most likely +because your system doesn't have a way to send mail that perlbug +recognizes), you may be able to use this tool to compose your report +and save it to a file which you can then send to B +using your regular mail client. + +In extreme cases, B may not work well enough on your system +to guide you through composing a bug report. In those cases, you +may be able to use B to get system configuration +information to include in a manually composed bug report to +B. + + +When reporting a bug, please run through this checklist: + +=over 4 + +=item What version of Perl you are running? + +Type C at the command line to find out. + +=item Are you running the latest released version of perl? + +Look at http://www.perl.org/ to find out. If you are not using the +latest released version, please try to replicate your bug on the +latest stable release. + +Note that reports about bugs in old versions of Perl, especially +those which indicate you haven't also tested the current stable +release of Perl, are likely to receive less attention from the +volunteers who build and maintain Perl than reports about bugs in +the current release. + +This tool isn't appropriate for reporting bugs in any version +prior to Perl 5.0. + +=item Are you sure what you have is a bug? + +A significant number of the bug reports we get turn out to be +documented features in Perl. Make sure the issue you've run into +isn't intentional by glancing through the documentation that comes +with the Perl distribution. + +Given the sheer volume of Perl documentation, this isn't a trivial +undertaking, but if you can point to documentation that suggests +the behaviour you're seeing is I, your issue is likely to +receive more attention. You may want to start with B +L for pointers to common traps that new (and experienced) +Perl programmers run into. + +If you're unsure of the meaning of an error message you've run +across, B L for an explanation. If the message +isn't in perldiag, it probably isn't generated by Perl. You may +have luck consulting your operating system documentation instead. + +If you are on a non-UNIX platform B L, as some +features may be unimplemented or work differently. + +You may be able to figure out what's going wrong using the Perl +debugger. For information about how to use the debugger B +L. + +=item Do you have a proper test case? + +The easier it is to reproduce your bug, the more likely it will be +fixed -- if nobody can duplicate your problem, it probably won't be +addressed. + +A good test case has most of these attributes: short, simple code; +few dependencies on external commands, modules, or libraries; no +platform-dependent code (unless it's a platform-specific bug); +clear, simple documentation. + +A good test case is almost always a good candidate to be included in +Perl's test suite. If you have the time, consider writing your test case so +that it can be easily included into the standard test suite. + +=item Have you included all relevant information? + +Be sure to include the B error messages, if any. +"Perl gave an error" is not an exact error message. + +If you get a core dump (or equivalent), you may use a debugger +(B, B, etc) to produce a stack trace to include in the bug +report. + +NOTE: unless your Perl has been compiled with debug info +(often B<-g>), the stack trace is likely to be somewhat hard to use +because it will most probably contain only the function names and not +their arguments. If possible, recompile your Perl with debug info and +reproduce the crash and the stack trace. + +=item Can you describe the bug in plain English? + +The easier it is to understand a reproducible bug, the more likely +it will be fixed. Any insight you can provide into the problem +will help a great deal. In other words, try to analyze the problem +(to the extent you can) and report your discoveries. + +=item Can you fix the bug yourself? + +If so, that's great news; bug reports with patches are likely to +receive significantly more attention and interest than those without +patches. Please attach your patch to the report using the C<-p> option. +When sending a patch, create it using C if possible, +though a unified diff created with C will do nearly as well. + +Your patch may be returned with requests for changes, or requests for more +detailed explanations about your fix. + +Here are a few hints for creating high-quality patches: + +Make sure the patch is not reversed (the first argument to diff is +typically the original file, the second argument your changed file). +Make sure you test your patch by applying it with C or the +C program before you send it on its way. Try to follow the +same style as the code you are trying to patch. Make sure your patch +really does work (C, if the thing you're patching is covered +by Perl's test suite). + +=item Can you use C to submit the report? + +B will, amongst other things, ensure your report includes +crucial information about your version of perl. If C is +unable to mail your report after you have typed it in, you may have +to compose the message yourself, add the output produced by C and email it to B. If, for some reason, you +cannot run C at all on your system, be sure to include the +entire output produced by running C (note the uppercase V). + +Whether you use C or send the email manually, please make +your Subject line informative. "a bug" is not informative. Neither +is "perl crashes" nor is "HELP!!!". These don't help. A compact +description of what's wrong is fine. + +=item Can you use C to submit a thank-you note? + +Yes, you can do this by either using the C<-T> option, or by invoking +the program as C. Thank-you notes are good. It makes people +smile. + +=back + +Having done your bit, please be prepared to wait, to be told the +bug is in your code, or possibly to get no reply at all. The +volunteers who maintain Perl are busy folks, so if your problem is +an obvious bug in your own code, is difficult to understand or is +a duplicate of an existing report, you may not receive a personal +reply. + +If it is important to you that your bug be fixed, do monitor the +perl5-porters@perl.org mailing list (mailing lists are moderated, your +message may take a while to show up) and the commit logs to development +versions of Perl, and encourage the maintainers with kind words or +offers of frosty beverages. (Please do be kind to the maintainers. +Harassing or flaming them is likely to have the opposite effect of the +one you want.) + +Feel free to update the ticket about your bug on http://rt.perl.org +if a new version of Perl is released and your bug is still present. + +=head1 OPTIONS + +=over 8 + +=item B<-a> + +Address to send the report to. Defaults to B. + +=item B<-A> + +Don't send a bug received acknowledgement to the reply address. +Generally it is only a sensible to use this option if you are a +perl maintainer actively watching perl porters for your message to +arrive. + +=item B<-b> + +Body of the report. If not included on the command line, or +in a file with B<-f>, you will get a chance to edit the message. + +=item B<-C> + +Don't send copy to administrator. + +=item B<-c> + +Address to send copy of report to. Defaults to the address of the +local perl administrator (recorded when perl was built). + +=item B<-d> + +Data mode (the default if you redirect or pipe output). This prints out +your configuration data, without mailing anything. You can use this +with B<-v> to get more complete data. + +=item B<-e> + +Editor to use. + +=item B<-f> + +File containing the body of the report. Use this to quickly send a +prepared message. + +=item B<-F> + +File to output the results to instead of sending as an email. Useful +particularly when running perlbug on a machine with no direct internet +connection. + +=item B<-h> + +Prints a brief summary of the options. + +=item B<-ok> + +Report successful build on this system to perl porters. Forces B<-S> +and B<-C>. Forces and supplies values for B<-s> and B<-b>. Only +prompts for a return address if it cannot guess it (for use with +B). Honors return address specified with B<-r>. You can use this +with B<-v> to get more complete data. Only makes a report if this +system is less than 60 days old. + +=item B<-okay> + +As B<-ok> except it will report on older systems. + +=item B<-nok> + +Report unsuccessful build on this system. Forces B<-C>. Forces and +supplies a value for B<-s>, then requires you to edit the report +and say what went wrong. Alternatively, a prepared report may be +supplied using B<-f>. Only prompts for a return address if it +cannot guess it (for use with B). Honors return address +specified with B<-r>. You can use this with B<-v> to get more +complete data. Only makes a report if this system is less than 60 +days old. + +=item B<-nokay> + +As B<-nok> except it will report on older systems. + +=item B<-p> + +The names of one or more patch files or other text attachments to be +included with the report. Multiple files must be separated with commas. + +=item B<-r> + +Your return address. The program will ask you to confirm its default +if you don't use this option. + +=item B<-S> + +Send without asking for confirmation. + +=item B<-s> + +Subject to include with the message. You will be prompted if you don't +supply one on the command line. + +=item B<-t> + +Test mode. The target address defaults to B. + +=item B<-T> + +Send a thank-you note instead of a bug report. + +=item B<-v> + +Include verbose configuration data in the report. + +=back + +=head1 AUTHORS + +Kenneth Albanowski (Ekjahds@kjahds.comE), subsequently +Itored by Gurusamy Sarathy (Egsar@activestate.comE), +Tom Christiansen (Etchrist@perl.comE), Nathan Torkington +(Egnat@frii.comE), Charles F. Randall (Ecfr@pobox.comE), +Mike Guy (Emjtg@cam.ac.ukE), Dominic Dunlop +(Edomo@computer.orgE), Hugo van der Sanden (Ehv@crypt.orgE), +Jarkko Hietaniemi (Ejhi@iki.fiE), Chris Nandor +(Epudge@pobox.comE), Jon Orwant (Eorwant@media.mit.eduE, +Richard Foley (Erichard.foley@rfi.netE), Jesse Vincent +(Ejesse@bestpractical.comE), and Craig A. Berry (Ecraigberry@mac.comE). + +=head1 SEE ALSO + +perl(1), perldebug(1), perldiag(1), perlport(1), perltrap(1), +diff(1), patch(1), dbx(1), gdb(1) + +=head1 BUGS + +None known (guess what must have been used to report them?) + +=cut + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perldoc b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perldoc new file mode 100644 index 00000000..6a9d1619 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perldoc @@ -0,0 +1,11 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if 0; + +# This "perldoc" file was generated by "perldoc.PL" + +require 5; +BEGIN { $^W = 1 if $ENV{'PERLDOCDEBUG'} } +use Pod::Perldoc; +exit( Pod::Perldoc->run() ); + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlivp b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlivp new file mode 100644 index 00000000..a7094326 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlivp @@ -0,0 +1,390 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +# perlivp v5.22.2 + +sub usage { + warn "@_\n" if @_; + print << " EOUSAGE"; +Usage: + + $0 [-p] [-v] | [-h] + + -p Print a preface before each test telling what it will test. + -v Verbose mode in which extra information about test results + is printed. Test failures always print out some extra information + regardless of whether or not this switch is set. + -h Prints this help message. + EOUSAGE + exit; +} + +use vars qw(%opt); # allow testing with older versions (do not use our) + +@opt{ qw/? H h P p V v/ } = qw(0 0 0 0 0 0 0); + +while ($ARGV[0] =~ /^-/) { + $ARGV[0] =~ s/^-//; + for my $flag (split(//,$ARGV[0])) { + usage() if '?' =~ /\Q$flag/; + usage() if 'h' =~ /\Q$flag/; + usage() if 'H' =~ /\Q$flag/; + usage("unknown flag: '$flag'") unless 'HhPpVv' =~ /\Q$flag/; + warn "$0: '$flag' flag already set\n" if $opt{$flag}++; + } + shift; +} + +$opt{p}++ if $opt{P}; +$opt{v}++ if $opt{V}; + +my $pass__total = 0; +my $error_total = 0; +my $tests_total = 0; + +my $perlpath = '/usr/bin/perl'; +my $useithreads = 'define'; + +print "## Checking Perl binary via variable '\$perlpath' = $perlpath.\n" if $opt{'p'}; + +my $label = 'Executable perl binary'; + +if (-x $perlpath) { + print "## Perl binary '$perlpath' appears executable.\n" if $opt{'v'}; + print "ok 1 $label\n"; + $pass__total++; +} +else { + print "# Perl binary '$perlpath' does not appear executable.\n"; + print "not ok 1 $label\n"; + $error_total++; +} +$tests_total++; + + +print "## Checking Perl version via variable '\$]'.\n" if $opt{'p'}; + +my $ivp_VERSION = "5.022002"; + + +$label = 'Perl version correct'; +if ($ivp_VERSION eq $]) { + print "## Perl version '$]' appears installed as expected.\n" if $opt{'v'}; + print "ok 2 $label\n"; + $pass__total++; +} +else { + print "# Perl version '$]' installed, expected $ivp_VERSION.\n"; + print "not ok 2 $label\n"; + $error_total++; +} +$tests_total++; + +# We have the right perl and version, so now reset @INC so we ignore +# PERL5LIB and '.' +{ + local $ENV{PERL5LIB}; + my $perl_V = qx($perlpath -V); + $perl_V =~ s{.*\@INC:\n}{}ms; + @INC = grep { length && $_ ne '.' } split ' ', $perl_V; +} + +print "## Checking roots of the Perl library directory tree via variable '\@INC'.\n" if $opt{'p'}; + +my $INC_total = 0; +my $INC_there = 0; +foreach (@INC) { + next if $_ eq '.'; # skip -d test here + if (-d $_) { + print "## Perl \@INC directory '$_' exists.\n" if $opt{'v'}; + $INC_there++; + } + else { + print "# Perl \@INC directory '$_' does not appear to exist.\n"; + } + $INC_total++; +} + +$label = '@INC directoreis exist'; +if ($INC_total == $INC_there) { + print "ok 3 $label\n"; + $pass__total++; +} +else { + print "not ok 3 $label\n"; + $error_total++; +} +$tests_total++; + + +print "## Checking installations of modules necessary for ivp.\n" if $opt{'p'}; + +my $needed_total = 0; +my $needed_there = 0; +foreach (qw(Config.pm ExtUtils/Installed.pm)) { + $@ = undef; + $needed_total++; + eval "require \"$_\";"; + if (!$@) { + print "## Module '$_' appears to be installed.\n" if $opt{'v'}; + $needed_there++; + } + else { + print "# Needed module '$_' does not appear to be properly installed.\n"; + } + $@ = undef; +} +$label = 'Modules needed for rest of perlivp exist'; +if ($needed_total == $needed_there) { + print "ok 4 $label\n"; + $pass__total++; +} +else { + print "not ok 4 $label\n"; + $error_total++; +} +$tests_total++; + + +print "## Checking installations of extensions built with perl.\n" if $opt{'p'}; + +use Config; + +my $extensions_total = 0; +my $extensions_there = 0; +if (defined($Config{'extensions'})) { + my @extensions = split(/\s+/,$Config{'extensions'}); + foreach (@extensions) { + next if ($_ eq ''); + if ( $useithreads !~ /define/i ) { + next if ($_ eq 'threads'); + next if ($_ eq 'threads/shared'); + } + # that's a distribution name, not a module name + next if $_ eq 'IO/Compress'; + next if $_ eq 'Devel/DProf'; + next if $_ eq 'libnet'; + next if $_ eq 'Locale/Codes'; + next if $_ eq 'podlators'; + next if $_ eq 'perlfaq'; + # test modules + next if $_ eq 'XS/APItest'; + next if $_ eq 'XS/Typemap'; + # VMS$ perl -e "eval ""require \""Devel/DProf.pm\"";"" print $@" + # \NT> perl -e "eval \"require 'Devel/DProf.pm'\"; print $@" + # DProf: run perl with -d to use DProf. + # Compilation failed in require at (eval 1) line 1. + eval " require \"$_.pm\"; "; + if (!$@) { + print "## Module '$_' appears to be installed.\n" if $opt{'v'}; + $extensions_there++; + } + else { + print "# Required module '$_' does not appear to be properly installed.\n"; + $@ = undef; + } + $extensions_total++; + } + + # A silly name for a module (that hopefully won't ever exist). + # Note that this test serves more as a check of the validity of the + # actual required module tests above. + my $unnecessary = 'bLuRfle'; + + if (!grep(/$unnecessary/, @extensions)) { + $@ = undef; + eval " require \"$unnecessary.pm\"; "; + if ($@) { + print "## Unnecessary module '$unnecessary' does not appear to be installed.\n" if $opt{'v'}; + } + else { + print "# Unnecessary module '$unnecessary' appears to be installed.\n"; + $extensions_there++; + } + } + $@ = undef; +} +$label = 'All (and only) expected extensions installed'; +if ($extensions_total == $extensions_there) { + print "ok 5 $label\n"; + $pass__total++; +} +else { + print "not ok 5 $label\n"; + $error_total++; +} +$tests_total++; + + +print "## Checking installations of later additional extensions.\n" if $opt{'p'}; + +use ExtUtils::Installed; + +my $installed_total = 0; +my $installed_there = 0; +my $version_check = 0; +my $installed = ExtUtils::Installed -> new(); +my @modules = $installed -> modules(); +my @missing = (); +my $version = undef; +for (@modules) { + $installed_total++; + # Consider it there if it contains one or more files, + # and has zero missing files, + # and has a defined version + $version = undef; + $version = $installed -> version($_); + if ($version) { + print "## $_; $version\n" if $opt{'v'}; + $version_check++; + } + else { + print "# $_; NO VERSION\n" if $opt{'v'}; + } + $version = undef; + @missing = (); + @missing = $installed -> validate($_); + + # .bs files are optional + @missing = grep { ! /\.bs$/ } @missing; + # man files are often compressed + @missing = grep { ! ( -s "$_.gz" || -s "$_.bz2" ) } @missing; + + if ($#missing >= 0) { + print "# file",+($#missing == 0) ? '' : 's'," missing from installation:\n"; + print '# ',join(' ',@missing),"\n"; + } + elsif ($#missing == -1) { + $installed_there++; + } + @missing = (); +} +$label = 'Module files correctly installed'; +if (($installed_total == $installed_there) && + ($installed_total == $version_check)) { + print "ok 6 $label\n"; + $pass__total++; +} +else { + print "not ok 6 $label\n"; + $error_total++; +} +$tests_total++; + +# Final report (rather than feed ousrselves to Test::Harness::runtests() +# we simply format some output on our own to keep things simple and +# easier to "fix" - at least for now. + +if ($error_total == 0 && $tests_total) { + print "All tests successful.\n"; +} elsif ($tests_total==0){ + die "FAILED--no tests were run for some reason.\n"; +} else { + my $rate = 0.0; + if ($tests_total > 0) { $rate = sprintf "%.2f", 100.0 * ($pass__total / $tests_total); } + printf " %d/%d subtests failed, %.2f%% okay.\n", + $error_total, $tests_total, $rate; +} + +=head1 NAME + +perlivp - Perl Installation Verification Procedure + +=head1 SYNOPSIS + +B [B<-p>] [B<-v>] [B<-h>] + +=head1 DESCRIPTION + +The B program is set up at Perl source code build time to test the +Perl version it was built under. It can be used after running: + + make install + +(or your platform's equivalent procedure) to verify that B and its +libraries have been installed correctly. A correct installation is verified +by output that looks like: + + ok 1 + ok 2 + +etc. + +=head1 OPTIONS + +=over 5 + +=item B<-h> help + +Prints out a brief help message. + +=item B<-p> print preface + +Gives a description of each test prior to performing it. + +=item B<-v> verbose + +Gives more detailed information about each test, after it has been performed. +Note that any failed tests ought to print out some extra information whether +or not -v is thrown. + +=back + +=head1 DIAGNOSTICS + +=over 4 + +=item * print "# Perl binary '$perlpath' does not appear executable.\n"; + +Likely to occur for a perl binary that was not properly installed. +Correct by conducting a proper installation. + +=item * print "# Perl version '$]' installed, expected $ivp_VERSION.\n"; + +Likely to occur for a perl that was not properly installed. +Correct by conducting a proper installation. + +=item * print "# Perl \@INC directory '$_' does not appear to exist.\n"; + +Likely to occur for a perl library tree that was not properly installed. +Correct by conducting a proper installation. + +=item * print "# Needed module '$_' does not appear to be properly installed.\n"; + +One of the two modules that is used by perlivp was not present in the +installation. This is a serious error since it adversely affects perlivp's +ability to function. You may be able to correct this by performing a +proper perl installation. + +=item * print "# Required module '$_' does not appear to be properly installed.\n"; + +An attempt to C failed, even though the list of +extensions indicated that it should succeed. Correct by conducting a proper +installation. + +=item * print "# Unnecessary module 'bLuRfle' appears to be installed.\n"; + +This test not coming out ok could indicate that you have in fact installed +a bLuRfle.pm module or that the C +test may give misleading results with your installation of perl. If yours +is the latter case then please let the author know. + +=item * print "# file",+($#missing == 0) ? '' : 's'," missing from installation:\n"; + +One or more files turned up missing according to a run of +C validate()> over your installation. +Correct by conducting a proper installation. + +=back + +For further information on how to conduct a proper installation consult the +INSTALL file that comes with the perl source and the README file for your +platform. + +=head1 AUTHOR + +Peter Prymmer + +=cut + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlthanks b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlthanks new file mode 100644 index 00000000..086e7e79 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/perlthanks @@ -0,0 +1,1514 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +my $config_tag1 = '5.22.2 - Sat Apr 30 15:59:30 CEST 2016'; + +my $patchlevel_date = 1460309636; +my @patches = Config::local_patches(); +my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches; + +use warnings; +use strict; +use Config; +use File::Spec; # keep perlbug Perl 5.005 compatible +use Getopt::Std; +use File::Basename 'basename'; + +sub paraprint; + +BEGIN { + eval { require Mail::Send;}; + $::HaveSend = ($@ eq ""); + eval { require Mail::Util; } ; + $::HaveUtil = ($@ eq ""); + # use secure tempfiles wherever possible + eval { require File::Temp; }; + $::HaveTemp = ($@ eq ""); + eval { require Module::CoreList; }; + $::HaveCoreList = ($@ eq ""); +}; + +my $Version = "1.40"; + +#TODO: +# make sure failure (transmission-wise) of Mail::Send is accounted for. +# (This may work now. Unsure of the original author's issue -JESSE 2008-06-08) +# - Test -b option + +my( $file, $usefile, $cc, $address, $bugaddress, $testaddress, $thanksaddress, + $filename, $messageid, $domain, $subject, $from, $verbose, $ed, $outfile, + $fh, $me, $body, $andcc, %REP, $ok, $thanks, $progname, + $Is_MSWin32, $Is_Linux, $Is_VMS, $Is_OpenBSD, + $report_about_module, $category, $severity, + %opt, $have_attachment, $attachments, $has_patch, $mime_boundary +); + +my $perl_version = $^V ? sprintf("%vd", $^V) : $]; + +my $config_tag2 = "$perl_version - $Config{cf_time}"; + +Init(); + +if ($opt{h}) { Help(); exit; } +if ($opt{d}) { Dump(*STDOUT); exit; } +if (!-t STDIN && !($ok and not $opt{n})) { + paraprint <<"EOF"; +Please use $progname interactively. If you want to +include a file, you can use the -f switch. +EOF + die "\n"; +} + +Query(); +Edit() unless $usefile || ($ok and not $opt{n}); +NowWhat(); +if ($outfile) { + save_message_to_disk($outfile); +} else { + Send(); + if ($thanks) { + print "\nThank you for taking the time to send a thank-you message!\n\n"; + + paraprint < { + 'default' => 'core', + 'ok' => 'install', + # Inevitably some of these will end up in RT whatever we do: + 'thanks' => 'thanks', + 'opts' => [qw(core docs install library utilities)], # patch, notabug + }, + 'severity' => { + 'default' => 'low', + 'ok' => 'none', + 'thanks' => 'none', + 'opts' => [qw(critical high medium low wishlist none)], # zero + }, + ); + die "Invalid alternative ($name) requested\n" unless grep(/^$name$/, keys %alts); + my $alt = ""; + my $what = $ok || $thanks; + if ($what) { + $alt = $alts{$name}{$what}; + } else { + my @alts = @{$alts{$name}{'opts'}}; + print "\n\n"; + paraprint < 5) { + die "Invalid $name: aborting.\n"; + } + $alt = _prompt('', "\u$name", $alts{$name}{'default'}); + $alt ||= $alts{$name}{'default'}; + } while !((($alt) = grep(/^$alt/i, @alts))); + } + lc $alt; +} + +sub Init { + # -------- Setup -------- + + $Is_MSWin32 = $^O eq 'MSWin32'; + $Is_VMS = $^O eq 'VMS'; + $Is_Linux = lc($^O) eq 'linux'; + $Is_OpenBSD = lc($^O) eq 'openbsd'; + + if (!getopts("Adhva:s:b:f:F:r:e:SCc:to:n:T:p:", \%opt)) { Help(); exit; }; + + # This comment is needed to notify metaconfig that we are + # using the $perladmin, $cf_by, and $cf_time definitions. + + # -------- Configuration --------- + + # perlbug address + $bugaddress = 'perlbug@perl.org'; + + # Test address + $testaddress = 'perlbug-test@perl.org'; + + # Thanks address + $thanksaddress = 'perl-thanks@perl.org'; + + if (basename ($0) =~ /^perlthanks/i) { + # invoked as perlthanks + $opt{T} = 1; + $opt{C} = 1; # don't send a copy to the local admin + } + + if ($opt{T}) { + $thanks = 'thanks'; + } + + $progname = $thanks ? 'perlthanks' : 'perlbug'; + # Target address + $address = $opt{a} || ($opt{t} ? $testaddress + : $thanks ? $thanksaddress : $bugaddress); + + # Users address, used in message and in From and Reply-To headers + $from = $opt{r} || ""; + + # Include verbose configuration information + $verbose = $opt{v} || 0; + + # Subject of bug-report message + $subject = $opt{s} || ""; + + # Send a file + $usefile = ($opt{f} || 0); + + # File to send as report + $file = $opt{f} || ""; + + # We have one or more attachments + $have_attachment = ($opt{p} || 0); + $mime_boundary = ('-' x 12) . "$Version.perlbug" if $have_attachment; + + # Comma-separated list of attachments + $attachments = $opt{p} || ""; + $has_patch = 0; # TBD based on file type + + for my $attachment (split /\s*,\s*/, $attachments) { + unless (-f $attachment && -r $attachment) { + die "The attachment $attachment is not a readable file: $!\n"; + } + $has_patch = 1 if $attachment =~ m/\.(patch|diff)$/; + } + + # File to output to + $outfile = $opt{F} || ""; + + # Body of report + $body = $opt{b} || ""; + + # Editor + $ed = $opt{e} || $ENV{VISUAL} || $ENV{EDITOR} || $ENV{EDIT} + || ($Is_VMS && "edit/tpu") + || ($Is_MSWin32 && "notepad") + || "vi"; + + # Not OK - provide build failure template by finessing OK report + if ($opt{n}) { + if (substr($opt{n}, 0, 2) eq 'ok' ) { + $opt{o} = substr($opt{n}, 1); + } else { + Help(); + exit(); + } + } + + # OK - send "OK" report for build on this system + $ok = ''; + if ($opt{o}) { + if ($opt{o} eq 'k' or $opt{o} eq 'kay') { + my $age = time - $patchlevel_date; + if ($opt{o} eq 'k' and $age > 60 * 24 * 60 * 60 ) { + my $date = localtime $patchlevel_date; + print <<"EOF"; +"perlbug -ok" and "perlbug -nok" do not report on Perl versions which +are more than 60 days old. This Perl version was constructed on +$date. If you really want to report this, use +"perlbug -okay" or "perlbug -nokay". +EOF + exit(); + } + # force these options + unless ($opt{n}) { + $opt{S} = 1; # don't prompt for send + $opt{b} = 1; # we have a body + $body = "Perl reported to build OK on this system.\n"; + } + $opt{C} = 1; # don't send a copy to the local admin + $opt{s} = 1; # we have a subject line + $subject = ($opt{n} ? 'Not ' : '') + . "OK: perl $perl_version ${patch_tags}on" + ." $::Config{'archname'} $::Config{'osvers'} $subject"; + $ok = 'ok'; + } else { + Help(); + exit(); + } + } + + # Possible administrator addresses, in order of confidence + # (Note that cf_email is not mentioned to metaconfig, since + # we don't really want it. We'll just take it if we have to.) + # + # This has to be after the $ok stuff above because of the way + # that $opt{C} is forced. + $cc = $opt{C} ? "" : ( + $opt{c} || $::Config{'perladmin'} + || $::Config{'cf_email'} || $::Config{'cf_by'} + ); + + if ($::HaveUtil) { + $domain = Mail::Util::maildomain(); + } elsif ($Is_MSWin32) { + $domain = $ENV{'USERDOMAIN'}; + } else { + require Sys::Hostname; + $domain = Sys::Hostname::hostname(); + } + + # Message-Id - rjsf + $messageid = "<$::Config{'version'}_${$}_".time."\@$domain>"; + + # My username + $me = $Is_MSWin32 ? $ENV{'USERNAME'} + : $^O eq 'os2' ? $ENV{'USER'} || $ENV{'LOGNAME'} + : eval { getpwuid($<) }; # May be missing + + $from = $::Config{'cf_email'} + if !$from && $::Config{'cf_email'} && $::Config{'cf_by'} && $me && + ($me eq $::Config{'cf_by'}); +} # sub Init + +sub Query { + # Explain what perlbug is + unless ($ok) { + if ($thanks) { + paraprint <<'EOF'; +This program provides an easy way to send a thank-you message back to the +authors and maintainers of perl. + +If you wish to submit a bug report, please run it without the -T flag +(or run the program perlbug rather than perlthanks) +EOF + } else { + paraprint <<"EOF"; +This program provides an easy way to create a message reporting a +bug in the core perl distribution (along with tests or patches) +to the volunteers who maintain perl at $address. To send a thank-you +note to $thanksaddress instead of a bug report, please run 'perlthanks'. + +Please do not use $0 to send test messages, test whether perl +works, or to report bugs in perl modules from CPAN. + +Suggestions for how to find help using Perl can be found at +http://perldoc.perl.org/perlcommunity.html +EOF + } + } + + # Prompt for subject of message, if needed + + if ($subject && TrivialSubject($subject)) { + $subject = ''; + } + + unless ($subject) { + print +"First of all, please provide a subject for the message.\n"; + if ( not $thanks) { + paraprint <first_release($entry); + if ($entry and not $first_release) { + paraprint <:raw', $filename) or die "Unable to create report file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + + my $reptype = !$ok ? ($thanks ? 'thank-you' : 'bug') + : $opt{n} ? "build failure" : "success"; + + print REP <) { + print REP $_ + } + close(F) or die "Error closing '$file': $!"; + } else { + if ($thanks) { + print REP <<'EOF'; + +----------------------------------------------------------------- +[Please enter your thank-you message here] + + + +[You're welcome to delete anything below this line] +----------------------------------------------------------------- +EOF + } else { + print REP <<'EOF'; + +----------------------------------------------------------------- +[Please describe your issue here] + + + +[Please do not change anything below this line] +----------------------------------------------------------------- +EOF + } + } + Dump(*REP); + close(REP) or die "Error closing report file: $!"; + + # Set up an initial report fingerprint so we can compare it later + _fingerprint_lines_in_report(); + +} # sub Query + +sub Dump { + local(*OUT) = @_; + + # these won't have been set if run with -d + $category ||= 'core'; + $severity ||= 'low'; + + print OUT <etry dit + next; + } elsif ( $action =~ /^[cq]/i ) { # ancel, uit + Cancel(); # cancel exits + } + } + # Ok. the user did what they needed to; + return; + + } +} + + +sub Cancel { + 1 while unlink($filename); # remove all versions under VMS + print "\nQuitting without sending your message.\n"; + exit(0); +} + +sub NowWhat { + # Report is done, prompt for further action + if( !$opt{S} ) { + while(1) { + my $menu = <ile/ve + if ( SaveMessage() ) { exit } + } elsif ($action =~ /^(d|l|sh)/i ) { # isplay, ist, ow + # Display the message + open(REP, '<:raw', $filename) or die "Couldn't open file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while () { print $_ } + close(REP) or die "Error closing report file '$filename': $!"; + if ($have_attachment) { + print "\n\n---\nAttachment(s):\n"; + for my $att (split /\s*,\s*/, $attachments) { print " $att\n"; } + } + } elsif ($action =~ /^su/i) { # bject + my $reply = _prompt( "Subject: $subject", "If the above subject is fine, press Enter. Otherwise, type a replacement now\nSubject"); + if ($reply ne '') { + unless (TrivialSubject($reply)) { + $subject = $reply; + print "Subject: $subject\n"; + } + } + } elsif ($action =~ /^se/i) { # end + # Send the message + my $reply = _prompt( "Are you certain you want to send this message?", 'Please type "yes" if you are','no'); + if ($reply =~ /^yes$/) { + last; + } else { + paraprint <dit, e-edit + # edit the message + Edit(); + } elsif ($action =~ /^[qc]/i) { # ancel, uit + Cancel(); + } elsif ($action =~ /^s/i) { + paraprint < 1); + close($fh); + return $filename; + } else { + # Bah. Fall back to doing things less securely. + my $dir = File::Spec->tmpdir(); + $filename = "bugrep0$$"; + $filename++ while -e File::Spec->catfile($dir, $filename); + $filename = File::Spec->catfile($dir, $filename); + } +} + +sub paraprint { + my @paragraphs = split /\n{2,}/, "@_"; + for (@paragraphs) { # implicit local $_ + s/(\S)\s*\n/$1 /g; + write; + print "\n"; + } +} + +sub _prompt { + my ($explanation, $prompt, $default) = (@_); + if ($explanation) { + print "\n\n"; + paraprint $explanation; + } + print $prompt. ($default ? " [$default]" :''). ": "; + my $result = scalar(<>); + chomp($result); + $result =~ s/^\s*(.*?)\s*$/$1/s; + if ($default && $result eq '') { + return $default; + } else { + return $result; + } +} + +sub _build_header { + my %attr = (@_); + + my $head = ''; + for my $header (keys %attr) { + $head .= "$header: ".$attr{$header}."\n"; + } + return $head; +} + +sub _message_headers { + my %headers = ( To => $address, Subject => $subject ); + $headers{'Cc'} = $cc if ($cc); + $headers{'Message-Id'} = $messageid if ($messageid); + $headers{'Reply-To'} = $from if ($from); + $headers{'From'} = $from if ($from); + if ($have_attachment) { + $headers{'MIME-Version'} = '1.0'; + $headers{'Content-Type'} = qq{multipart/mixed; boundary=\"$mime_boundary\"}; + } + return \%headers; +} + +sub _add_body_start { + my $body_start = <<"BODY_START"; +This is a multi-part message in MIME format. +--$mime_boundary +Content-Type: text/plain; format=fixed +Content-Transfer-Encoding: 8bit + +BODY_START + return $body_start; +} + +sub _add_attachments { + my $attach = ''; + for my $attachment (split /\s*,\s*/, $attachments) { + my $attach_file = basename($attachment); + $attach .= <<"ATTACHMENT"; + +--$mime_boundary +Content-Type: text/x-patch; name="$attach_file" +Content-Transfer-Encoding: 8bit +Content-Disposition: attachment; filename="$attach_file" + +ATTACHMENT + + open my $attach_fh, '<:raw', $attachment + or die "Couldn't open attachment '$attachment': $!\n"; + while (<$attach_fh>) { $attach .= $_; } + close($attach_fh) or die "Error closing attachment '$attachment': $!"; + } + + $attach .= "\n--$mime_boundary--\n"; + return $attach; +} + +sub build_complete_message { + my $content = _build_header(%{_message_headers()}) . "\n\n"; + $content .= _add_body_start() if $have_attachment; + open( REP, "<:raw", $filename ) or die "Couldn't open file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while () { $content .= $_; } + close(REP) or die "Error closing report file '$filename': $!"; + $content .= _add_attachments() if $have_attachment; + return $content; +} + +sub save_message_to_disk { + my $file = shift; + + open OUTFILE, '>:raw', $file or do { warn "Couldn't open '$file': $!\n"; return undef}; + binmode(OUTFILE, ':raw :crlf') if $Is_MSWin32; + + print OUTFILE build_complete_message(); + close(OUTFILE) or do { warn "Error closing $file: $!"; return undef }; + print "\nMessage saved.\n"; + return 1; +} + +sub _send_message_vms { + + my $mail_from = $from; + my $rcpt_to_to = $address; + my $rcpt_to_cc = $cc; + + map { $_ =~ s/^[^<]*[^>]*//; } ($mail_from, $rcpt_to_to, $rcpt_to_cc); + + if ( open my $sff_fh, '|-:raw', 'MCR TCPIP$SYSTEM:TCPIP$SMTP_SFF.EXE SYS$INPUT:' ) { + print $sff_fh "MAIL FROM:<$mail_from>\n"; + print $sff_fh "RCPT TO:<$rcpt_to_to>\n"; + print $sff_fh "RCPT TO:<$rcpt_to_cc>\n" if $rcpt_to_cc; + print $sff_fh "DATA\n"; + print $sff_fh build_complete_message(); + my $success = close $sff_fh; + if ($success ) { + print "\nMessage sent\n"; + return; + } + } + die "Mail transport failed (leaving bug report in $filename): $^E\n"; +} + +sub _send_message_mailsend { + my $msg = Mail::Send->new(); + my %headers = %{_message_headers()}; + for my $key ( keys %headers) { + $msg->add($key => $headers{$key}); + } + + $fh = $msg->open; + binmode($fh, ':raw'); + print $fh _add_body_start() if $have_attachment; + open(REP, "<:raw", $filename) or die "Couldn't open '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while () { print $fh $_ } + close(REP) or die "Error closing $filename: $!"; + print $fh _add_attachments() if $have_attachment; + $fh->close or die "Error sending mail: $!"; + + print "\nMessage sent.\n"; +} + +sub _probe_for_sendmail { + my $sendmail = ""; + for (qw(/usr/lib/sendmail /usr/sbin/sendmail /usr/ucblib/sendmail)) { + $sendmail = $_, last if -e $_; + } + if ( $^O eq 'os2' and $sendmail eq "" ) { + my $path = $ENV{PATH}; + $path =~ s:\\:/:; + my @path = split /$Config{'path_sep'}/, $path; + for (@path) { + $sendmail = "$_/sendmail", last if -e "$_/sendmail"; + $sendmail = "$_/sendmail.exe", last if -e "$_/sendmail.exe"; + } + } + return $sendmail; +} + +sub _send_message_sendmail { + my $sendmail = _probe_for_sendmail(); + unless ($sendmail) { + my $message_start = !$Is_Linux && !$Is_OpenBSD ? <<'EOT' : <<'EOT'; +It appears that there is no program which looks like "sendmail" on +your system and that the Mail::Send library from CPAN isn't available. +EOT +It appears that there is no program which looks like "sendmail" on +your system. +EOT + paraprint(<<"EOF"), die "\n"; +$message_start +Because of this, there's no easy way to automatically send your +message. + +A copy of your message has been saved in '$filename' for you to +send to '$address' with your normal mail client. +EOF + } + + open( SENDMAIL, "|-:raw", $sendmail, "-t", "-oi", "-f", $from ) + || die "'|$sendmail -t -oi -f $from' failed: $!"; + print SENDMAIL build_complete_message(); + if ( close(SENDMAIL) ) { + print "\nMessage sent\n"; + } else { + warn "\nSendmail returned status '", $? >> 8, "'\n"; + } +} + + + +# a strange way to check whether any significant editing +# has been done: check whether any new non-empty lines +# have been added. + +sub _fingerprint_lines_in_report { + my $new_lines = 0; + # read in the report template once so that + # we can track whether the user does any editing. + # yes, *all* whitespace is ignored. + + open(REP, '<:raw', $filename) or die "Unable to open report file '$filename': $!\n"; + binmode(REP, ':raw :crlf') if $Is_MSWin32; + while (my $line = ) { + $line =~ s/\s+//g; + $new_lines++ if (!$REP{$line}); + + } + close(REP) or die "Error closing report file '$filename': $!"; + # returns the number of lines with content that wasn't there when last we looked + return $new_lines; +} + + + +format STDOUT = +^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~ +$_ +. + +__END__ + +=head1 NAME + +perlbug - how to submit bug reports on Perl + +=head1 SYNOPSIS + +B + +B S<[ B<-v> ]> S<[ B<-a> I
]> S<[ B<-s> I ]> +S<[ B<-b> I | B<-f> I ]> S<[ B<-F> I ]> +S<[ B<-r> I ]> +S<[ B<-e> I ]> S<[ B<-c> I | B<-C> ]> +S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-A> ]> S<[ B<-h> ]> S<[ B<-T> ]> + +B S<[ B<-v> ]> S<[ B<-r> I ]> + S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]> + +B + +=head1 DESCRIPTION + + +This program is designed to help you generate and send bug reports +(and thank-you notes) about perl5 and the modules which ship with it. + +In most cases, you can just run it interactively from a command +line without any special arguments and follow the prompts. + +If you have found a bug with a non-standard port (one that was not +part of the I), a binary distribution, or a +non-core module (such as Tk, DBI, etc), then please see the +documentation that came with that distribution to determine the +correct place to report bugs. + +If you are unable to send your report using B (most likely +because your system doesn't have a way to send mail that perlbug +recognizes), you may be able to use this tool to compose your report +and save it to a file which you can then send to B +using your regular mail client. + +In extreme cases, B may not work well enough on your system +to guide you through composing a bug report. In those cases, you +may be able to use B to get system configuration +information to include in a manually composed bug report to +B. + + +When reporting a bug, please run through this checklist: + +=over 4 + +=item What version of Perl you are running? + +Type C at the command line to find out. + +=item Are you running the latest released version of perl? + +Look at http://www.perl.org/ to find out. If you are not using the +latest released version, please try to replicate your bug on the +latest stable release. + +Note that reports about bugs in old versions of Perl, especially +those which indicate you haven't also tested the current stable +release of Perl, are likely to receive less attention from the +volunteers who build and maintain Perl than reports about bugs in +the current release. + +This tool isn't appropriate for reporting bugs in any version +prior to Perl 5.0. + +=item Are you sure what you have is a bug? + +A significant number of the bug reports we get turn out to be +documented features in Perl. Make sure the issue you've run into +isn't intentional by glancing through the documentation that comes +with the Perl distribution. + +Given the sheer volume of Perl documentation, this isn't a trivial +undertaking, but if you can point to documentation that suggests +the behaviour you're seeing is I, your issue is likely to +receive more attention. You may want to start with B +L for pointers to common traps that new (and experienced) +Perl programmers run into. + +If you're unsure of the meaning of an error message you've run +across, B L for an explanation. If the message +isn't in perldiag, it probably isn't generated by Perl. You may +have luck consulting your operating system documentation instead. + +If you are on a non-UNIX platform B L, as some +features may be unimplemented or work differently. + +You may be able to figure out what's going wrong using the Perl +debugger. For information about how to use the debugger B +L. + +=item Do you have a proper test case? + +The easier it is to reproduce your bug, the more likely it will be +fixed -- if nobody can duplicate your problem, it probably won't be +addressed. + +A good test case has most of these attributes: short, simple code; +few dependencies on external commands, modules, or libraries; no +platform-dependent code (unless it's a platform-specific bug); +clear, simple documentation. + +A good test case is almost always a good candidate to be included in +Perl's test suite. If you have the time, consider writing your test case so +that it can be easily included into the standard test suite. + +=item Have you included all relevant information? + +Be sure to include the B error messages, if any. +"Perl gave an error" is not an exact error message. + +If you get a core dump (or equivalent), you may use a debugger +(B, B, etc) to produce a stack trace to include in the bug +report. + +NOTE: unless your Perl has been compiled with debug info +(often B<-g>), the stack trace is likely to be somewhat hard to use +because it will most probably contain only the function names and not +their arguments. If possible, recompile your Perl with debug info and +reproduce the crash and the stack trace. + +=item Can you describe the bug in plain English? + +The easier it is to understand a reproducible bug, the more likely +it will be fixed. Any insight you can provide into the problem +will help a great deal. In other words, try to analyze the problem +(to the extent you can) and report your discoveries. + +=item Can you fix the bug yourself? + +If so, that's great news; bug reports with patches are likely to +receive significantly more attention and interest than those without +patches. Please attach your patch to the report using the C<-p> option. +When sending a patch, create it using C if possible, +though a unified diff created with C will do nearly as well. + +Your patch may be returned with requests for changes, or requests for more +detailed explanations about your fix. + +Here are a few hints for creating high-quality patches: + +Make sure the patch is not reversed (the first argument to diff is +typically the original file, the second argument your changed file). +Make sure you test your patch by applying it with C or the +C program before you send it on its way. Try to follow the +same style as the code you are trying to patch. Make sure your patch +really does work (C, if the thing you're patching is covered +by Perl's test suite). + +=item Can you use C to submit the report? + +B will, amongst other things, ensure your report includes +crucial information about your version of perl. If C is +unable to mail your report after you have typed it in, you may have +to compose the message yourself, add the output produced by C and email it to B. If, for some reason, you +cannot run C at all on your system, be sure to include the +entire output produced by running C (note the uppercase V). + +Whether you use C or send the email manually, please make +your Subject line informative. "a bug" is not informative. Neither +is "perl crashes" nor is "HELP!!!". These don't help. A compact +description of what's wrong is fine. + +=item Can you use C to submit a thank-you note? + +Yes, you can do this by either using the C<-T> option, or by invoking +the program as C. Thank-you notes are good. It makes people +smile. + +=back + +Having done your bit, please be prepared to wait, to be told the +bug is in your code, or possibly to get no reply at all. The +volunteers who maintain Perl are busy folks, so if your problem is +an obvious bug in your own code, is difficult to understand or is +a duplicate of an existing report, you may not receive a personal +reply. + +If it is important to you that your bug be fixed, do monitor the +perl5-porters@perl.org mailing list (mailing lists are moderated, your +message may take a while to show up) and the commit logs to development +versions of Perl, and encourage the maintainers with kind words or +offers of frosty beverages. (Please do be kind to the maintainers. +Harassing or flaming them is likely to have the opposite effect of the +one you want.) + +Feel free to update the ticket about your bug on http://rt.perl.org +if a new version of Perl is released and your bug is still present. + +=head1 OPTIONS + +=over 8 + +=item B<-a> + +Address to send the report to. Defaults to B. + +=item B<-A> + +Don't send a bug received acknowledgement to the reply address. +Generally it is only a sensible to use this option if you are a +perl maintainer actively watching perl porters for your message to +arrive. + +=item B<-b> + +Body of the report. If not included on the command line, or +in a file with B<-f>, you will get a chance to edit the message. + +=item B<-C> + +Don't send copy to administrator. + +=item B<-c> + +Address to send copy of report to. Defaults to the address of the +local perl administrator (recorded when perl was built). + +=item B<-d> + +Data mode (the default if you redirect or pipe output). This prints out +your configuration data, without mailing anything. You can use this +with B<-v> to get more complete data. + +=item B<-e> + +Editor to use. + +=item B<-f> + +File containing the body of the report. Use this to quickly send a +prepared message. + +=item B<-F> + +File to output the results to instead of sending as an email. Useful +particularly when running perlbug on a machine with no direct internet +connection. + +=item B<-h> + +Prints a brief summary of the options. + +=item B<-ok> + +Report successful build on this system to perl porters. Forces B<-S> +and B<-C>. Forces and supplies values for B<-s> and B<-b>. Only +prompts for a return address if it cannot guess it (for use with +B). Honors return address specified with B<-r>. You can use this +with B<-v> to get more complete data. Only makes a report if this +system is less than 60 days old. + +=item B<-okay> + +As B<-ok> except it will report on older systems. + +=item B<-nok> + +Report unsuccessful build on this system. Forces B<-C>. Forces and +supplies a value for B<-s>, then requires you to edit the report +and say what went wrong. Alternatively, a prepared report may be +supplied using B<-f>. Only prompts for a return address if it +cannot guess it (for use with B). Honors return address +specified with B<-r>. You can use this with B<-v> to get more +complete data. Only makes a report if this system is less than 60 +days old. + +=item B<-nokay> + +As B<-nok> except it will report on older systems. + +=item B<-p> + +The names of one or more patch files or other text attachments to be +included with the report. Multiple files must be separated with commas. + +=item B<-r> + +Your return address. The program will ask you to confirm its default +if you don't use this option. + +=item B<-S> + +Send without asking for confirmation. + +=item B<-s> + +Subject to include with the message. You will be prompted if you don't +supply one on the command line. + +=item B<-t> + +Test mode. The target address defaults to B. + +=item B<-T> + +Send a thank-you note instead of a bug report. + +=item B<-v> + +Include verbose configuration data in the report. + +=back + +=head1 AUTHORS + +Kenneth Albanowski (Ekjahds@kjahds.comE), subsequently +Itored by Gurusamy Sarathy (Egsar@activestate.comE), +Tom Christiansen (Etchrist@perl.comE), Nathan Torkington +(Egnat@frii.comE), Charles F. Randall (Ecfr@pobox.comE), +Mike Guy (Emjtg@cam.ac.ukE), Dominic Dunlop +(Edomo@computer.orgE), Hugo van der Sanden (Ehv@crypt.orgE), +Jarkko Hietaniemi (Ejhi@iki.fiE), Chris Nandor +(Epudge@pobox.comE), Jon Orwant (Eorwant@media.mit.eduE, +Richard Foley (Erichard.foley@rfi.netE), Jesse Vincent +(Ejesse@bestpractical.comE), and Craig A. Berry (Ecraigberry@mac.comE). + +=head1 SEE ALSO + +perl(1), perldebug(1), perldiag(1), perlport(1), perltrap(1), +diff(1), patch(1), dbx(1), gdb(1) + +=head1 BUGS + +None known (guess what must have been used to report them?) + +=cut + diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pg.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pg.exe new file mode 100644 index 00000000..3ce5294f Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pg.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/piconv b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/piconv new file mode 100644 index 00000000..66a824d4 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/piconv @@ -0,0 +1,321 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +#!./perl +# $Id: piconv,v 2.7 2014/05/31 09:48:48 dankogai Exp $ +# +use 5.8.0; +use strict; +use Encode ; +use Encode::Alias; +my %Scheme = map {$_ => 1} qw(from_to decode_encode perlio); + +use File::Basename; +my $name = basename($0); + +use Getopt::Long qw(:config no_ignore_case); + +my %Opt; + +help() + unless + GetOptions(\%Opt, + 'from|f=s', + 'to|t=s', + 'list|l', + 'string|s=s', + 'check|C=i', + 'c', + 'perlqq|p', + 'htmlcref', + 'xmlcref', + 'debug|D', + 'scheme|S=s', + 'resolve|r=s', + 'help', + ); + +$Opt{help} and help(); +$Opt{list} and list_encodings(); +my $locale = $ENV{LC_CTYPE} || $ENV{LC_ALL} || $ENV{LANG}; +defined $Opt{resolve} and resolve_encoding($Opt{resolve}); +$Opt{from} || $Opt{to} || help(); +my $from = $Opt{from} || $locale or help("from_encoding unspecified"); +my $to = $Opt{to} || $locale or help("to_encoding unspecified"); +$Opt{string} and Encode::from_to($Opt{string}, $from, $to) and print $Opt{string} and exit; +my $scheme = do { + if (defined $Opt{scheme}) { + if (!exists $Scheme{$Opt{scheme}}) { + warn "Unknown scheme '$Opt{scheme}', fallback to 'from_to'.\n"; + 'from_to'; + } else { + $Opt{scheme}; + } + } else { + 'from_to'; + } +}; + +$Opt{check} ||= $Opt{c}; +$Opt{perlqq} and $Opt{check} = Encode::PERLQQ; +$Opt{htmlcref} and $Opt{check} = Encode::HTMLCREF; +$Opt{xmlcref} and $Opt{check} = Encode::XMLCREF; + +my $efrom = Encode->getEncoding($from) || die "Unknown encoding '$from'"; +my $eto = Encode->getEncoding($to) || die "Unknown encoding '$to'"; + +my $cfrom = $efrom->name; +my $cto = $eto->name; + +if ($Opt{debug}){ + print <<"EOT"; +Scheme: $scheme +From: $from => $cfrom +To: $to => $cto +EOT +} + +my %use_bom = + map { $_ => 1 } qw/UTF-16 UTF-16BE UTF-16LE UTF-32 UTF-32BE UTF-32LE/; + +# we do not use <> (or ARGV) for the sake of binmode() +@ARGV or push @ARGV, \*STDIN; + +unless ( $scheme eq 'perlio' ) { + binmode STDOUT; + my $need2slurp = $use_bom{ $eto } || $use_bom{ $efrom }; + for my $argv (@ARGV) { + my $ifh = ref $argv ? $argv : undef; + $ifh or open $ifh, "<", $argv or warn "Can't open $argv: $!" and next; + $ifh or open $ifh, "<", $argv or next; + binmode $ifh; + if ( $scheme eq 'from_to' ) { # default + if ($need2slurp){ + local $/; + $_ = <$ifh>; + Encode::from_to( $_, $from, $to, $Opt{check} ); + print; + }else{ + while (<$ifh>) { + Encode::from_to( $_, $from, $to, $Opt{check} ); + print; + } + } + } + elsif ( $scheme eq 'decode_encode' ) { # step-by-step + if ($need2slurp){ + local $/; + $_ = <$ifh>; + my $decoded = decode( $from, $_, $Opt{check} ); + my $encoded = encode( $to, $decoded ); + print $encoded; + }else{ + while (<$ifh>) { + my $decoded = decode( $from, $_, $Opt{check} ); + my $encoded = encode( $to, $decoded ); + print $encoded; + } + } + } + else { # won't reach + die "$name: unknown scheme: $scheme"; + } + } +} +else { + + # NI-S favorite + binmode STDOUT => "raw:encoding($to)"; + for my $argv (@ARGV) { + my $ifh = ref $argv ? $argv : undef; + $ifh or open $ifh, "<", $argv or warn "Can't open $argv: $!" and next; + $ifh or open $ifh, "<", $argv or next; + binmode $ifh => "raw:encoding($from)"; + print while (<$ifh>); + } +} + +sub list_encodings { + print join( "\n", Encode->encodings(":all") ), "\n"; + exit 0; +} + +sub resolve_encoding { + if ( my $alias = Encode::resolve_alias( $_[0] ) ) { + print $alias, "\n"; + exit 0; + } + else { + warn "$name: $_[0] is not known to Encode\n"; + exit 1; + } +} + +sub help { + my $message = shift; + $message and print STDERR "$name error: $message\n"; + print STDERR <<"EOT"; +$name [-f from_encoding] [-t to_encoding] + [-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme] + [-s string|file...] +$name -l +$name -r encoding_alias +$name -h +Common options: + -l,--list + lists all available encodings + -r,--resolve encoding_alias + resolve encoding to its (Encode) canonical name + -f,--from from_encoding + when omitted, the current locale will be used + -t,--to to_encoding + when omitted, the current locale will be used + -s,--string string + "string" will be the input instead of STDIN or files +The following are mainly of interest to Encode hackers: + -C N | -c check the validity of the input + -D,--debug show debug information + -S,--scheme scheme use the scheme for conversion +Those are handy when you can only see ASCII characters: + -p,--perlqq transliterate characters missing in encoding to \\x{HHHH} + where HHHH is the hexadecimal Unicode code point + --htmlcref transliterate characters missing in encoding to &#NNN; + where NNN is the decimal Unicode code point + --xmlcref transliterate characters missing in encoding to &#xHHHH; + where HHHH is the hexadecimal Unicode code point + +EOT + exit; +} + +__END__ + +=head1 NAME + +piconv -- iconv(1), reinvented in perl + +=head1 SYNOPSIS + + piconv [-f from_encoding] [-t to_encoding] + [-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme] + [-s string|file...] + piconv -l + piconv -r encoding_alias + piconv -h + +=head1 DESCRIPTION + +B is perl version of B, a character encoding converter +widely available for various Unixen today. This script was primarily +a technology demonstrator for Perl 5.8.0, but you can use piconv in the +place of iconv for virtually any case. + +piconv converts the character encoding of either STDIN or files +specified in the argument and prints out to STDOUT. + +Here is the list of options. Some options can be in short format (-f) +or long (--from) one. + +=over 4 + +=item -f,--from I + +Specifies the encoding you are converting from. Unlike B, +this option can be omitted. In such cases, the current locale is used. + +=item -t,--to I + +Specifies the encoding you are converting to. Unlike B, +this option can be omitted. In such cases, the current locale is used. + +Therefore, when both -f and -t are omitted, B just acts +like B. + +=item -s,--string I + +uses I instead of file for the source of text. + +=item -l,--list + +Lists all available encodings, one per line, in case-insensitive +order. Note that only the canonical names are listed; many aliases +exist. For example, the names are case-insensitive, and many standard +and common aliases work, such as "latin1" for "ISO-8859-1", or "ibm850" +instead of "cp850", or "winlatin1" for "cp1252". See L +for a full discussion. + +=item -r,--resolve I + +Resolve I to Encode canonical encoding name. + +=item -C,--check I + +Check the validity of the stream if I = 1. When I = -1, something +interesting happens when it encounters an invalid character. + +=item -c + +Same as C<-C 1>. + +=item -p,--perlqq + +Transliterate characters missing in encoding to \x{HHHH} where HHHH is the +hexadecimal Unicode code point. + +=item --htmlcref + +Transliterate characters missing in encoding to &#NNN; where NNN is the +decimal Unicode code point. + +=item --xmlcref + +Transliterate characters missing in encoding to &#xHHHH; where HHHH is the +hexadecimal Unicode code point. + +=item -h,--help + +Show usage. + +=item -D,--debug + +Invokes debugging mode. Primarily for Encode hackers. + +=item -S,--scheme I + +Selects which scheme is to be used for conversion. Available schemes +are as follows: + +=over 4 + +=item from_to + +Uses Encode::from_to for conversion. This is the default. + +=item decode_encode + +Input strings are decode()d then encode()d. A straight two-step +implementation. + +=item perlio + +The new perlIO layer is used. NI-S' favorite. + +You should use this option if you are using UTF-16 and others which +linefeed is not $/. + +=back + +Like the I<-D> option, this is also for Encode hackers. + +=back + +=head1 SEE ALSO + +L +L +L +L +L +L + +=cut diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pinky.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pinky.exe new file mode 100644 index 00000000..b717c786 Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pinky.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pkginfo.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pkginfo.exe new file mode 100644 index 00000000..517f40fa Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pkginfo.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pl2pm b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pl2pm new file mode 100644 index 00000000..f4d3c298 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pl2pm @@ -0,0 +1,378 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +=head1 NAME + +pl2pm - Rough tool to translate Perl4 .pl files to Perl5 .pm modules. + +=head1 SYNOPSIS + +B F + +=head1 DESCRIPTION + +B is a tool to aid in the conversion of Perl4-style .pl +library files to Perl5-style library modules. Usually, your old .pl +file will still work fine and you should only use this tool if you +plan to update your library to use some of the newer Perl 5 features, +such as AutoLoading. + +=head1 LIMITATIONS + +It's just a first step, but it's usually a good first step. + +=head1 AUTHOR + +Larry Wall + +=cut + +use strict; +use warnings; + +my %keyword = (); + +while () { + chomp; + $keyword{$_} = 1; +} + +local $/; + +while (<>) { + my $newname = $ARGV; + $newname =~ s/\.pl$/.pm/ || next; + $newname =~ s#(.*/)?(\w+)#$1\u$2#; + if (-f $newname) { + warn "Won't overwrite existing $newname\n"; + next; + } + my $oldpack = $2; + my $newpack = "\u$2"; + my @export = (); + + s/\bstd(in|out|err)\b/\U$&/g; + s/(sub\s+)(\w+)(\s*\{[ \t]*\n)\s*package\s+$oldpack\s*;[ \t]*\n+/${1}main'$2$3/ig; + if (/sub\s+\w+'/) { + @export = m/sub\s+\w+'(\w+)/g; + s/(sub\s+)main'(\w+)/$1$2/g; + } + else { + @export = m/sub\s+([A-Za-z]\w*)/g; + } + my @export_ok = grep($keyword{$_}, @export); + @export = grep(!$keyword{$_}, @export); + + my %export = (); + @export{@export} = (1) x @export; + + s/(^\s*);#/$1#/g; + s/(#.*)require ['"]$oldpack\.pl['"]/$1use $newpack/; + s/(package\s*)($oldpack)\s*;[ \t]*\n+//ig; + s/([\$\@%&*])'(\w+)/&xlate($1,"",$2,$newpack,$oldpack,\%export)/eg; + s/([\$\@%&*]?)(\w+)'(\w+)/&xlate($1,$2,$3,$newpack,$oldpack,\%export)/eg; + if (!/\$\[\s*\)?\s*=\s*[^0\s]/) { + s/^\s*(local\s*\()?\s*\$\[\s*\)?\s*=\s*0\s*;[ \t]*\n//g; + s/\$\[\s*\+\s*//g; + s/\s*\+\s*\$\[//g; + s/\$\[/0/g; + } + s/open\s+(\w+)/open($1)/g; + + my $export_ok = ''; + my $carp =''; + + + if (s/\bdie\b/croak/g) { + $carp = "use Carp;\n"; + s/croak "([^"]*)\\n"/croak "$1"/g; + } + + if (@export_ok) { + $export_ok = "\@EXPORT_OK = qw(@export_ok);\n"; + } + + if ( open(PM, ">$newname") ) { + print PM <<"END"; +package $newpack; +use 5.006; +require Exporter; +$carp +\@ISA = qw(Exporter); +\@EXPORT = qw(@export); +$export_ok +$_ +END + } + else { + warn "Can't create $newname: $!\n"; + } +} + +sub xlate { + my ($prefix, $pack, $ident,$newpack,$oldpack,$export) = @_; + + my $xlated ; + if ($prefix eq '' && $ident =~ /^(t|s|m|d|ing|ll|ed|ve|re)$/) { + $xlated = "${pack}'$ident"; + } + elsif ($pack eq '' || $pack eq 'main') { + if ($export->{$ident}) { + $xlated = "$prefix$ident"; + } + else { + $xlated = "$prefix${pack}::$ident"; + } + } + elsif ($pack eq $oldpack) { + $xlated = "$prefix${newpack}::$ident"; + } + else { + $xlated = "$prefix${pack}::$ident"; + } + + return $xlated; +} +__END__ +AUTOLOAD +BEGIN +CHECK +CORE +DESTROY +END +INIT +UNITCHECK +abs +accept +alarm +and +atan2 +bind +binmode +bless +caller +chdir +chmod +chomp +chop +chown +chr +chroot +close +closedir +cmp +connect +continue +cos +crypt +dbmclose +dbmopen +defined +delete +die +do +dump +each +else +elsif +endgrent +endhostent +endnetent +endprotoent +endpwent +endservent +eof +eq +eval +exec +exists +exit +exp +fcntl +fileno +flock +for +foreach +fork +format +formline +ge +getc +getgrent +getgrgid +getgrnam +gethostbyaddr +gethostbyname +gethostent +getlogin +getnetbyaddr +getnetbyname +getnetent +getpeername +getpgrp +getppid +getpriority +getprotobyname +getprotobynumber +getprotoent +getpwent +getpwnam +getpwuid +getservbyname +getservbyport +getservent +getsockname +getsockopt +glob +gmtime +goto +grep +gt +hex +if +index +int +ioctl +join +keys +kill +last +lc +lcfirst +le +length +link +listen +local +localtime +lock +log +lstat +lt +m +map +mkdir +msgctl +msgget +msgrcv +msgsnd +my +ne +next +no +not +oct +open +opendir +or +ord +our +pack +package +pipe +pop +pos +print +printf +prototype +push +q +qq +qr +quotemeta +qw +qx +rand +read +readdir +readline +readlink +readpipe +recv +redo +ref +rename +require +reset +return +reverse +rewinddir +rindex +rmdir +s +scalar +seek +seekdir +select +semctl +semget +semop +send +setgrent +sethostent +setnetent +setpgrp +setpriority +setprotoent +setpwent +setservent +setsockopt +shift +shmctl +shmget +shmread +shmwrite +shutdown +sin +sleep +socket +socketpair +sort +splice +split +sprintf +sqrt +srand +stat +study +sub +substr +symlink +syscall +sysopen +sysread +sysseek +system +syswrite +tell +telldir +tie +tied +time +times +tr +truncate +uc +ucfirst +umask +undef +unless +unlink +unpack +unshift +untie +until +use +utime +values +vec +wait +waitpid +wantarray +warn +while +write +x +xor +y diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pldd.exe b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pldd.exe new file mode 100644 index 00000000..8f112c5f Binary files /dev/null and b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pldd.exe differ diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pod2html b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pod2html new file mode 100644 index 00000000..a7fd725a --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pod2html @@ -0,0 +1,224 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; +=pod + +=head1 NAME + +pod2html - convert .pod files to .html files + +=head1 SYNOPSIS + + pod2html --help --htmldir= --htmlroot= + --infile= --outfile= + --podpath=:...: --podroot= + --cachedir= --flush --recurse --norecurse + --quiet --noquiet --verbose --noverbose + --index --noindex --backlink --nobacklink + --header --noheader --poderrors --nopoderrors + --css= --title= + +=head1 DESCRIPTION + +Converts files from pod format (see L) to HTML format. + +=head1 ARGUMENTS + +pod2html takes the following arguments: + +=over 4 + +=item help + + --help + +Displays the usage message. + +=item htmldir + + --htmldir=name + +Sets the directory to which all cross references in the resulting HTML file +will be relative. Not passing this causes all links to be absolute since this +is the value that tells Pod::Html the root of the documentation tree. + +Do not use this and --htmlroot in the same call to pod2html; they are mutually +exclusive. + +=item htmlroot + + --htmlroot=URL + +Sets the base URL for the HTML files. When cross-references are made, the +HTML root is prepended to the URL. + +Do not use this if relative links are desired: use --htmldir instead. + +Do not pass both this and --htmldir to pod2html; they are mutually exclusive. + +=item infile + + --infile=name + +Specify the pod file to convert. Input is taken from STDIN if no +infile is specified. + +=item outfile + + --outfile=name + +Specify the HTML file to create. Output goes to STDOUT if no outfile +is specified. + +=item podroot + + --podroot=name + +Specify the base directory for finding library pods. + +=item podpath + + --podpath=name:...:name + +Specify which subdirectories of the podroot contain pod files whose +HTML converted forms can be linked-to in cross-references. + +=item cachedir + + --cachedir=name + +Specify which directory is used for storing cache. Default directory is the +current working directory. + +=item flush + + --flush + +Flush the cache. + +=item backlink + + --backlink + +Turn =head1 directives into links pointing to the top of the HTML file. + +=item nobacklink + + --nobacklink + +Do not turn =head1 directives into links pointing to the top of the HTML file +(default behaviour). + +=item header + + --header + +Create header and footer blocks containing the text of the "NAME" section. + +=item noheader + + --noheader + +Do not create header and footer blocks containing the text of the "NAME" +section (default behaviour). + +=item poderrors + + --poderrors + +Include a "POD ERRORS" section in the outfile if there were any POD errors in +the infile (default behaviour). + +=item nopoderrors + + --nopoderrors + +Do not include a "POD ERRORS" section in the outfile if there were any POD +errors in the infile. + +=item index + + --index + +Generate an index at the top of the HTML file (default behaviour). + +=item noindex + + --noindex + +Do not generate an index at the top of the HTML file. + + +=item recurse + + --recurse + +Recurse into subdirectories specified in podpath (default behaviour). + +=item norecurse + + --norecurse + +Do not recurse into subdirectories specified in podpath. + +=item css + + --css=URL + +Specify the URL of cascading style sheet to link from resulting HTML file. +Default is none style sheet. + +=item title + + --title=title + +Specify the title of the resulting HTML file. + +=item quiet + + --quiet + +Don't display mostly harmless warning messages. + +=item noquiet + + --noquiet + +Display mostly harmless warning messages (default behaviour). But this is not +the same as "verbose" mode. + +=item verbose + + --verbose + +Display progress messages. + +=item noverbose + + --noverbose + +Do not display progress messages (default behaviour). + +=back + +=head1 AUTHOR + +Tom Christiansen, Etchrist@perl.comE. + +=head1 BUGS + +See L for a list of known bugs in the translator. + +=head1 SEE ALSO + +L, L + +=head1 COPYRIGHT + +This program is distributed under the Artistic License. + +=cut + +use Pod::Html; + +pod2html @ARGV; diff --git a/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pod2man b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pod2man new file mode 100644 index 00000000..36223f04 --- /dev/null +++ b/ARM_Tag_FW/OpenEPaperLink_TLSR/tc32_windows/bin/pod2man @@ -0,0 +1,359 @@ +#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +# pod2man -- Convert POD data to formatted *roff input. +# +# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013 +# Russ Allbery +# +# This program is free software; you may redistribute it and/or modify it +# under the same terms as Perl itself. + +require 5.004; + +use Getopt::Long qw(GetOptions); +use Pod::Man (); +use Pod::Usage qw(pod2usage); + +use strict; + +# Clean up $0 for error reporting. +$0 =~ s%.*/%%; + +# Insert -- into @ARGV before any single dash argument to hide it from +# Getopt::Long; we want to interpret it as meaning stdin. +my $stdin; +@ARGV = map { $_ eq '-' && !$stdin++ ? ('--', $_) : $_ } @ARGV; + +# Parse our options, trying to retain backward compatibility with pod2man but +# allowing short forms as well. --lax is currently ignored. +my %options; +Getopt::Long::config ('bundling_override'); +GetOptions (\%options, 'center|c=s', 'date|d=s', 'errors=s', 'fixed=s', + 'fixedbold=s', 'fixeditalic=s', 'fixedbolditalic=s', 'help|h', + 'lax|l', 'name|n=s', 'nourls', 'official|o', 'quotes|q=s', + 'release|r:s', 'section|s=s', 'stderr', 'verbose|v', 'utf8|u') + or exit 1; +pod2usage (0) if $options{help}; + +# Official sets --center, but don't override things explicitly set. +if ($options{official} && !defined $options{center}) { + $options{center} = 'Perl Programmers Reference Guide'; +} + +# Verbose is only our flag, not a Pod::Man flag. +my $verbose = $options{verbose}; +delete $options{verbose}; + +# This isn't a valid Pod::Man option and is only accepted for backward +# compatibility. +delete $options{lax}; + +# If neither stderr nor errors is set, default to errors = die. +if (!defined $options{stderr} && !defined $options{errors}) { + $options{errors} = 'die'; +} + +# Initialize and run the formatter, pulling a pair of input and output off at +# a time. For each file, we check whether the document was completely empty +# and, if so, will remove the created file and exit with a non-zero exit +# status. +my $parser = Pod::Man->new (%options); +my $status = 0; +my @files; +do { + @files = splice (@ARGV, 0, 2); + print " $files[1]\n" if $verbose; + $parser->parse_from_file (@files); + if ($parser->{CONTENTLESS}) { + $status = 1; + warn "$0: unable to format $files[0]\n"; + if (defined ($files[1]) and $files[1] ne '-') { + unlink $files[1] unless (-s $files[1]); + } + } +} while (@ARGV); +exit $status; + +__END__ + +=for stopwords +en em --stderr stderr --utf8 UTF-8 overdo markup MT-LEVEL Allbery Solaris +URL troff troff-specific formatters uppercased Christiansen --nourls + +=head1 NAME + +pod2man - Convert POD data to formatted *roff input + +=head1 SYNOPSIS + +pod2man [B<--center>=I] [B<--date>=I] [B<--errors>=I