forgot the betty.h file
[my-code/arm.git] / betty / betty.h
1 /*
2  * betty.h - betty alternative firmware header file
3  *
4  * author: hackbard@hackdaworld.org
5  *
6  */
7
8 #ifndef BETTY_H
9 #define BETTY_H
10
11 /*
12  * includes
13  */
14
15 // processor
16 #include "lpc2xxx.h"
17
18 // api
19 #include "buttons.h"
20
21
22 /*
23  * defines
24  */
25
26 /* bank 0/2 and boootloader addr/size */
27 #define BANK0                   0x80000000
28 #define BANK1                   0x81000000
29 #define BANK2                   0x82000000
30 #define BANK_SIZE               0x00100000
31 #define BOOTLOADER              0x7fffe000
32 #define BL_SIZE                 0x00002000
33
34 /* flash cmd addresses - flash[0-18] <--> arm[1-19]*/
35 #define B0F555  (*((volatile unsigned short *)(BANK0|0xaaa)))   // 0x555
36 #define B0F2AA  (*((volatile unsigned short *)(BANK0|0x554)))   // 0x2aa
37 #define B0F     (*((volatile unsigned short *)(BANK0)))
38 #define B2F555  (*((volatile unsigned short *)(BANK2|0xaaa)))   // 0x555
39 #define B2F2AA  (*((volatile unsigned short *)(BANK2|0x554)))   // 0x2aa
40 #define B2F     (*((volatile unsigned short *)(BANK2)))
41
42 /* lcd command and data addresses */
43 #define LCD_CMD         (*((volatile unsigned char *)(BANK1)))
44 #define LCD_DATA        (*((volatile unsigned char *)(BANK1+1)))
45
46 /*
47  * type definitions
48  */
49
50 typedef unsigned char u8;
51 typedef unsigned short u16;
52 typedef unsigned int u32;
53 typedef unsigned long long int u64;
54
55  /*
56   * function prototypes
57   */
58
59  #endif