]> hackdaworld.org Git - my-code/arm.git/commitdiff
forgot the betty.h file
authorhackbard <hackbard@staubsauger.localdomain>
Thu, 6 Sep 2007 16:33:49 +0000 (18:33 +0200)
committerhackbard <hackbard@staubsauger.localdomain>
Thu, 6 Sep 2007 16:33:49 +0000 (18:33 +0200)
betty/betty.h [new file with mode: 0644]

diff --git a/betty/betty.h b/betty/betty.h
new file mode 100644 (file)
index 0000000..dae3f0a
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * betty.h - betty alternative firmware header file
+ *
+ * author: hackbard@hackdaworld.org
+ *
+ */
+
+#ifndef BETTY_H
+#define BETTY_H
+
+/*
+ * includes
+ */
+
+// processor
+#include "lpc2xxx.h"
+
+// api
+#include "buttons.h"
+
+
+/*
+ * defines
+ */
+
+/* bank 0/2 and boootloader addr/size */
+#define BANK0                  0x80000000
+#define BANK1                  0x81000000
+#define BANK2                  0x82000000
+#define BANK_SIZE              0x00100000
+#define BOOTLOADER             0x7fffe000
+#define BL_SIZE                        0x00002000
+
+/* flash cmd addresses - flash[0-18] <--> arm[1-19]*/
+#define B0F555 (*((volatile unsigned short *)(BANK0|0xaaa)))   // 0x555
+#define B0F2AA (*((volatile unsigned short *)(BANK0|0x554)))   // 0x2aa
+#define B0F    (*((volatile unsigned short *)(BANK0)))
+#define B2F555 (*((volatile unsigned short *)(BANK2|0xaaa)))   // 0x555
+#define B2F2AA (*((volatile unsigned short *)(BANK2|0x554)))   // 0x2aa
+#define B2F    (*((volatile unsigned short *)(BANK2)))
+
+/* lcd command and data addresses */
+#define LCD_CMD                (*((volatile unsigned char *)(BANK1)))
+#define LCD_DATA       (*((volatile unsigned char *)(BANK1+1)))
+
+/*
+ * type definitions
+ */
+
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int u32;
+typedef unsigned long long int u64;
+
+ /*
+  * function prototypes
+  */
+
+ #endif