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