| Line | |
|---|
| 1 | #include "platform.h" |
|---|
| 2 | |
|---|
| 3 | void shutdown() |
|---|
| 4 | { |
|---|
| 5 | volatile long *p = (void*)0xc022006C; |
|---|
| 6 | |
|---|
| 7 | asm( |
|---|
| 8 | "MRS R1, CPSR\n" |
|---|
| 9 | "AND R0, R1, #0x80\n" |
|---|
| 10 | "ORR R1, R1, #0x80\n" |
|---|
| 11 | "MSR CPSR_cf, R1\n" |
|---|
| 12 | :::"r1","r0"); |
|---|
| 13 | |
|---|
| 14 | *p = 0x44; |
|---|
| 15 | |
|---|
| 16 | while(1); |
|---|
| 17 | } |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | #define LED_PR 0xC022006C //used iso blue, was 0xc02200C4 //a650- 0xc02200C4 |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 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 | } |
|---|
| 31 | |
|---|
| 32 | #define LED_BASE 0xc0220080 |
|---|
| 33 | #define LED_AF 0xC0220094//was 0xc0220080 //a650- 0xc0220080//from g7 |
|---|
| 34 | |
|---|
| 35 | void camera_set_led1(int led, int state, int bright)//? |
|---|
| 36 | { |
|---|
| 37 | int leds[] = {12,16,4,8,4,0,4}; |
|---|
| 38 | if(led < 4 || led > 10 || led == 6) return; |
|---|
| 39 | volatile long *p=(void*)LED_BASE + leds[led-4]; |
|---|
| 40 | if (state) |
|---|
| 41 | p[0]=0x46; |
|---|
| 42 | else |
|---|
| 43 | p[0]=0x44; |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | int get_flash_params_count(void){ |
|---|
| 48 | return 114; //++ FF956AEC |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | int Get_JogDial(void){ |
|---|
| 52 | return (*(int*)0xC0220304)>>16; |
|---|
| 53 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.