This source file includes following definitions.
- shutdown
- get_flash_params_count
- debug_led
- camera_set_led
- JogDial_CW
- JogDial_CCW
- vid_get_palette_type
- vid_get_palette_size
- vid_get_bitmap_active_palette
- vid_get_bitmap_active_buffer
1 #include "platform.h"
2 #include "lolevel.h"
3 #include "leds.h"
4
5 void shutdown()
6 {
7
8 volatile long *p = (void*)0xC022001C;
9
10 asm(
11 "MRS R1, CPSR\n"
12 "AND R0, R1, #0x80\n"
13 "ORR R1, R1, #0x80\n"
14 "MSR CPSR_cf, R1\n"
15 :::"r1","r0");
16
17 *p = 0x44;
18
19 while(1);
20 }
21
22
23 int get_flash_params_count(void) { return 115; }
24
25 void debug_led(int state)
26 {
27 *(int*)LED_PR = state ? 0x46 : 0x44;
28 }
29
30 void camera_set_led(int led, int state, __attribute__ ((unused))int bright)
31 {
32 static char led_table[5]={4,5,7,8,9};
33 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
34 }
35
36 void JogDial_CW(void)
37 {
38 _PostLogicalEventToUI(0x866, 2);
39 }
40
41 void JogDial_CCW(void)
42 {
43 _PostLogicalEventToUI(0x867, 2);
44 }
45
46
47
48 int vid_get_palette_type() { return 1; }
49 int vid_get_palette_size() { return 16*4; }
50
51 void *vid_get_bitmap_active_palette()
52 {
53 return (void *)0x3ef90;
54 }
55
56 void *vid_get_bitmap_active_buffer()
57 {
58 return (void*)(*(int*)0x7EC4);
59 }
60