| Line | |
|---|
| 1 | #include "platform.h" |
|---|
| 2 | #include "leds.h" |
|---|
| 3 | |
|---|
| 4 | void shutdown() |
|---|
| 5 | { |
|---|
| 6 | volatile long *p = (void*)0xc02200a0; |
|---|
| 7 | |
|---|
| 8 | asm( |
|---|
| 9 | "MRS R1, CPSR\n" |
|---|
| 10 | "AND R0, R1, #0x80\n" |
|---|
| 11 | "ORR R1, R1, #0x80\n" |
|---|
| 12 | "MSR CPSR_cf, R1\n" |
|---|
| 13 | :::"r1","r0"); |
|---|
| 14 | |
|---|
| 15 | *p = 0x44; |
|---|
| 16 | |
|---|
| 17 | while(1); |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | void debug_led(int state) |
|---|
| 22 | { |
|---|
| 23 | volatile long *p=(void*)LED_PR; |
|---|
| 24 | if (state) |
|---|
| 25 | p[0]=0x46; |
|---|
| 26 | else |
|---|
| 27 | p[0]=0x44; |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | void camera_set_led(int led, int state, int bright) |
|---|
| 32 | { |
|---|
| 33 | /* ??? |
|---|
| 34 | int leds[] = {12,16,4,8,4,0,4}; |
|---|
| 35 | if(led < 4 || led > 10 || led == 6) return; |
|---|
| 36 | volatile long *p=(void*)LED_AF + leds[led-4]; |
|---|
| 37 | if (state) |
|---|
| 38 | p[0]=0x46; |
|---|
| 39 | else |
|---|
| 40 | p[0]=0x44; |
|---|
| 41 | */ |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | int get_flash_params_count(void){ |
|---|
| 46 | return 114; //??? |
|---|
| 47 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.