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