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