This source file includes following definitions.
- shutdown
- debug_led
- get_flash_params_count
- vid_get_palette_type
- vid_get_palette_size
- vid_get_bitmap_active_palette
- vid_get_bitmap_active_buffer
1 #include "platform.h"
2
3 void shutdown()
4 {
5 volatile long *p = (void*)0xc02200a0;
6
7 asm(
8 "MRS R1, CPSR\n"
9 "AND R0, R1, #0x80\n"
10 "ORR R1, R1, #0x80\n"
11 "MSR CPSR_cf, R1\n"
12 :::"r1","r0");
13
14 *p = 0x44;
15
16 while(1);
17 }
18
19
20 #define LED_PR 0xc02200C4
21
22 void debug_led(int state)
23 {
24 volatile long *p=(void*)LED_PR;
25 if (state)
26 p[0]=0x46;
27 else
28 p[0]=0x44;
29 }
30
31 #define LED_AF 0xc0220080
32
33 int get_flash_params_count(void){
34 return 115;
35 }
36
37
38 int vid_get_palette_type() { return 1; }
39 int vid_get_palette_size() { return 16*4; }
40
41 void *vid_get_bitmap_active_palette()
42 {
43 return (void *)0x3CEC0;
44 }
45
46 void *vid_get_bitmap_active_buffer()
47 {
48 return (void*)(*(int*)0x752c);
49 }