This source file includes following definitions.
- vid_bitmap_refresh
- shutdown
- debug_led
- camera_set_led
- get_flash_params_count
- JogDial_CW
- JogDial_CCW
1 #include "platform.h"
2 #include "lolevel.h"
3
4 #define LED_PR 0xc02200C4
5 #define LED_RED 0xc02200C8
6 #define LED_GRN 0xc02200CC
7 #define LED_PWR 0xc02200D0
8
9 void vid_bitmap_refresh()
10 {
11 extern int enabled_refresh_physical_screen;
12 enabled_refresh_physical_screen=1;
13 _RefreshPhysicalScreen(1);
14 }
15
16
17 void shutdown()
18 {
19
20
21
22
23
24
25
26
27
28
29
30
31 volatile long *p = (void*)0xC02200A0;
32
33 asm(
34 "MRS R1, CPSR\n"
35 "AND R0, R1, #0x80\n"
36 "ORR R1, R1, #0x80\n"
37 "MSR CPSR_cf, R1\n"
38 :::"r1","r0");
39
40 *p = 0x44;
41
42 while(1);
43 }
44
45
46 void debug_led(int state)
47 {
48 *(int*)LED_PR=state ? 0x46 : 0x44;
49 *(int*)LED_GRN=state ? 0x46 : 0x44;
50 }
51
52 void camera_set_led(int led, int state, __attribute__ ((unused))int bright) {
53 static char led_table[5]={4,5,7,8,9};
54 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
55 }
56
57 int get_flash_params_count(void){
58 return 120;
59 }
60
61 void JogDial_CW(void){
62 _PostLogicalEventForNotPowerType(0x874, 1);
63 }
64
65 void JogDial_CCW(void){
66 _PostLogicalEventForNotPowerType(0x875, 1);
67 }
68
69
70