code clean up!
[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 // types
19 #include "types.h"
20
21 // api
22 #include "system.h"
23 #include "uart.h"
24 #include "buttons.h"
25 #include "spi.h"
26 #include "display.h"
27
28 /*
29  * defines
30  */
31
32 /* bank 0/2 and boootloader addr/size */
33 #define BANK0                   0x80000000
34 #define BANK1                   0x81000000
35 #define BANK2                   0x82000000
36 #define BANK_SIZE               0x00100000
37 #define BOOTLOADER              0x7fffe000
38 #define BL_SIZE                 0x00002000
39
40 /* flash cmd addresses - flash[0-18] <--> arm[1-19]*/
41 #define B0F555  (*((volatile unsigned short *)(BANK0|0xaaa)))   // 0x555
42 #define B0F2AA  (*((volatile unsigned short *)(BANK0|0x554)))   // 0x2aa
43 #define B0F     (*((volatile unsigned short *)(BANK0)))
44 #define B2F555  (*((volatile unsigned short *)(BANK2|0xaaa)))   // 0x555
45 #define B2F2AA  (*((volatile unsigned short *)(BANK2|0x554)))   // 0x2aa
46 #define B2F     (*((volatile unsigned short *)(BANK2)))
47
48 /* lcd command and data addresses */
49 #define LCD_CMD         (*((volatile unsigned char *)(BANK1)))
50 #define LCD_DATA        (*((volatile unsigned char *)(BANK1+1)))
51
52  /*
53   * function prototypes
54   */
55
56  #endif