source: trunk/platform/a470/lib.c @ 2795

Revision 1626, 519 bytes checked in by reyalp, 16 months ago (diff)

Merged r1625 from branches/release-1_0: a470 updates from srsa_4c in http://chdk.setepontos.com/index.php?topic=650.msg80692#msg80692

  • extra long exposures implemented (all 3 fw revisions, tested on 1.02c)
  • fixed the dark frame subtraction setting, bug mentioned here: http://chdk.setepontos.com/index.php?topic=3368.msg39071#msg39071 for all 3 revisions
  • flash params table and params count fixed (I've verified the addresses manually, so all 3 rev. should be ok)
  • defined CAM_STARTUP_CRASH_FILE_OPEN_FIX (previously camera crashed when "refresh" was issued in chdkptp GUI)
  • also defined CAM_DETECT_SCREEN_ERASE
  • strange check removed from kbd.c
  • multiple corrections for 1.02c according to stubs_entry.S (can't be sure it would be ok for the other 2)
  • debug code removed from capt_seq.c
  • Property svn:eol-style set to native
Line 
1#include "platform.h"
2
3void shutdown()
4{
5    volatile long *p = (void*)0xc02200a0;
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 0xc022008C
21
22void debug_led(int state)
23{
24    volatile long *p=(void*)LED_PR;
25    if (state)
26        p[0]=0x46;
27    else
28        p[0]=0x44;
29}
30
31#define LED_AF 0xc0220080
32
33int get_flash_params_count(void){
34 return 115;
35}
Note: See TracBrowser for help on using the repository browser.