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