This source file includes following definitions.
- vid_bitmap_refresh
- shutdown
- debug_led
- camera_set_led
- get_flash_params_count
- JogDial_CW
- JogDial_CCW
- vid_get_palette_type
- vid_get_palette_size
- vid_get_bitmap_active_palette
1 #include "platform.h"
2 #include "lolevel.h"
3
4 #define LED_AF 0xC022000C
5 #define LED_ORANGE 0xC0220010
6 #define LED_GREEN 0xC0220014
7
8
9 extern int enabled_refresh_physical_screen;
10 void vid_bitmap_refresh()
11 {
12 enabled_refresh_physical_screen=1;
13 *(int*)0x829C=3;
14 _RefreshPhysicalScreen(1);
15
16 }
17
18
19 void shutdown()
20 {
21
22
23
24
25
26
27
28
29
30
31
32
33 volatile long *p = (void*)0xC02200A0;
34
35 asm(
36 "MRS R1, CPSR\n"
37 "AND R0, R1, #0x80\n"
38 "ORR R1, R1, #0x80\n"
39 "MSR CPSR_cf, R1\n"
40 :::"r1","r0");
41
42 *p = 0x44;
43
44 while(1);
45 }
46
47
48 void debug_led(int state)
49 {
50
51 *(int*)LED_GREEN=state ? 0x46 : 0x44;
52 }
53
54 void camera_set_led(int led, int state, __attribute__ ((unused))int bright) {
55 static char led_table[5]={0,1,9,10,11};
56 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
57 }
58
59 int get_flash_params_count(void){
60 return 132;
61 }
62
63 void JogDial_CW(void){
64 _PostLogicalEventForNotPowerType(0x876, 1);
65 }
66
67 void JogDial_CCW(void){
68 _PostLogicalEventForNotPowerType(0x877, 1);
69 }
70
71
72 int vid_get_palette_type() { return 3 ; }
73 int vid_get_palette_size() { return 256 * 4 ; }
74
75 void *vid_get_bitmap_active_palette()
76 {
77 extern int active_palette_buffer;
78 extern char** palette_buffer_ptr;
79 return palette_buffer_ptr[active_palette_buffer]+8;
80 }