This source file includes following definitions.
- vid_bitmap_refresh
- shutdown
- debug_led
- camera_set_led
- get_flash_params_count
- JogDial_CW
- JogDial_CCW
- vid_turn_off_updates
- vid_turn_on_updates
1 #include "platform.h"
2 #include "lolevel.h"
3
4 void vid_bitmap_refresh()
5 {
6 extern int enabled_refresh_physical_screen;
7 int old_val = enabled_refresh_physical_screen;
8 if ( old_val == 0 )
9 {
10 _ScreenLock();
11 } else {
12 enabled_refresh_physical_screen=1;
13 }
14 _RefreshPhysicalScreen(1);
15
16
17 if ( old_val > 0 )
18 {
19 _ScreenLock();
20 enabled_refresh_physical_screen = old_val;
21 }
22 }
23
24
25 void shutdown()
26 {
27 volatile long *p = (void*)0xC022001C;
28
29
30 asm(
31 "MRS R1, CPSR\n"
32 "AND R0, R1, #0x80\n"
33 "ORR R1, R1, #0x80\n"
34 "MSR CPSR_cf, R1\n"
35 :::"r1","r0");
36
37 *p = 0x44;
38
39 while(1);
40 }
41
42 void debug_led(int state)
43 {
44
45 *((int*) 0xC02200D4) = state ? 0x46 : 0x44;
46 }
47
48 void camera_set_led(int led, int state, __attribute__ ((unused))int bright) {
49
50 long val = state ? 0x46 : 0x44;
51 switch ( led )
52 {
53 case 4:
54 *((volatile long *) 0xC0220136) = val;
55 break;
56 case 5:
57 *((volatile long *) 0xC0220136) = val;
58 *((volatile long *) 0xC0220133) = val;
59 break;
60 case 7:
61 *((volatile long *) 0xC0220133) = val;
62 break;
63 case 8:
64 *((volatile long *) 0xC02200D4) = val;
65 break;
66 case 9:
67 *((volatile long *) 0xC0223030) = val;
68 break;
69 default:
70 break;
71 }
72 }
73
74 int get_flash_params_count(void){
75
76
77 return 120;
78 }
79
80 void JogDial_CW(void){
81 _PostLogicalEventForNotPowerType(0x874, 1);
82 }
83
84 void JogDial_CCW(void){
85 _PostLogicalEventForNotPowerType(0x875, 1);
86 }
87
88 void vid_turn_off_updates()
89 {
90 _ScreenLock();
91 }
92
93 void vid_turn_on_updates()
94 {
95 _RefreshPhysicalScreen(1);
96 }