This source file includes following definitions.
- get_flash_params_count
- shutdown
- debug_led
1
2 int get_flash_params_count(void){
3 return 108;
4 }
5
6 void shutdown()
7 {
8 volatile long *p = (void*)0xc02200a0;
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 #define LED_PR 0xc0220084
23 void debug_led(int state)
24 {
25 volatile long *p=(void*)LED_PR;
26 if (state)
27 p[0]=0x46;
28 else
29 p[0]=0x44;
30 }