diff options
Diffstat (limited to 'firmware/export/dm320.h')
-rw-r--r-- | firmware/export/dm320.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/firmware/export/dm320.h b/firmware/export/dm320.h index 3d932c69c1..d6599a6745 100644 --- a/firmware/export/dm320.h +++ b/firmware/export/dm320.h | |||
@@ -27,17 +27,14 @@ | |||
27 | #ifndef __DM320_H__ | 27 | #ifndef __DM320_H__ |
28 | #define __DM320_H__ | 28 | #define __DM320_H__ |
29 | 29 | ||
30 | #define LCD_BUFFER_SIZE (LCD_WIDTH*LCD_HEIGHT*2) | 30 | #if !defined(__ASSEMBLER__) && !defined(__LD__) |
31 | #define TTB_SIZE (0x4000) | 31 | /* These variables are created during linking (app/boot.lds) */ |
32 | /* must be 16Kb (0x4000) aligned */ | 32 | extern unsigned long _lcdbuf; |
33 | #if 1 | 33 | extern unsigned long _ttbstart; |
34 | #define MEM_END 0x00900000 + (MEM*0x00100000) | ||
35 | #define TTB_BASE_ADDR (MEM_END - TTB_SIZE) | ||
36 | #else | ||
37 | #define TTB_BASE_ADDR (0x04900000 - TTB_SIZE) | ||
38 | #endif | 34 | #endif |
39 | #define TTB_BASE ((unsigned long *)TTB_BASE_ADDR) /* End of memory */ | 35 | |
40 | #define FRAME ((short *) (TTB_BASE_ADDR - LCD_BUFFER_SIZE)) /* Right before TTB */ | 36 | #define TTB_BASE_ADDR (_ttbstart) /* End of memory */ |
37 | #define FRAME ((short *) (&_lcdbuf)) /* Right before TTB */ | ||
41 | 38 | ||
42 | #define PHY_IO_BASE 0x00030000 | 39 | #define PHY_IO_BASE 0x00030000 |
43 | #define DM320_REG(addr) (*(volatile unsigned short *)(PHY_IO_BASE + (addr))) | 40 | #define DM320_REG(addr) (*(volatile unsigned short *)(PHY_IO_BASE + (addr))) |