This source file includes following definitions.
- vid_bitmap_refresh
- shutdown
- debug_led
- ubasic_set_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 extern int enabled_refresh_physical_screen;
5 void vid_bitmap_refresh()
6 {
7 enabled_refresh_physical_screen=1;
8 *(int*)0x1B2DC=3;
9
10 _RefreshPhysicalScreen(1);
11 }
12
13
14 void shutdown()
15 {
16 volatile long *p = (void*)0xC022001C;
17
18 asm(
19 "MRS R1, CPSR\n"
20 "AND R0, R1, #0x80\n"
21 "ORR R1, R1, #0x80\n"
22 "MSR CPSR_cf, R1\n"
23 :::"r1","r0");
24
25 *p = 0x44;
26
27 while(1);
28 }
29
30 #define LED_PR 0xC0220130
31
32 void debug_led(int state)
33 {
34 *(int*)LED_PR=state ? 0x46 : 0x44;
35 }
36
37 void ubasic_set_led(int led, int state, __attribute__ ((unused))int bright) {
38 static char led_table[5]={4,5,7,8,9};
39 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
40 }
41
42 void camera_set_led(int led, int state, __attribute__ ((unused))int bright) {
43 static char led_table[5]={4,5,7,8,9};
44 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
45 }
46
47 int get_flash_params_count(void)
48 {
49 return 0x84;
50 }
51
52 void JogDial_CW(void){
53 _PostLogicalEventToUI(0x876, 2);
54 }
55
56 void JogDial_CCW(void){
57 _PostLogicalEventToUI(0x877, 2);
58 }
59
60
61 int vid_get_palette_type() { return 3 ; }
62 int vid_get_palette_size() { return 256 * 4 ; }
63
64 void *vid_get_bitmap_active_palette()
65 {
66 extern int active_palette_buffer;
67 extern char** palette_buffer_ptr;
68 return palette_buffer_ptr[active_palette_buffer]+8;
69 }