Changeset 1841


Ignore:
Timestamp:
05/06/12 22:30:09 (13 months ago)
Author:
reyalp
Message:

Merged revision(s) 1838-1840 from trunk:
g12 jogdial direction fix from waterwingz in http://chdk.setepontos.com/index.php?topic=650.msg85087#msg85087
d10 - add script led support (0=green, 1=orange, 2=AF)
add script LED support for ixus80_sd1100, from jourh in http://chdk.setepontos.com/index.php?topic=2044.msg85112#msg85112

Location:
branches/release-1_0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_0

  • branches/release-1_0/platform/d10/lib.c

    r977 r1841  
    4040} 
    4141 
    42 // TODO 
     42/* 
     43D10 has 3 led values 
     440/0 - Upper indicator Green 
     451/1 - Upper indicator Orange 
     462/9 - AF 
     4710-11 appears to also drive AF, but using the same codepath as non AF leds (no assert on invalid) 
     48note, LEDDrive returns 3 on invalid params otherwise 0 
     49second param 0 = solid on, 1 = off, 2-7 blink patterns 
     502: continuous ~1 blink/sec 
     513: continuous fast blink 
     524: continuous medium blink (2/sec ?)  
     535: burst of 3? fast blinks 
     546: continuous slow blinks 
     557: if led was off 1 very fast blink. depends on previous state 
     568: no obvious effect, but returns 0 for AF 
     57>8: If used with AF ASSERT!! LEDDrv.c Line 215, otherwise returns 3 
     58*/ 
    4359void camera_set_led(int led, int state, int bright) { 
     60 static char led_table[]={0,1,9}; 
     61 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state); 
    4462} 
    45  
    46  
  • branches/release-1_0/platform/g10/kbd.c

    r1344 r1841  
    427427 old_jogdial=new_jogdial; 
    428428 new_jogdial=Get_JogDial(); 
    429  if (old_jogdial>new_jogdial) return JOGDIAL_LEFT; 
    430  else if (old_jogdial<new_jogdial) return JOGDIAL_RIGHT; 
     429 if (old_jogdial<new_jogdial) return JOGDIAL_LEFT; 
     430 else if (old_jogdial>new_jogdial) return JOGDIAL_RIGHT; 
    431431 else return 0; 
    432432} 
  • branches/release-1_0/platform/ixus80_sd1100/lib.c

    r977 r1841  
    3131void camera_set_led(int led, int state, int bright) 
    3232{ 
    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 } 
     33    int leds[] = {0xd0,0x134,0x138,0x134,0x130,0xd4,0x3030,0x3030};  // power=3 | green | yellow | (not used) | orange | blue | af beam | timer 
     34    if(led >= 3 && led <= 10 && led != 6)  //  map to valid params;  no extra TIMER LED (is same as AF) 
     35    { 
     36        volatile long *p=(void*)0xc0220000 + leds[(led-3)%sizeof(leds)]; 
     37        if (state) 
     38            p[0]=0x46; 
     39        else 
     40            p[0]=0x44; 
     41    } 
     42}  
    4343 
    4444 
Note: See TracChangeset for help on using the changeset viewer.