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_viewport_live_fb
- vid_get_palette_type
- vid_get_palette_size
- vid_get_bitmap_active_palette
1 #include "platform.h"
2 #include "lolevel.h"
3
4 void vid_bitmap_refresh()
5 {
6 extern int enabled_refresh_physical_screen;
7 extern int full_screen_refresh;
8
9
10
11
12 extern void _ScreenLock();
13 extern void _ScreenUnlock();
14
15 _ScreenLock();
16
17 enabled_refresh_physical_screen=1;
18 full_screen_refresh=3;
19
20 _ScreenUnlock();
21 }
22
23
24 void shutdown()
25 {
26 volatile long *p = (void*)0xC022001C;
27
28 asm(
29 "MRS R1, CPSR\n"
30 "AND R0, R1, #0x80\n"
31 "ORR R1, R1, #0x80\n"
32 "MSR CPSR_cf, R1\n"
33 :::"r1","r0");
34
35 *p = 0x44;
36
37 while(1);
38 }
39
40 #define LED_PR 0xC02200B6
41
42 void debug_led(__attribute__ ((unused))int state)
43 {
44
45 }
46
47 void camera_set_led(int led, int state, __attribute__ ((unused))int bright) {
48 static char led_table[5]={4,5,7,8,9};
49 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
50 }
51
52 int get_flash_params_count(void){
53 return 120;
54 }
55
56 void JogDial_CW(void){
57 _PostLogicalEventToUI(0x876, 1);
58 }
59
60 void JogDial_CCW(void){
61 _PostLogicalEventToUI(0x877, 1);
62 }
63
64 void *vid_get_viewport_live_fb()
65 {
66 void **fb=(void **)0x222C;
67 unsigned char buff = *((unsigned char*)0x206C);
68 if (buff == 0) buff = 2; else buff--;
69 return fb[buff];
70 }
71
72
73
74 int vid_get_palette_type() { return 3 ; }
75 int vid_get_palette_size() { return 256 * 4 ; }
76
77 void *vid_get_bitmap_active_palette()
78 {
79 extern int active_palette_buffer;
80 extern char** palette_buffer_ptr;
81 return palette_buffer_ptr[active_palette_buffer]+8;
82 }