Reorganize repository structure

This commit is contained in:
Telekatz 2017-07-01 22:09:52 +02:00
parent f2259c5424
commit 3c44927e0a
364 changed files with 0 additions and 14028 deletions

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View file

@ -1 +0,0 @@
In this directory you find mini boop versions running from RAM. See README in each directory.

View file

@ -1 +0,0 @@
<Project name="Boop"><File path="Boop.pnproj"></File><File path="crt.s"></File><File path="externs.h"></File><File path="flash.c"></File><File path="flash.h"></File><File path="fonty.c"></File><File path="fonty.h"></File><File path="irq.c"></File><File path="irq.h"></File><File path="keyboard.c"></File><File path="keyboard.h"></File><File path="lcd.c"></File><File path="lcd.h"></File><File path="lpc2220.h"></File><File path="lpc2220.ld"></File><File path="main.c"></File><File path="Makefile"></File><File path="soundcore.c"></File><File path="soundcore.h"></File><File path="Makefile.local"></File><File path="lpc2220_rom.ld"></File><File path="serial.h"></File><File path="serial.c"></File></Project>

View file

@ -1,4 +0,0 @@
SUBDIRS := adc audio cc1100 display flash games gui infrared interrupt \
keyboard rtc serial timer tools
SRCS := crt.s main.c global.c

View file

@ -1,98 +0,0 @@
###############################################################
#####
##### Makefile for boop - communicate with betty
##### Created at 30.8.2007 02:26 am
#####
##### boop V0.1 by netguy - ck@mamalala.net
##### Makefile V0.1 by alterego - alteregon@gmx.net
#####
###############################################################
###############################################################
#####
##### PATHS (default installation)
#####
##### You can put your path-config into Makefile.local
##### to override these defaults
#####
###############################################################
ARMBASE=/opt/toolchains/gcc-arm-none-eabi-4_9-2014q4
INCLUDEPATH=$(ARMBASE)/include
ARMPATH=$(ARMBASE)/bin
TOOLPREFIX=/arm-none-eabi-
BOOTLOADER_DEVICE=/dev/ttyUSB0
###############################################################
#####
##### Compiler, Linker and Tools
#####
###############################################################
CC=$(ARMPATH)$(TOOLPREFIX)gcc
AS=$(ARMPATH)$(TOOLPREFIX)as
#LD=$(ARMPATH)$(TOOLPREFIX)ld
LD=$(CC)
OC=$(ARMPATH)$(TOOLPREFIX)objcopy
OD=$(ARMPATH)$(TOOLPREFIX)objdump
CPUFLAGS=-mcpu=arm7tdmi-s
OPTFLAGS=-Os
CFLAGS=$(CPUFLAGS) -c -Wall -mthumb-interwork -msoft-float -I$(INCLUDEPATH) -ggdb
ASFLAGS=$(CPUFLAGS) -D --gstabs -mthumb-interwork -mfpu=softfpa
LDFLAGS = -mthumb-interwork -nostartfiles -Xlinker -Map -Xlinker boop.map -Tlpc2220.ld
THUMBFLAGS=-mthumb
-include Makefile.local
###############################################################
#####
##### Do the boop
#####
###############################################################
all: boop_rom.bin
boop_rom.bin: boop_ram.elf
$(OC) -O binary boop_ram.elf boop_ram.bin
$(OC) -O ihex boop_ram.elf boop_ram.hex
boop_ram.elf: crt.o lcd.o fonty.o main.o irq.o keyboard.o soundcore.o
$(LD) -o boop_ram.elf crt.o lcd.o fonty.o main.o irq.o keyboard.o soundcore.o $(LDFLAGS)
test: boop_ram.elf
$(OD) -h boop_ram.elf
crt.o: crt.s
$(AS) $(ASFLAGS) -o crt.o crt.s
irq.o: irq.c irq.h
$(CC) $(CFLAGS) $(OPTFLAGS) -o irq.o irq.c
keyboard.o: keyboard.c keyboard.h
$(CC) $(CFLAGS) -o keyboard.o keyboard.c
soundcore.o: soundcore.c soundcore.h
$(CC) $(CFLAGS) -o soundcore.o soundcore.c
lcd.o: lcd.c lcd.h
$(CC) $(CFLAGS) $(OPTFLAGS) $(THUMBFLAGS) -o lcd.o lcd.c
fonty.o: fonty.c fonty.h
$(CC) $(CFLAGS) $(OPTFLAGS) $(THUMBFLAGS) -o fonty.o fonty.c
main.o: main.c
$(CC) $(CFLAGS) $(OPTFLAGS) -o main.o main.c
ramload: boop_ram.bin
lpctool -d $(BOOTLOADER_DEVICE) -r boop_ram.bin
resident: boop_ram.bin
lpctool -d $(BOOTLOADER_DEVICE) -i -v -e -a boop_ram.bin
clean:
$(RM) -v *.o *.elf *.bin *.hex *~
### EOF

View file

@ -1,24 +0,0 @@
###############################################################
#####
##### Makefile.local.WinARM for boop
##### Created in the early morninghours
#####
##### Makefile.local.WinARM V1.0 by alterego - alteregon@gmx.net
#####
###############################################################
###############################################################
#####
##### PATHS (default installation)
#####
##### You can put your path-config into Makefile.local
##### to override these defaults
#####
###############################################################
ARMBASE=/opt/toolchains/gcc-arm-none-eabi-4_9-2014q4
INCLUDEPATH=$(ARMBASE)/include
ARMPATH=$(ARMBASE)/bin
TOOLPREFIX=/arm-none-eabi-
######################## EOF ##################################

View file

@ -1,20 +0,0 @@
###############################################################
#####
##### Makefile.local.WinARM for boop
##### Created in the early morninghours
#####
##### Makefile.local.WinARM V1.0 by alterego - alteregon@gmx.net
#####
##### Copy this file to Makefile.local for your Windows
##### installation
#####
###############################################################
ARMBASE = c:/WinARM/
INCLUDEPATH = $(ARMBASE)/include
LIBPATH = $(ARMBASE)/arm-elf/lib/interwork
ARMPATH = $(ARMBASE)/bin
TOOLPREFIX = arm-elf-
LPCTOOL = lpctool.exe
######################## EOF ##################################

View file

@ -1,25 +0,0 @@
###############################################################
#####
##### Makefile.local.linuxARM for boop
##### Created in the early morninghours
#####
##### Makefile.local.linuxARM
#####
###############################################################
###############################################################
#####
##### PATHS (default installation)
#####
##### You can put your path-config into Makefile.local
##### to override these defaults
#####
###############################################################
ARMBASE=/opt/armtool/4.1.1
INCLUDEPATH=$(ARMBASE)/include
LIBPATH=$(ARMBASE)/arm-elf/lib/interwork
ARMPATH=$(ARMBASE)/bin
TOOLPREFIX=/arm-elf-
######################## EOF ##################################

View file

@ -1,25 +0,0 @@
24.7.2009:
boop for running in RAM. Created by telekatz for testing sound features.
Run it with
lpctool -r boop_rom.bin -d /dev/ttyUSB2
See Thread
http://bettyhacks.com/forum/index.php?topic=215.0
9.11.2007:
- serial console:
115200 baud, 8N1, no handshake
- serial commands:
0 - backlight off
1 - dimmed backlight
2 - full backlight
. - prints "HELO"
S - prints RCA_Encode status (hex value)
I - prints irIRQ status (hex value)
K - prints keyIRQ status (hex value)
all other inputs are echoed
- flash boop_rom.bin:
lpctool -i -e -a ./boop_rom.bin -d /dev/<serial_device>

View file

@ -1,24 +0,0 @@
const unsigned char b_w = 128;
const unsigned char b_h = 160;
const char b_data[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x80,0xC0,0xE0,0xE0,0xC0,0xE0,0xF0,0xF0,0xE0,0xF0,0xE8,0xF8,0xF0,0xF8,0xE0,0xF8,0x64,0xF8,0x24,0xFC,0x30,0xFC,0x32,0xFC,0x3A,0xFE,0x78,0xFE,0xF8,0xFE,0xF9,0xFE,0xFD,0xFE,0xFD,0xFE,0xFD,0xFE,0xFF,0xFE,0xFF,0xFE,0xFD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x05,0x07,0x0F,0x1F,0x2F,0x7F,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xF8,0x07,0xC1,0x3E,0x07,0xF8,0xFF,0x00,0xFF,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0xFF,0x7F,0xBF,0x3F,0xFF,0xF0,0x08,0xC0,0xE0,0xC0,0xE0,0xE0,0xC0,0xE0,0xF0,0xE0,0xF0,0x80,0x60,0x80,0xC0,0x80,0xC0,0xC0,0x80,0xC0,0x80,0xC0,0x80,0xC0,0x80,0xC0,0x80,0x80,0xC0,0x80,0xD0,0xF0,0xD0,0xF0,0xE0,0xE0,0xD0,0x80,0x40,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x20,0xE0,0x40,0xE0,0x60,0xE0,0xE0,0xE1,0xE2,0xE3,0xFF,0xE7,0xDF,0xE7,0xDB,0xEF,0xF7,0xE7,0x7B,0xE7,0x3B,0xE7,0xBA,0xE3,0xB4,0xE3,0xB0,0xF1,0xE2,0xF1,0xE2,0xF1,0xF8,0xF9,0xF0,0xF8,0xFD,0xFC,0xF9,0xFC,0x7F,0xBE,0x4D,0xFF,0xCA,0xFF,0xFB,0xFF,0xFD,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xE3,0xFF,0xE3,0xFF,0xE3,0xFF,0xE3,0xFF,0xE3,0xFF,0xE3,0xFF,0xE3,0xFF,0xC3,0xFF,0xC3,0xEF,0x97,0xCF,0xB7,0x9F,0x67,0x9F,0x6F,0x3F,0xDE,0x7E,0x9F,0xFE,0x3C,0xFC,0x7C,0xF8,0xFC,0xF8,0xFC,0xFC,0xFA,0xFE,0xFC,0x3C,0xD8,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x14,0x3C,0xD8,0xF8,0xFC,0xFC,0xF8,0xFE,0xC5,0xFF,0xC3,0xFF,0xE1,0xFF,0x71,0x7F,0xF9,0x7F,0xFF,0xFF,0x7F,0xFF,0x7F,0x7F,0xDF,0x5F,0x2F,0x1F,0x2F,0x1F,0x2F,0x1F,0x2F,0x1F,0x3F,0x1F,0x3F,0x3F,0x1F,0x3F,0x7F,0x18,0x67,0x3F,0x5C,0x1F,0x3F,0x1F,0x0F,0x0F,0x1F,0x0F,0x17,0x07,0x0F,0x07,0x0B,0x03,0x0F,0x8B,0x57,0x9F,0xCF,0x9F,0x8F,0x8F,0x17,0x03,0x0D,0x03,0x0D,0x03,0x05,0x03,0x1D,0x33,0x1D,0x7F,0x33,0x7F,0x3F,0x7F,0x3F,0x3F,0x5F,0x1F,0x7F,0x3F,0xDF,0x7F,0xBE,0xFE,0xFD,0xFE,0xF9,0xFF,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xF8,0xF6,0xE0,0xF0,0xE0,0xC0,0xE0,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0xC0,0x80,0x80,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xC0,0x60,0xCF,0xF3,0xFF,0xFF,0xFF,0xFF,0x3F,0xDF,0x1F,0xAC,0x00,0x1F,0x00,0x01,0x00,0x00,0x00,0x80,0xF0,0x08,0x1C,0x22,0x06,0x02,0x00,0x06,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,0x00,0x00,0x00,0x00,0x80,0x00,0x01,0x01,0x00,0x83,0x40,0x06,0x83,0x0C,0x86,0x08,0xD4,0x10,0x08,0x10,0x80,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x04,0x0E,0x15,0x1C,0x3F,0x1F,0xBC,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x5F,0x0F,0x17,0x03,0x05,0x01,0x03,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,0x0F,0x04,0x18,0x3C,0x38,0x30,0x30,0x78,0x70,0x31,0x71,0x60,0x71,0x60,0x71,0x21,0x33,0x61,0x1F,0x23,0x07,0x03,0x0E,0x07,0x0C,0x1E,0x38,0x10,0x60,0xD0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x03,0x07,0x8A,0x0F,0x96,0xF6,0x19,0xE0,0xF0,0xE0,0xF2,0x83,0x70,0x00,0x7D,0xF0,0x08,0x00,0x1F,0x04,0x0A,0x04,0x08,0x0C,0xD2,0x0E,0xDD,0x5C,0xA8,0x7C,0xFA,0xF0,0x6A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x1C,0xE1,0x83,0x04,0x02,0x01,0x01,0x12,0x03,0x34,0x07,0x73,0x37,0x4A,0x3F,0xDE,0x7C,0x9B,0x00,0x38,0x00,0x00,0x00,0x00,0x0C,0x32,0x3C,0xFE,0x7C,0xBA,0xFC,0x7F,0xFF,0x7E,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x71,0x70,0xF0,0x70,0x38,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x18,0x38,0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x07,0xE3,0x1F,0xE7,0x3F,0xC7,0x5F,0xA3,0x00,0xE7,0x00,0x80,0x00,0x85,0x02,0x05,0x00,0x06,0x0C,0x00,0x00,0x04,0x04,0x09,0x00,0x1F,0x03,0x04,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x80,0x88,0x48,0xC8,0x98,0x80,0xC0,0x80,0xC0,0x80,0x00,0x80,0x00,0x00,0x80,0x80,0x03,0x81,0x00,0x80,0x07,0x82,0x01,0x00,0x82,0x02,0x85,0x00,0x83,0x01,0x82,0x00,0xC2,0x00,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x3F,0x00,0x1F,0x00,0x17,0x00,0x1F,0x00,0x3F,0x00,0x1F,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x22,0x72,0x23,0xE3,0x62,0xC3,0xE7,0xC3,0xC7,0xC7,0x83,0x87,0xC7,0x87,0x8E,0x8E,0x07,0x0E,0x8E,0x0C,0x9E,0x1C,0x08,0x18,0x30,0xE0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x03,0x00,0x03,0x00,0xFB,0xFC,0xFB,0xFE,0xFD,0xFE,0x7F,0xFE,0x7F,0xFF,0x2E,0xFF,0xFE,0x1F,0xEE,0x0F,0x1F,0x0F,0x07,0x0F,0x06,0x0F,0x1E,0x0F,0x1F,0x0F,0x1F,0x0F,0xDE,0xFF,0xCF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1E,0xFF,0x0E,0xFE,0x8F,0xFE,0xFF,0xFC,0xFE,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x03,0x03,0x01,0x03,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x03,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xF8,0x77,0xFF,0xC7,0xFF,0x81,0xFF,0xFC,0xFF,0xF0,0xFB,0xE4,0xFF,0xE1,0xF0,0xCF,0x80,0x60,0x00,0xF0,0xC0,0x38,0xC0,0xB0,0xE0,0xF0,0xF8,0xF4,0xFF,0xF0,0xF9,0xE6,0xFF,0xF0,0xFF,0xFC,0xFF,0xFF,0xFF,0x0F,0xFF,0x00,0xFF,0xE0,0xFF,0xF8,0xFF,0xFF,0x7F,0xBF,0x0F,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x80,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0,0xC0,0xE0,0xC0,0xC0,0x80,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0xF9,0x06,0xFF,0x37,0xFF,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0x7F,0xFF,0xFE,0xFC,0xFB,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0x3F,0xFF,0x1F,0xFF,0x8F,0xFF,0xEF,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0x1F,0xAF,0x03,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF3,0x25,0xEF,0xF7,0xF9,0xE1,0xF1,0xE0,0xE1,0xE0,0xE1,0xC1,0xC1,0xC1,0xC1,0x83,0xC3,0x83,0x83,0xC7,0x87,0xC3,0x87,0x8E,0x8E,0x9C,0xF8,0xB4,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0xB0,0x00,0x98,0x08,0xD6,0x0F,0xDA,0x1F,0xC0,0x1F,0xF8,0x3F,0xDE,0x7F,0xBF,0x7F,0x9F,0x0F,0x35,0x0E,0x15,0x07,0x0A,0x07,0x0F,0x0F,0x97,0x9F,0x33,0x3F,0xF1,0xFF,0x78,0xFF,0xFC,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0x0F,0x3F,0x47,0x3F,0x46,0x3C,0x02,0x38,0x04,0x30,0x68,0x60,0x80,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x40,0xC0,0xE1,0xE0,0xE0,0xE0,0xF0,0xF0,0xE1,0xF0,0xE1,0xE1,0xF0,0xE1,0xE1,0xE1,0xC3,0xC3,0xE1,0xC3,0x83,0x83,0x07,0x07,0x03,0x07,0x07,0x07,0x0F,0x07,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x1F,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x04,0x3A,0x08,0xF7,0xCC,0x33,0x28,0x57,0x18,0x27,0x1C,0xE3,0x18,0xE7,0x10,0x29,0x00,0x39,0x10,0x29,0x10,0x29,0x00,0x3D,0x00,0xBF,0x00,0xFC,0x80,0x78,0xE1,0x1A,0x7D,0x82,0x1C,0xEF,0x0E,0xC5,0x07,0xC3,0x03,0xC1,0x01,0x83,0x01,0x80,0x00,0x81,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xE0,0x00,0xFF,0xC0,0x3F,0x3F,0xC0,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x11,0x38,0x11,0x70,0x30,0xE0,0x70,0xE0,0xE1,0xE0,0xC1,0xC1,0xE0,0xC1,0xC1,0xC1,0xC1,0xC1,0x83,0xC3,0x83,0xC3,0x87,0xC7,0xCE,0xFC,0x6A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x01,0xFE,0xF0,0x0E,0x00,0x00,0x00,0x07,0x00,0xFE,0x00,0x80,0x00,0xC0,0x00,0xE0,0xC0,0x38,0x38,0x46,0x0C,0x13,0x03,0x04,0x01,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x0F,0x0F,0x90,0x0F,0xF7,0x0F,0xF5,0x8F,0x76,0xCF,0xB2,0xFC,0xE3,0xFC,0x33,0x0E,0x31,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0xC0,0xE0,0xE0,0xE0,0xE0,0xF0,0xF0,0xE1,0xF1,0xE1,0xE1,0xF3,0xE3,0xE1,0xE3,0xC3,0xC3,0xE3,0xC3,0x83,0x83,0x01,0x01,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x00,0x7E,0x01,0x1E,0x00,0x0F,0x01,0x1E,0x00,0xFE,0x00,0x80,0x00,0x1F,0xF8,0x07,0x18,0x67,0x03,0x1C,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x80,0x70,0xC0,0xB8,0xE0,0xDC,0xF0,0xEE,0xF8,0xF7,0xFC,0x7B,0xFE,0xFD,0xFF,0xFE,0x3F,0x5F,0x0F,0x17,0x03,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,0x00,0x00,0x00,0x00,0x00,0x00,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,0x11,0x38,0x11,0x70,0x30,0xE0,0x70,0xE0,0xE1,0xE0,0xC1,0xC1,0xE0,0xC1,0xC1,0xC1,0xC1,0xC1,0x83,0xC3,0x83,0xC3,0x87,0xC7,0xCE,0xFC,0x6A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x63,0x9C,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3C,0xC3,0xFC,0x02,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xE6,0x04,0x0B,0x02,0x05,0x00,0x03,0x00,0x01,0x03,0x0C,0x1F,0x0F,0x07,0x0B,0x03,0x05,0x1F,0x27,0x3F,0x0F,0x01,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xA0,0xE0,0xE0,0xE0,0xF0,0xF0,0xE0,0xF0,0xE1,0xE1,0xF1,0xE1,0xE3,0xE3,0xC1,0xC3,0xE3,0xC3,0x83,0x83,0x83,0x03,0x01,0x01,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x00,0x78,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0xF8,0x07,0xF8,0x30,0xCF,0x00,0xF8,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x02,0x0D,0x00,0x3C,0x00,0xF0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xC0,0x00,0xC0,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x40,0x00,0x80,0x00,0x80,0x00,0xC0,0x00,0x40,0x00,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0C,0x7E,0x7C,0x1E,0x3C,0x1C,0x1E,0x1C,0x3C,0x3C,0x18,0x3C,0x38,0x38,0x7C,0x79,0x3A,0x7B,0x7F,0x78,0xFD,0xF0,0x78,0xF0,0x70,0xE0,0xF0,0xE0,0xE1,0xE0,0xC1,0xC1,0xE1,0xC1,0xC3,0xC3,0x83,0xC7,0x83,0xCE,0x84,0xF8,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x00,0x1E,0x00,0xF0,0x00,0x80,0x00,0x0F,0x00,0xFF,0x00,0xF0,0x01,0x0E,0x1C,0xE3,0x60,0x9E,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x2C,0xD2,0xC0,0x26,0x80,0x41,0x80,0x40,0x00,0xFC,0x00,0x3D,0x01,0x02,0x00,0x1F,0x00,0xF6,0x20,0x12,0x70,0xA0,0xC0,0x20,0x00,0x00,0x00,0x00,0x00,0x30,0x10,0x78,0x70,0xC3,0x00,0x46,0x00,0x9C,0x20,0x59,0x20,0x13,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x01,0x03,0x03,0x01,0x03,0x03,0x03,0x03,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x08,0x37,0x00,0xFF,0x03,0xFC,0x80,0x78,0x00,0x1F,0x00,0xFF,0x03,0xFC,0x1C,0xE3,0x00,0xF8,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x7F,0x80,0xC1,0xC3,0x84,0x40,0xAF,0xE0,0x1C,0x80,0x40,0x00,0xC0,0x00,0xF0,0x00,0xE0,0x00,0x20,0x00,0x47,0x4C,0xA0,0x4C,0xE2,0x2C,0xD2,0x00,0xA4,0x00,0x60,0x00,0x40,0x00,0x6F,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x05,0x0E,0x31,0xE0,0x1F,0x00,0x07,0x00,0xFF,0x00,0xD7,0xC0,0xBF,0xFC,0xE3,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0xBF,0x9F,0x60,0x9F,0x6F,0xCF,0x17,0x80,0x07,0x00,0x00,0x01,0x00,0x03,0x0D,0x1F,0x08,0x0E,0x19,0x0E,0x05,0x0E,0x05,0x0E,0x01,0x0E,0x05,0x0F,0x9C,0x1F,0x6C,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x70,0x28,0x78,0x07,0x78,0xE7,0x40,0xA1,0x3F,0xC0,0x3F,0x5F,0xFF,0x3F,0xF0,0x28,0xF0,0x00,0x78,0xF6,0x7F,0x3E,0x1F,0x3F,0x7F,0x3C,0x3F,0x48,0x03,0x2C,0x00,0x3E,0x00,0x38,0x00,0x20,0x00,0x60,0x00,0x40,0x00,0x47,0x02,0x45,0x00,0x67,0x00,0x61,0x00,0x65,0x00,0x76,0x00,0x66,0x20,0x56,0x04,0x60,0x20,0x1C,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

View file

@ -1,80 +0,0 @@
/*
batt.c -
Copyright (C) 2007
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 <http://www.gnu.org/licenses/>.
*/
#include "lpc2220.h"
#include "batt.h"
#include "lcd.h"
void initADC(void)
{
/* Setup A/D: 10-bit AIN0 @ 4,2MHz "Non-Burst"-Mode */
//PINSEL1 |= (1UL<<28); // set function P0.29 as AIN2
// sample AIN0 only => bit 0 = 1
// CLKDIV = 14 (59/14 = 4.21 < 4.5 MHz) => Bits 8ff = 14-1
// BURST = 1 => set Bit 16 - wuff: disabled below
// PDN = 1 => set Bit 21
ADCR = ( 1<<5 | ((14-1)<<8) /*| (1UL<<16)*/ | (1UL<<21) );
}
unsigned int getADCvalue(void)
{
unsigned int val=0;
ADCR = ( 1<<5 | ((14-1)<<8) /*| (1UL<<16)*/ | (1UL<<21) );
ADCR |= (1UL<<24); /* Start A/D Conversion (START:0=1) */
while ((ADDR & (1UL<<31)) == 0); /* Wait for the conversion to complete (DONE=1)*/
val = ((ADDR >> 6) & 0x03FF); /* Extract the A/D result */
ADCR &=~(1UL<<21);
return val;
}
void draw_battery(unsigned char x, unsigned char y)
{
unsigned int val=0;
unsigned char w=0;
draw_rect(x,y,14,7,1,3,DRAW_PUT);
draw_vline(x+14,y+2,3,3,DRAW_PUT);
draw_block(x+1,y+1,12,5,2,DRAW_ERASE);
val=getADCvalue();
if (val<0x320)
val=0x320;
if (val>0x380)
val=0x380;
w= (val-0x320)/8;
draw_block(x+1,y+1,w,5,2,DRAW_PUT);
}
void draw_ant(unsigned char x, unsigned char y, unsigned char m) {
draw_vline(x+3,y,7,3,m);
draw_pixel(x,y,3,m);
draw_pixel(x+1,y+1,3,m);
draw_pixel(x+2,y+2,3,m);
draw_pixel(x+6,y,3,m);
draw_pixel(x+5,y+1,3,m);
draw_pixel(x+4,y+2,3,m);
}

View file

@ -1,27 +0,0 @@
/*
batt.h -
Copyright (C) 2007
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 <http://www.gnu.org/licenses/>.
*/
#ifndef BATT_H
#define BATT_H
void initADC(void);
unsigned int getADCvalue(void);
void draw_battery(unsigned char x, unsigned char y);
void draw_ant(unsigned char x, unsigned char y, unsigned char m);
#endif

View file

@ -1 +0,0 @@
<pd><ViewState><e p="Boop" x="true"></e></ViewState></pd>

View file

@ -1 +0,0 @@
<Workspace name="New Project Group"><Project path="Boop.pnproj"></Project><Project path="L:\Betty\Neuer Ordner\trunk\Boop_flash.pnproj"></Project></Workspace>

View file

@ -1,158 +0,0 @@
/*
batt.c -
Copyright (C) 2007
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 <http://www.gnu.org/licenses/>.
*/
#include "lpc2220.h"
#include "cc1100.h"
#include "irq.h"
const unsigned char conf[0x2F] = { 0x29 , 0x2E , 0x07 , 0x00 , 0xD3 , 0x91 , 0x3D , 0x0C ,
0x05 , 0x00 , 0x00 , 0x06 , 0x00 , 0x20 , 0x28 , 0xC5 ,
0xF5 , 0x75 , 0x83 , 0x22 , 0xE5 , 0x14 , 0x07 , 0x30 ,
0x18 , 0x16 , 0x6C , 0x03 , 0x40 , 0x91 , 0x87 , 0x6B ,
0xF8 , 0x56 , 0x10 , 0xE9 , 0x2A , 0x00 , 0x1F , 0x41 ,
0x00 , 0x59 , 0x7F , 0x3F , 0x81 , 0x35 , 0x09 };
volatile unsigned char cc1100rx;
void cc1100_init(void) {
unsigned long xx = 0x200;
PINSEL1 &= ~((1<<3) | (1<<5) | (1<<7));
PCONP &= 0xfffffbff;
PCONP |= (1<<21);
FIOSET0 = SCK1;
FIOCLR0 = MOSI1;
FIOCLR0 = CS1;
while(xx) {
asm volatile("nop" : :);
xx--;
}
FIOSET0 = CS1;
xx=0x200;
while(xx) {
asm volatile("nop" : :);
xx--;
}
FIOCLR0 = CS1;
FIOCLR0 = SCK1;
while (FIOPIN0 & MISO1);
PINSEL1 |= 0x000002A8; //((1<<3) | (1<<5) | (1<<7));
SSPCR0 = 0x0007;
SSPCPSR = 0x02;
SSPCR1 = 0x02;
SSPDR = SRES;
while (FIOPIN0 & MISO1);
while (SSPSR & (1<<4));
xx = SSPDR;
cc1100_write((0x00 | BURST ),conf,0x2f);
}
unsigned char cc1100_write(unsigned char addr,unsigned char* data, unsigned char lenght) {
unsigned short i;
unsigned char status;
unsigned char x;
FIOCLR0 = CS1;
while (FIOPIN0 & MISO1);
SSPDR = (addr | WRITE);
while ((SSPSR & (1<<4)));
status = SSPDR;
for (i=0; i < lenght; i++) {
SSPDR = data[i];
while ((SSPSR & (1<<4)));
x=SSPDR;
}
FIOSET0 = CS1;
return(status);
}
unsigned char cc1100_read(unsigned char addr, unsigned char* data, unsigned char lenght) {
unsigned short i;
unsigned char status;
FIOCLR0 = CS1;
while (FIOPIN0 & MISO1);
SSPDR = (addr | READ);
while ((SSPSR & (1<<4)));
status = SSPDR;
for (i=0; i < lenght; i++) {
SSPDR = 0x00;
while ((SSPSR & (1<<4)));
data[i]=SSPDR;
}
FIOSET0 = CS1;
return(status);
}
unsigned char cc1100_strobe(unsigned char cmd) {
unsigned short status;
FIOCLR0 = CS1;
while (FIOPIN0 & MISO1);
SSPDR = cmd;
while ((SSPSR & (1<<4)));
status = SSPDR;
FIOSET0 = CS1;
return(status);
}
void startcc1100IRQ(void) {
PINSEL1 |= 1;
EXTMODE |= 1;
EXTPOLAR |= 1;
EXTINT |= 1;
VICVectAddr1 = (unsigned long)&(cc1100IRQ);
VICVectCntl1 = VIC_SLOT_EN | INT_SRC_EINT0;
VICIntEnable = INT_EINT0;
}
void cc1100_getfifo(unsigned char* b) {
unsigned char cnt;
cc1100_read(RX_fifo, &cnt,1);
cc1100_read(RX_fifo, b,cnt+2);
b[cnt]=0;
}
void __attribute__ ((interrupt("IRQ"))) cc1100IRQ (void) {
EXTINT = 0x01;
cc1100rx =1;
VICVectAddr = 0;
}

View file

@ -1,56 +0,0 @@
/*
batt.h -
Copyright (C) 2007
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 <http://www.gnu.org/licenses/>.
*/
#ifndef cc1100_H
#define cc1100_H
#define MISO1 (1<<18)
#define MOSI1 (1<<19)
#define SCK1 (1<<17)
#define CS1 (1<<23)
#define WRITE 0x00
#define BURST 0x40
#define READ 0x80
#define TX_fifo 0x7F
#define RX_fifo 0xff
#define SRES 0x30
#define SFSTXON 0x31
#define SXOFF 0x32
#define SCLA 0x33
#define SRX 0x34
#define STX 0x35
#define SIDLE 0x36
#define SWOR 0x38
#define SPWD 0x39
#define SFRX 0x3A
#define SFTX 0x3B
#define SWORRST 0x3C
#define SNOP 0x3D
void cc1100_init(void);
unsigned char cc1100_write(unsigned char addr, unsigned char* data, unsigned char lenght);
unsigned char cc1100_read(unsigned char addr, unsigned char* data, unsigned char lenght);
unsigned char cc1100_strobe(unsigned char cmd);
void startcc1100IRQ(void);
void __attribute__ ((interrupt("IRQ"))) cc1100IRQ (void);
void cc1100_getfifo(unsigned char* b);
#endif

View file

@ -1,199 +0,0 @@
/*
crt.s - startup code
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
.global main
.global _etext
.global _data
.global _edata
.global __bss_start
.global __bss_end__
.global _stack
/* Stack Sizes */
.set UND_STACK_SIZE, 0x00000004 /* stack for "undefined instruction" interrupts is 4 bytes */
.set ABT_STACK_SIZE, 0x00000004 /* stack for "abort" interrupts is 4 bytes */
.set FIQ_STACK_SIZE, 0x00000004 /* stack for "FIQ" interrupts is 4 bytes */
.set IRQ_STACK_SIZE, 0X00000100 /* stack for "IRQ" normal interrupts is 4 bytes */
.set SVC_STACK_SIZE, 0x00000004 /* stack for "SVC" supervisor mode is 4 bytes */
/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
.set MODE_USR, 0x10 /* Normal User Mode */
.set MODE_FIQ, 0x11 /* FIQ Processing Fast Interrupts Mode */
.set MODE_IRQ, 0x12 /* IRQ Processing Standard Interrupts Mode */
.set MODE_SVC, 0x13 /* Supervisor Processing Software Interrupts Mode */
.set MODE_ABT, 0x17 /* Abort Processing memory Faults Mode */
.set MODE_UND, 0x1B /* Undefined Processing Undefined Instructions Mode */
.set MODE_SYS, 0x1F /* System Running Priviledged Operating System Tasks Mode */
.set I_BIT, 0x80 /* when I bit is set, IRQ is disabled (program status registers) */
.set F_BIT, 0x40 /* when F bit is set, FIQ is disabled (program status registers) */
.text
.arm
.global Reset_Handler
.global _startup
.global _endstartup
.global ramvectors
.func ramvectors
ramvectors:
ldr PC, Ram_Reset_Addr
ldr PC, Ram_Undef_Addr
ldr PC, Ram_SWI_Addr
ldr PC, Ram_PAbt_Addr
ldr PC, Ram_DAbt_Addr
nop /* Reserved Vector (holds Philips ISP checksum) */
ldr PC, [PC,#-0xFF0] /* Route IRQ to VIC */
ldr PC, Ram_FIQ_Addr
Ram_Reset_Addr: .word Reset_Handler /* defined in this module below */
Ram_Undef_Addr: .word UNDEF_Routine /* defined in main.c */
Ram_SWI_Addr: .word SWI_Routine /* defined in main.c */
Ram_PAbt_Addr: .word UNDEF_Routine /* defined in main.c */
Ram_DAbt_Addr: .word UNDEF_Routine /* defined in main.c */
Ram_IRQ_Addr: .word IRQ_Routine /* defined in main.c */
Ram_FIQ_Addr: .word FIQ_Routine /* defined in main.c */
.word 0 /* rounds vectors to 64 bytes total */
.endfunc
.section .text
.func _startup
_startup:
# Exception Vectors
_vectors:
ldr PC, Reset_Addr
Reset_Addr: .word Reset_Handler
# Reset Handler
Reset_Handler:
/* Setup a stack for each mode - note that this only sets up a usable stack
for User mode. Also each mode is setup with interrupts initially disabled. */
ldr r0, =_stack_end
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
mov sp, r0
sub r0, r0, #UND_STACK_SIZE
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */
mov sp, r0
sub r0, r0, #ABT_STACK_SIZE
msr CPSR_c, #MODE_FIQ|I_BIT|F_BIT /* FIQ Mode */
mov sp, r0
sub r0, r0, #FIQ_STACK_SIZE
msr CPSR_c, #MODE_IRQ|I_BIT|F_BIT /* IRQ Mode */
mov sp, r0
sub r0, r0, #IRQ_STACK_SIZE
msr CPSR_c, #MODE_SVC|I_BIT|F_BIT /* Supervisor Mode */
mov sp, r0
sub r0, r0, #SVC_STACK_SIZE
msr CPSR_c, #MODE_SYS|I_BIT|F_BIT /* User Mode */
mov sp, r0
/* Setup Pins and Memory */
ldr r0,=BCFG0
ldr r1, =0x10000420
str r1,[r0]
str r1,[r0,#0x08]
ldr r0, =BCFG1
ldr r1, =0xc42
str r1, [r0]
ldr r0, =PINSEL0
ldr r1, =0x00008005
str r1, [r0]
ldr r0, =PINSEL1
ldr r1, =0x20000000
str r1, [r0]
ldr r0, =PINSEL2
ldr r1, =0x0de049d4
str r1, [r0]
ldr r0, = IO2SET
ldr r1, =0x1FC0000
str r1, [r0]
str r1, [r0,#0x04]
ldr r0, = IO0DIR
ldr r1, =0x002018D0
str r1, [r0]
/* Setup PLL */
ldr r0, =0xe01fc000
ldr r2, =0xaa
ldr r3, =0x55
ldr r1, =0x03
str r1, [r0,#0x80]
ldr r1, =0x0
str r1, [r0,#0x100]
ldr r1, =0x42
str r1,[r0,#0x84]
str r2, [r0,#0x8c]
str r3, [r0,#0x8c]
_endstartup:
/* Copy .fastcode & .data section (Copy from ROM to RAM) */
ldr R0, =ramvectors /*_etext*/
ldr r3, entry_mask /* this and the next instruction are an workaround */
and r0, r0, r3 /* for some ugly bug in winarm to force msb to 0x80 */
ldr R1, =0x40000000 /*_data*/
ldr R2, =_startup
1:
cmp r1,r2
ldmltia r0!,{r3}
stmltia r1!,{r3}
blt 1b
/* Clear .bss section (Zero init) */
mov R0, #0
ldr R1, =_bss_start
ldr R2, =_bss_end
2:
cmp R1, R2
strlo R0, [R1], #4
blo 2b
ldr r0, =MEMMAP
ldr r1, =0x02 /* irq vectors in ram */
str r1, [r0]
mov r0,#0
mov r1,r0
mov r2,r0
mov fp,r0
mov r7,r0
ldr r10,=main
mov lr,pc
bx r10
.endfunc
entry_mask: .word 0x4FFFFFFF /* defined in this module below */
.end

View file

@ -1,7 +0,0 @@
#ifndef EXTERNS_H
#define EXTERNS_H
extern unsigned int keys[2];
extern unsigned char autorepeat;
#endif

View file

@ -1,174 +0,0 @@
/*
flash.c - writing/erasing flash
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "flash.h"
#include "serial.h"
#include "lcd.h"
const unsigned long secaddr[19] =
{ 0x00000,
0x02000,
0x03000,
0x04000,
0x08000,
0x10000,
0x18000,
0x20000,
0x28000,
0x30000,
0x38000,
0x40000,
0x48000,
0x50000,
0x58000,
0x60000,
0x68000,
0x70000,
0x78000 };
unsigned long flash_base;
int eraseSector(unsigned char chip, unsigned char secnum)
{
if(chip == 0)
flash_base = FLASH0_BASE;
else
flash_base = FLASH1_BASE;
serial_puts("Erasing Sector: 0x");
putHexW(flash_base + (secaddr[secnum]<<1));
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xAA;
*((volatile unsigned short *)(flash_base | 0x554)) = 0x55;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0x80;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xAA;
*((volatile unsigned short *)(flash_base | 0x554)) = 0x55;
*((volatile unsigned short *)(flash_base + (secaddr[secnum]<<1))) = 0x30;
if((*((volatile unsigned short *)(flash_base)) & 0x44) == (*((volatile unsigned short *)(flash_base)) & 0x44))
{
serial_puts(" -- ERROR\n");
*((volatile unsigned short *)(flash_base)) = 0xF0;
return -1;
}
while ((*((volatile unsigned short *)(flash_base)) & 0x44) != (*((volatile unsigned short *)(flash_base)) & 0x44))
{}
serial_puts(" +> OK\n");
return 0;
}
int eraseFlash(unsigned char chip)
{
if(chip == 0)
flash_base = FLASH0_BASE;
else
flash_base = FLASH1_BASE;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xAA;
*((volatile unsigned short *)(flash_base | 0x554)) = 0x55;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0x80;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xAA;
*((volatile unsigned short *)(flash_base | 0x554)) = 0x55;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0x10;
if((*((volatile unsigned short *)(flash_base)) & 0x44) == (*((volatile unsigned short *)(flash_base)) & 0x44))
{
*((volatile unsigned short *)(flash_base)) = 0xF0;
return -1;
}
while ((*((volatile unsigned short *)(flash_base)) & 0x44) != (*((volatile unsigned short *)(flash_base)) & 0x44))
{}
return 0;
}
int writeWord(unsigned long addr, unsigned short data)
{
flash_base = addr & 0xFF000000;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xAA;
*((volatile unsigned short *)(flash_base | 0x554)) = 0x55;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xA0;
*((volatile unsigned short *)(addr)) = data;
if(*((volatile unsigned short *)(addr)) == *((volatile unsigned short *)(addr)))
{
serial_puts("NACK");
*((volatile unsigned short *)(flash_base)) = 0xF0;
return -1;
}
while(*((volatile unsigned short *)(addr)) != *((volatile unsigned short *)(addr)))
{}
return 0;
}
void prepareBulk(unsigned long dst)
{
flash_base = dst & 0xFF000000;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0xAA;
*((volatile unsigned short *)(flash_base | 0x554)) = 0x55;
*((volatile unsigned short *)(flash_base | 0xAAA)) = 0x20;
}
void endBulk(unsigned long dst)
{
flash_base = dst & 0xFF000000;
*((volatile unsigned short *)(flash_base)) = 0x90;
*((volatile unsigned short *)(flash_base)) = 0x00;
}
int writeBulk(unsigned long src, unsigned long dst, unsigned long cnt)
{
unsigned short check1, check2;
while(cnt--)
{
*((volatile unsigned short *)dst) = 0xA0;
*((volatile unsigned short *)dst) = *((volatile unsigned short *)src);
retry:
check1 = *((volatile unsigned short *)dst);
check2 = *((volatile unsigned short *)dst);
if((check1 & 0x40) == (check2 & 0x40))
goto done;
if(!(check2 & 0x20))
goto retry;
check1 = *((volatile unsigned short *)dst);
check2 = *((volatile unsigned short *)dst);
if((check1 & 0x40) == (check2 & 0x40))
goto done;
*((volatile unsigned short *)dst) = 0xF0;
return -1;
done:
check1 = *((volatile unsigned short *)dst);
check2 = *((volatile unsigned short *)dst);
if(check1 != check2)
goto retry;
src+=2;
dst+=2;
}
return 0;
}

View file

@ -1,33 +0,0 @@
/*
flash.h - writing/erasing flash
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef FLASH_H
#define FLASH_H
#define FLASH0_BASE 0x80000000
#define FLASH1_BASE 0x82000000
void prepareBulk(unsigned long dst);
void endBulk(unsigned long dst);
int eraseSector(unsigned char chip, unsigned char secnum);
int eraseFlash(unsigned char chip);
int writeWord(unsigned long addr, unsigned short data);
int writeBulk(unsigned long src, unsigned long dst, unsigned long cnt);
void lcd_set(unsigned char s);
#endif

View file

@ -1,433 +0,0 @@
/*
fonty.c - drawing text & font handling
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "lcd.h"
#include "fonty.h"
#include "fonts/charset.info"
#include "fonts/charset.bits"
/*
#include "fonts/smooth.info"
#include "fonts/smooth.bits"
*/
static unsigned char tx, ty, coff, dbl;
unsigned char *font_bits, *font_info, font_dlines;
unsigned char *font_bitsUM, *font_bitsUL, *font_bitsMM, *font_bitsML, *font_bitsLM, *font_bitsLL;
void set_font(unsigned char f)
{
switch(f)
{
/*
case 2:
coff = 0;
dbl = 16;
font_info = (unsigned char*) smooth_info;
font_bitsUM = (unsigned char*) smooth_mt_bits;
font_bitsUL = (unsigned char*) smooth_lt_bits;
font_bitsLM = (unsigned char*) smooth_mb_bits;
font_bitsLL = (unsigned char*) smooth_lb_bits;
font_dlines = smooth_dlines;
break;
*/
case 1:
coff = 0;
dbl = 1;
font_bits = (unsigned char*) charset_bits;
font_info = (unsigned char*) charset_info;
font_dlines = charset_dlines;
break;
default:
coff = 0;
dbl = 0;
font_bits = (unsigned char*) charset_bits;
font_info = (unsigned char*) charset_info;
font_dlines = charset_dlines;
break;
}
}
void _draw_char(unsigned int ch, unsigned char c, unsigned char m)
{
unsigned char p,q,r,s,t;
unsigned int cpos, cnt;
cpos = 0;
for(cnt=0; cnt<ch; cnt++)
{
if(cnt & 0x01)
{
cpos += (font_info[cnt>>1] & 0x0F);
}
else
{
cpos += (font_info[cnt>>1] >> 4);
}
}
p = font_info[ch>>1];
if(ch & 0x01)
{
p &= 0x0F;
}
else
{
p >>= 4;
}
if(dbl == 1)
{
if(ty & 0x07)
{
t = ty & 0x07;
p <<= 1;
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x01)
q += 0x03;;
if(s & 0x02)
q += 0x0C;;
if(s & 0x04)
q += 0x30;;
if(s & 0x08)
q += 0xC0;;
if(c & 0x02)
s = q << t;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q << t;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x01)
q += 0x03;;
if(s & 0x02)
q += 0x0C;;
if(s & 0x04)
q += 0x30;;
if(s & 0x08)
q += 0xC0;;
if(c & 0x02)
s = q >> (8-t);
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q >> (8-t);
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+8,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x10)
q += 0x03;;
if(s & 0x20)
q += 0x0C;;
if(s & 0x40)
q += 0x30;;
if(s & 0x80)
q += 0xC0;;
if(c & 0x02)
s = q << t;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q << t;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+8,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x10)
q += 0x03;;
if(s & 0x20)
q += 0x0C;;
if(s & 0x40)
q += 0x30;;
if(s & 0x80)
q += 0xC0;;
if(c & 0x02)
s = q >> (8-t);
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q >> (8-t);
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+16,p,m);
}
else
{
p <<= 1;
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x01)
q += 0x03;;
if(s & 0x02)
q += 0x0C;;
if(s & 0x04)
q += 0x30;;
if(s & 0x08)
q += 0xC0;;
if(c & 0x02)
s = q;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x10)
q += 0x03;;
if(s & 0x20)
q += 0x0C;;
if(s & 0x40)
q += 0x30;;
if(s & 0x80)
q += 0xC0;;
if(c & 0x02)
s = q;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+8,p,m);
}
tx += p+2;
}
else
{
if(ty & 0x07)
{
s = ty & 0x07;
for(cnt=0;cnt<p;cnt++)
{
if(c & 0x02)
drawbuf[0][p-cnt-1] = font_bits[cpos+cnt] << s;
else
drawbuf[0][p-cnt-1] = 0x00;
if(c & 0x01)
drawbuf[1][p-cnt-1] = font_bits[cpos+cnt] << s;
else
drawbuf[1][p-cnt-1] = 0x00;
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt++)
{
if(c & 0x02)
drawbuf[0][p-cnt-1] = font_bits[cpos+cnt] >> (8-s);
else
drawbuf[0][p-cnt-1] = 0x00;
if(c & 0x01)
drawbuf[1][p-cnt-1] = font_bits[cpos+cnt] >> (8-s);
else
drawbuf[1][p-cnt-1] = 0x00;
}
do_rcu(tx,ty+8,p,m);
}
else
{
for(cnt=0;cnt<p;cnt++)
{
if(c & 0x02)
drawbuf[0][p-cnt-1] = font_bits[cpos+cnt];
else
drawbuf[0][p-cnt-1] = 0x00;
if(c & 0x01)
drawbuf[1][p-cnt-1] = font_bits[cpos+cnt];
else
drawbuf[1][p-cnt-1] = 0x00;
}
do_rcu(tx,ty,p,m);
}
tx += (p+1);
}
}
void _draw_charB(unsigned int ch, unsigned char c, unsigned char m)
{
unsigned char p;
unsigned int cpos, cnt;
cpos = 0;
for(cnt=0; cnt<ch; cnt++)
{
cpos += font_info[cnt];
}
p = font_info[ch];
if(dbl == 16)
{
for(cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsUM[cpos+cnt];
drawbuf[1][p-cnt-1] = font_bitsUL[cpos+cnt];
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsLM[cpos+cnt];
drawbuf[1][p-cnt-1] = font_bitsLL[cpos+cnt];
}
do_rcu(tx,ty+8,p,m);
tx += (p+1);
}
}
void draw_char(unsigned char x, unsigned char y, unsigned char ch, unsigned char c, unsigned char m)
{
tx = x;
ty = y;
_draw_char(ch+coff, c, m);
}
void draw_string(unsigned char x, unsigned char y, char *st, unsigned char c, unsigned char m)
{
unsigned char cp;
tx = x;
ty = y;
cp = 0;
if(dbl < 15)
{
while(st[cp] != 0)
{
_draw_char(st[cp]+coff, c, m);
cp++;
}
}
else
{
while(st[cp] != 0)
{
_draw_charB(st[cp]+coff, c, m);
cp++;
}
}
}
extern char hval[16];
void draw_hexC(unsigned char x, unsigned char y, const unsigned char v, unsigned char c, unsigned char m)
{
tx = x;
ty = y;
_draw_char(hval[v>>4]+coff, c, m);
_draw_char(hval[v & 0x0F]+coff, c, m);
}
void draw_hexS(unsigned char x, unsigned char y, const unsigned short v, unsigned char c, unsigned char m)
{
tx = x;
ty = y;
draw_hexC(x, y, v >> 8, c, m);
draw_hexC(tx, ty, v & 0xFF, c, m);
}
void draw_hexW(unsigned char x, unsigned char y, const unsigned long v, unsigned char c, unsigned char m)
{
draw_hexS(x, y, v >> 16, c, m);
draw_hexS(tx, ty, v & 0xFFFF, c, m);
}

View file

@ -1,31 +0,0 @@
/*
fonty.h - drawing text & font handling
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef FONTY_H
#define FONTY_H
extern unsigned char drawbuf[2][128];
void set_font(unsigned char f);
void draw_char(unsigned char x, unsigned char y, unsigned char ch, unsigned char c, unsigned char m);
void draw_string(unsigned char x, unsigned char y, char *st, unsigned char c, unsigned char m);
void draw_hexC(unsigned char x, unsigned char y, const unsigned char v, unsigned char c, unsigned char m);
void draw_hexS(unsigned char x, unsigned char y, const unsigned short v, unsigned char c, unsigned char m);
void draw_hexW(unsigned char x, unsigned char y, const unsigned long v, unsigned char c, unsigned char m);
#endif

View file

@ -1,46 +0,0 @@
/*
global.c
Copyright (C) 2007 Colibri <colibri_dvb@lycos.com>
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 <http://www.gnu.org/licenses/>.
*/
#include "lpc2220.h"
void *memcpy(void *dest,void *src,int count)
{
char *tmp = (char *) dest, *s = (char *) src;
while (count--)
*tmp++ = *s++;
return dest;
}
int memcmp(const void * cs,const void * ct,int count)
{
const unsigned char *su1, *su2;
signed char res = 0;
for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
if ((res = *su1 - *su2) != 0)
break;
return res;
}
unsigned char GetHWversion(void) {
if(((IOPIN2 >> 28) & 3) == 3)
return(((((IOPIN0 >> 5) & 1) << 4) | (((IOPIN2 >> 30) & 1) << 3) | (((IOPIN2 >> 16) & 1) << 2) | 3));
return(((IOPIN2 >> 27) & 2) + ((IOPIN2 >> 29) & 1) + (((IOPIN1 >> 23) & 7) << 2));
}

View file

@ -1,57 +0,0 @@
/*
global.h
Copyright (C) 2007 Colibri <colibri_dvb@lycos.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef GLOBAL_H
#define GLOBAL_H
//Uncomment if you want compile with demo sound
//#define WITH_SOUND
typedef unsigned char BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
#define false 0
#define true 1
#define NULL 0
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define SPEED_30 0
#define SPEED_60 1
#define SYS_IR 0x20
#define SYS_KEY 0x40
#define SYS_TURBO 0x80
#ifndef __MAIN_C__
extern char sysInfo;
#endif /* __MAIN_C__ */
#define PCON_IDLE 0x01
#define PCON_PDOWN 0x02
void *memcpy(void *dest,void *src,int count);
int memcmp(const void * cs,const void * ct,int count);
unsigned char GetHWversion(void);
#endif

View file

@ -1,181 +0,0 @@
/*
infrared.c - ir carrier generation and encoding core
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "infrared.h"
#include "irq.h"
#include "lpc2220.h"
#include "keyboard.h"
#include "externs.h"
static unsigned char c_cnt;
static unsigned int b_len;
unsigned char mod_enable;
unsigned char hi_border;
unsigned char lo_border;
unsigned int cycles;
ir_fn irEncoder;
ir_fn irSend;
ir_fn irRepeat;
ir_fn irStop;
const struct irModule defModule = { defIR, defSender, defRepeater, defStopper, 20, 0, 3 };
unsigned long keyMap[42];
void initIR(void)
{
setIR(defModule);
}
void startIrIRQ(void)
{
T1TCR = 0x02;
T1TC = 0;
T1PC = 0;
T1PR = 0x00;
T1MCR = 0x03;
T1TCR = 0x01;
VICVectAddr1 = (unsigned long)&(irIRQ);
VICVectCntl1 = VIC_SLOT_EN | INT_SRC_TIMER1;
VICIntEnable = INT_TIMER1;
}
void setIR(struct irModule module)
{
T1TCR = 0x02;
irEncoder = module.encoder;
irSend = module.sender;
irRepeat = module.repeater;
irStop = module.stopper;
T1MR0 = module.tval;
hi_border = module.hi_border;
lo_border = module.lo_border;
cycles = 100;
T1TCR = 0x01;
}
/* Stubs for various interrupts (may be replaced later) */
/* ---------------------------------------------------- */
void defIR(void)
{
return;
}
void defSender(void)
{
return;
}
void defRepeater(void)
{
return;
}
void defStopper(void)
{
return;
}
void __attribute__ ((interrupt("IRQ"))) irIRQ(void)
{
c_cnt++;
if(c_cnt <= hi_border)
{
FIOSET0 = (mod_enable<<21);
}
else
{
FIOCLR0 = (1<<21);
if(c_cnt >= lo_border)
{
c_cnt = 0;
b_len++;
if(b_len >= cycles)
{
irEncoder();
b_len = 0;
}
}
}
T1IR = 1;
VICVectAddr = 0;
}
void runIR(void)
{
T1TCR = 0x01;
}
void stopIR(void)
{
T1TCR = 0x03;
}
#define doKey( _X, _Y ) if(_X) return keyMap[_Y]; else
unsigned long getCode(void)
{
doKey(KEY_A, 0);
doKey(KEY_B, 1);
doKey(KEY_C, 2);
doKey(KEY_D, 3);
doKey(KEY_Betty, 4);
doKey(KEY_Exit, 5);
doKey(KEY_Up, 6);
doKey(KEY_Down, 7);
doKey(KEY_Left, 8);
doKey(KEY_Right, 9);
doKey(KEY_OK, 10);
doKey(KEY_Vplus, 11);
doKey(KEY_Vminus, 12);
doKey(KEY_Mute, 13);
doKey(KEY_Pplus, 14);
doKey(KEY_Pminus, 15);
doKey(KEY_1, 16);
doKey(KEY_2, 17);
doKey(KEY_3, 18);
doKey(KEY_4, 19);
doKey(KEY_5, 20);
doKey(KEY_6, 21);
doKey(KEY_7, 22);
doKey(KEY_8, 23);
doKey(KEY_9, 24);
doKey(KEY_0, 25);
doKey(KEY_Minus, 26);
doKey(KEY_AV, 27);
doKey(KEY_Menu, 28);
doKey(KEY_PiP, 29);
doKey(KEY_AB, 30);
doKey(KEY_16_9, 31);
doKey(KEY_Info, 32);
doKey(KEY_VTX1, 33);
doKey(KEY_VTX2, 34);
doKey(KEY_VTX3, 35);
doKey(KEY_Blue, 36);
doKey(KEY_Yellow, 37);
doKey(KEY_Green, 38);
doKey(KEY_Red, 39);
doKey(KEY_TV, 40);
doKey(KEY_Power, 41);
return 0xFFFFFFFF;
}

View file

@ -1,60 +0,0 @@
/*
infrared.h - ir carrier generation and encoding core
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef INFRARED_H
#define INFRARED_H
typedef void(*ir_fn)(void);
extern ir_fn irSend;
extern ir_fn irRepeat;
extern ir_fn irStop;
typedef struct irModule
{
ir_fn encoder;
ir_fn sender;
ir_fn repeater;
ir_fn stopper;
int tval;
unsigned int hi_border;
unsigned int lo_border;
} irModule;
extern unsigned char mod_enable;
extern unsigned char hi_border;
extern unsigned char lo_border;
extern unsigned int cycles;
extern unsigned long keyMap[42];
void defIR(void);
void defSender(void);
void defRepeater(void);
void defStopper(void);
void irIRQ (void) __attribute__ ((interrupt("IRQ"))) ;
void initIR(void);
void startIrIRQ(void);
void setIR(struct irModule module);
void runIR(void);
void stopIR(void);
unsigned long getCode(void);
#endif

View file

@ -1,228 +0,0 @@
/*
ir_itt.c - itt protocoll encoder
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "infrared.h"
#include "ir_itt.h"
#include "itt_codes.h"
const struct irModule ITT_Module =
{
ITT_Encode,
ITT_Send,
ITT_Repeat,
ITT_Stop,
43, // carrier
2, // carrier-on
3 // carrier-off
};
const struct irModule ITT2_Module =
{
ITT_Encode,
ITT_Send,
ITT_Repeat,
ITT_Stop,
46, // carrier
1, // carrier-on
3 // carrier-off
};
static unsigned short itt_cmd;
static unsigned short itt_actcmd;
static unsigned char itt_state;
static unsigned char itt_bit;
static unsigned char itt_numbits;
static unsigned char itt_wait;
static unsigned char itt_leadtime;
static unsigned char itt_bittime0;
static unsigned char itt_bittime1;
#define ITT_IDLE 0x00
#define ITT_LEADIN_A 0x01
#define ITT_LEADIN_B 0x02
#define ITT_START_A 0x03
#define ITT_START_B 0x04
#define ITT_BIT_A 0x05
#define ITT_BIT_B 0x06
#define ITT_LEADOUT_A 0x07
#define ITT_LEADOUT_B 0x08
#define ITT_STOP 0x09
#define ITT_WAIT 0x0A
#define ITT_LEADTIME 13
#define ITT_BITTIME_0 4
#define ITT_BITTIME_1 8
#define ITT_WAITTIME 130
#define ITT2_LEADTIME 15
#define ITT2_BITTIME_0 4
#define ITT2_BITTIME_1 9
void ITT_Encode (void)
{
switch(itt_state)
{
case ITT_IDLE:
mod_enable = 0;
break;
case ITT_LEADIN_A:
case ITT_START_A:
case ITT_BIT_A:
case ITT_LEADOUT_A:
case ITT_STOP:
cycles = 1;
mod_enable = 1;
itt_state++;
break;
case ITT_LEADIN_B:
case ITT_LEADOUT_B:
mod_enable = 0;
cycles = itt_leadtime;
itt_state++;
break;
case ITT_START_B:
mod_enable = 0;
cycles = itt_bittime0;
itt_state++;
break;
case ITT_BIT_B:
mod_enable = 0;
if(itt_cmd & 0x01)
cycles = itt_bittime1;
else
cycles = itt_bittime0;
itt_cmd >>= 1;
itt_bit++;
if(itt_bit == itt_numbits)
itt_state++;
else
itt_state--;
break;
case ITT_WAIT:
mod_enable = 0;
cycles = 40;
itt_wait++;
if(itt_wait >= ITT_WAITTIME)
{
itt_bit = 0;
itt_wait = 0;
itt_state = ITT_IDLE;
}
break;
}
}
void ITT_Init(unsigned char map)
{
itt_state = ITT_IDLE;
itt_cmd = 0x0000;
itt_actcmd = 0x0000;
itt_bit = 0x00;
itt_numbits = 0x0A;
itt_wait = 0;
ITT_LoadMap(map);
cycles = 1;
}
void ITT_Send(void)
{
itt_actcmd = getCode();
ITT_Repeat();
}
void ITT_Repeat(void)
{
if(itt_actcmd != 0x0000)
{
if(itt_state == ITT_IDLE)
{
itt_cmd = itt_actcmd;
itt_state++;
runIR();
}
}
}
void ITT_Stop(void)
{
waitend1:
if(itt_state != ITT_IDLE)
goto waitend1;
itt_state++;
if(itt_actcmd != 0x00000000)
{
waitend2:
if(itt_state != ITT_IDLE)
goto waitend2;
}
itt_actcmd = 0x0000;
stopIR();
}
void ITT_CopyMap(unsigned short *map)
{
int x;
for(x=0;x<42;x++)
{
keyMap[x] = map[x];
}
}
void ITT_LoadMap(unsigned char map)
{
switch(map)
{
case 0:
itt_leadtime = ITT_LEADTIME;
itt_bittime0 = ITT_BITTIME_0;
itt_bittime1 = ITT_BITTIME_1;
setIR(ITT_Module);
ITT_CopyMap((unsigned short*)ITT_seleco_019);
break;
case 1:
itt_leadtime = ITT_LEADTIME;
itt_bittime0 = ITT_BITTIME_0;
itt_bittime1 = ITT_BITTIME_1;
setIR(ITT_Module);
ITT_CopyMap((unsigned short*)ITT_seleco_049);
break;
case 2:
itt_leadtime = ITT2_LEADTIME;
itt_bittime0 = ITT2_BITTIME_0;
itt_bittime1 = ITT2_BITTIME_1;
setIR(ITT2_Module);
ITT_CopyMap((unsigned short*)ITT_seleco_108);
break;
default:
itt_leadtime = ITT_LEADTIME;
itt_bittime0 = ITT_BITTIME_0;
itt_bittime1 = ITT_BITTIME_1;
setIR(ITT_Module);
ITT_CopyMap((unsigned short*)ITT_seleco_131);
break;
}
}

View file

@ -1,30 +0,0 @@
/*
ir_itt.h - itt protocol ir encoder
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef IR_ITT_H
#define IR_ITT_H
void ITT_Encode (void) ;
void ITT_Init(unsigned char map);
void ITT_Send(void);
void ITT_Repeat(void);
void ITT_Stop(void);
void ITT_LoadMap(unsigned char map);
#endif

View file

@ -1,221 +0,0 @@
/*
ir_nrc17.c - nokia remote control 17 encoder
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "infrared.h"
#include "ir_nrc17.h"
#include "nrc17_codes.h"
#define NRC17_IDLE 0x00
#define NRC17_PRE_A 0x01
#define NRC17_PRE_B 0x02
#define NRC17_START_A 0x03
#define NRC17_START_B 0x04
#define NRC17_BIT_A 0x05
#define NRC17_BIT_B 0x06
#define NRC17_WAIT 0x07
#define NRC17_BONTIME 19
#define NRC17_BOFFTIME 19
#define NRC17_PTIME 95
#define NRC17_GTIME 156
#define NRC17_WTIME 38
#define NRC17_STARTSTOP_DBOX2 0xFEFF
#define NRC17_STARTSTOP_TP720 0x01FF
const struct irModule NRC17_Module =
{
NRC17_Encode,
NRC17_Send,
NRC17_Repeat,
NRC17_Stop,
40, // carrier
1, // carrier-on
4 // carrier-off
};
static unsigned short nrc17_cmd;
static unsigned short nrc17_actcmd;
static unsigned short nrc17_startstop;
static unsigned char nrc17_state;
static unsigned char nrc17_bit;
static unsigned char nrc17_numbits;
static unsigned short nrc17_wait;
static unsigned short nrc17_pause;
void NRC17_Encode(void)
{
switch(nrc17_state)
{
case NRC17_IDLE:
mod_enable = 0;
break;
case NRC17_PRE_A:
case NRC17_START_A:
cycles = NRC17_BONTIME; // 0.5 ms
mod_enable = 1;
nrc17_state++;
break;
case NRC17_PRE_B:
case NRC17_START_B:
if(nrc17_state == NRC17_PRE_B)
cycles = NRC17_PTIME; // 2,5 ms
else
cycles = NRC17_BOFFTIME; // 0.5 ms
mod_enable = 0;
nrc17_state++;
break;
case NRC17_BIT_A:
if(nrc17_cmd & 0x0001)
mod_enable = 1;
else
mod_enable = 0;
nrc17_cmd >>= 1;
nrc17_state++;
break;
case NRC17_BIT_B:
if(mod_enable == 1)
mod_enable = 0;
else
mod_enable = 1;
nrc17_bit++;
if(nrc17_bit == nrc17_numbits)
nrc17_state++;
else
nrc17_state--;
break;
case NRC17_WAIT:
mod_enable = 0;
nrc17_wait++;
cycles = NRC17_BONTIME; // 1 ms
if(nrc17_wait >= nrc17_pause)
{
nrc17_bit = 0;
nrc17_wait = 0;
nrc17_pause = NRC17_PTIME;
nrc17_state = NRC17_IDLE;
}
break;
}
}
void NRC17_CopyMap(unsigned char xtra, unsigned short *map)
{
int x;
for(x=0;x<42;x++)
{
keyMap[x] = map[x];
}
}
void NRC17_LoadMap(unsigned char map)
{
switch(map)
{
case 0: // nokia dbox2, 16 bit data
NRC17_CopyMap(0x00, (unsigned short*)NRC17_dbox2);
nrc17_startstop = NRC17_STARTSTOP_DBOX2;
nrc17_numbits = 16;
break;
case 1: // tp720 - tv, 9 bit data
NRC17_CopyMap(0x00, (unsigned short*)NRC17_grundig_tp720);
nrc17_startstop = NRC17_STARTSTOP_TP720;
nrc17_numbits = 9;
break;
case 2 : // tp720 - sat, 9 bit data
NRC17_CopyMap(0x40, (unsigned short*)NRC17_grundig_tp720);
nrc17_startstop = NRC17_STARTSTOP_TP720;
nrc17_numbits = 9;
break;
default : // tp720 - video, 9 bit data
NRC17_CopyMap(0x80, (unsigned short*)NRC17_grundig_tp720);
nrc17_startstop = NRC17_STARTSTOP_TP720;
nrc17_numbits = 9;
break;
}
}
void NRC17_Init(unsigned char map)
{
nrc17_state = NRC17_IDLE;
nrc17_cmd = 0x0000;
nrc17_actcmd = 0x0000;
nrc17_bit = 0x00;
nrc17_numbits = 16;
nrc17_wait = 0;
nrc17_pause = NRC17_BONTIME;
NRC17_LoadMap(map);
setIR(NRC17_Module);
}
void NRC17_Send(void)
{
nrc17_actcmd = getCode();
if(nrc17_actcmd != 0x0000)
{
if(nrc17_state == NRC17_IDLE)
{
nrc17_pause = NRC17_WTIME;
nrc17_cmd = nrc17_startstop;
nrc17_state++;
runIR();
}
}
}
void NRC17_Repeat(void)
{
if(nrc17_actcmd != 0x0000)
{
if(nrc17_state == NRC17_IDLE)
{
nrc17_pause = NRC17_GTIME;
nrc17_cmd = nrc17_actcmd;
nrc17_state++;
}
}
}
void NRC17_Stop(void)
{
if(nrc17_actcmd != 0x0000)
{
retry:
if(nrc17_state == NRC17_IDLE)
{
nrc17_cmd = nrc17_startstop;
nrc17_state++;
}
else
goto retry;
waitend:
if(nrc17_state != NRC17_IDLE)
goto waitend;
}
nrc17_actcmd = 0x0000;
stopIR();
}

View file

@ -1,30 +0,0 @@
/*
ir_nrc17.h - nokia remote control 17 encoder
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef IR_NRC17_H
#define IR_NRC17_H
void NRC17_Encode (void) ;
void NRC17_LoadMap(unsigned char map);
void NRC17_Init(unsigned char map);
void NRC17_Send(void);
void NRC17_Repeat(void);
void NRC17_Stop(void);
#endif

View file

@ -1,171 +0,0 @@
/*
ir_rc5.c - phillips rc5 protocoll encoder
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "infrared.h"
#include "ir_rc5.h"
#include "rc5_codes.h"
const struct irModule RC5_Module =
{
RC5_Encode,
RC5_Send,
RC5_Repeat,
RC5_Stop,
42, // carrier
1, // carrier-on
4 // carrier-off
};
static unsigned short rc5_cmd;
static unsigned short rc5_actcmd;
static unsigned char rc5_state;
static unsigned char rc5_bit;
static unsigned char rc5_wait;
static unsigned char rc5_toggle;
#define RC5_IDLE 0x00
#define RC5_START_A 0x01
#define RC5_START_B 0x02
#define RC5_BIT_A 0x03
#define RC5_BIT_B 0x04
#define RC5_WAIT 0x05
#define RC5_BITTIME 32
#define RC5_WAITTIME 100
void RC5_Encode (void)
{
switch(rc5_state)
{
case RC5_IDLE:
mod_enable = 0;
break;
case RC5_START_A:
mod_enable = 0;
rc5_state++;
break;
case RC5_START_B:
mod_enable = 1;
rc5_state++;
break;
case RC5_BIT_A:
if(rc5_cmd & 0x1000)
mod_enable = 0;
else
mod_enable = 1;
rc5_cmd <<= 1;
rc5_state++;
break;
case RC5_BIT_B:
if(mod_enable == 0)
mod_enable = 1;
else
mod_enable = 0;
rc5_bit++;
if(rc5_bit == 13)
rc5_state++;
else
rc5_state--;
break;
case RC5_WAIT:
mod_enable = 0;
rc5_wait++;
if(rc5_wait >= RC5_WAITTIME)
{
rc5_bit = 0;
rc5_wait = 0;
rc5_state = RC5_IDLE;
}
break;
}
}
void RC5_Init(unsigned char map)
{
rc5_state = RC5_IDLE;
rc5_cmd = 0x0000;
rc5_actcmd = 0x0000;
rc5_bit = 0x00;
rc5_wait = 0;
RC5_LoadMap(map);
setIR(RC5_Module);
cycles = RC5_BITTIME;
}
void RC5_Send(void)
{
rc5_actcmd = getCode();
if(rc5_toggle & 0x01)
rc5_actcmd &= 0xF7FF;
RC5_Repeat();
}
void RC5_Repeat(void)
{
if(rc5_actcmd != 0x0000)
{
if(rc5_state == RC5_IDLE)
{
rc5_cmd = rc5_actcmd;
rc5_state++;
runIR();
}
}
}
void RC5_Stop(void)
{
if(rc5_actcmd != 0x00000000)
{
waitend:
if(rc5_state != RC5_IDLE)
goto waitend;
}
rc5_toggle++;
rc5_actcmd = 0x0000;
stopIR();
}
void RC5_CopyMap(unsigned short *map)
{
int x;
for(x=0;x<42;x++)
{
keyMap[x] = map[x];
}
}
void RC5_LoadMap(unsigned char map)
{
switch(map)
{
default:
RC5_CopyMap((unsigned short*)RC5_tv);
break;
}
}

View file

@ -1,30 +0,0 @@
/*
ir_rc5.h - phillips rc5 protocoll encoder
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef IR_RC5_H
#define IR_RC5_H
void RC5_Encode (void) ;
void RC5_Init(unsigned char map);
void RC5_Send(void);
void RC5_Repeat(void);
void RC5_Stop(void);
void RC5_LoadMap(unsigned char map);
#endif

Some files were not shown because too many files have changed in this diff Show more