This source file includes following definitions.
- shutdown
- debug_led
- camera_set_led
- get_flash_params_count
- vid_bitmap_refresh
1 #include "platform.h"
2 #include "lolevel.h"
3
4 void shutdown()
5 {
6 volatile long *p = (void*)0xC0220010;
7
8 asm(
9 "MRS R1, CPSR\n"
10 "AND R0, R1, #0x80\n"
11 "ORR R1, R1, #0x80\n"
12 "MSR CPSR_cf, R1\n"
13 :::"r1","r0");
14
15 *p = 0x44;
16
17 while(1);
18 }
19
20
21 #define LED_PR 0xC0220010
22
23 void debug_led(int state)
24 {
25 volatile long *p=(void*)LED_PR;
26 if (state)
27 p[0]=0x46;
28 else
29 p[0]=0x44;
30 }
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 void camera_set_led(int led, int state, __attribute__ ((unused))int bright) {
58 if (led == 4 || led == 7 )
59 _LEDDrive(7, state<=1 ? !state : state);
60 else if ( led == 9 )
61 _LEDDrive(9, state<=1 ? !state : state);
62 }
63
64 int get_flash_params_count(void){
65
66
67
68
69
70 return 0x94;
71 }
72 void vid_bitmap_refresh() {
73 extern int enabled_refresh_physical_screen;
74 extern int full_screen_refresh;
75
76
77
78
79 extern void _LockAndRefresh();
80 extern void _UnlockAndRefresh();
81
82 _LockAndRefresh();
83
84 enabled_refresh_physical_screen=1;
85 full_screen_refresh=3;
86
87 _UnlockAndRefresh();
88 }
89