| Line | |
|---|
| 1 | #include "platform.h" |
|---|
| 2 | #include "lolevel.h" |
|---|
| 3 | #include "sd1200_debug.h" |
|---|
| 4 | |
|---|
| 5 | void vid_bitmap_refresh() |
|---|
| 6 | { |
|---|
| 7 | _ScreenLock(); |
|---|
| 8 | _RefreshPhysicalScreen(1); |
|---|
| 9 | } |
|---|
| 10 | |
|---|
| 11 | void shutdown() |
|---|
| 12 | { |
|---|
| 13 | volatile long *p = (void*)0xc022001C; // from task_by (not really complete) |
|---|
| 14 | |
|---|
| 15 | asm( |
|---|
| 16 | "MRS R1, CPSR\n" |
|---|
| 17 | "AND R0, R1, #0x80\n" |
|---|
| 18 | "ORR R1, R1, #0x80\n" |
|---|
| 19 | "MSR CPSR_cf, R1\n" |
|---|
| 20 | :::"r1","r0"); |
|---|
| 21 | |
|---|
| 22 | *p = 0x44; |
|---|
| 23 | |
|---|
| 24 | while(1); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | int get_flash_params_count(void){ |
|---|
| 28 | return 120; // ? _sub_FF962AB8__PropertyTableManagerCore_c__6, similar to s5is |
|---|
| 29 | // VERIFY_SD1200. Dunno where the above is from (Not SD780) |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | // from Microfunguy in |
|---|
| 34 | // http://chdk.setepontos.com/index.php/topic,4324.msg55475.html#msg55475 |
|---|
| 35 | void ubasic_set_led(int led, int state, int bright) |
|---|
| 36 | { |
|---|
| 37 | int leds[] = {0x134,0x138,0x134,0x130,0x134,0x3030,0x3030}; // green=4 | (yellow) | (not used) | orange | (not used) | af beam | timer |
|---|
| 38 | volatile long *p=(void*)0xc0220000 + leds[(led-4)%sizeof(leds)]; |
|---|
| 39 | if (state) |
|---|
| 40 | p[0]=0x46; |
|---|
| 41 | else |
|---|
| 42 | p[0]=0x44; |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | #define DEBUG_LED LED_IO_Y |
|---|
| 46 | void debug_led(int state) |
|---|
| 47 | { |
|---|
| 48 | * (int *) DEBUG_LED = state ? 0x46 : 0x44; |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | // from sx10 |
|---|
| 52 | void JogDial_CW(void){ |
|---|
| 53 | _PostLogicalEventForNotPowerType(0x874, 2); // RotateJogDialRight |
|---|
| 54 | } |
|---|
| 55 | |
|---|
| 56 | void JogDial_CCW(void){ |
|---|
| 57 | _PostLogicalEventForNotPowerType(0x875, 2); // RotateJogDialLeft |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.