コード例 #1
0
ファイル: wrappers.c プロジェクト: BioDesignRealWorld/CHDK
void camera_set_led(int led, int state, int bright)
{
        // 0 gr  
        // 1 orange 
        // 2 yel 
        // 8 dp  
        // 9 af  

  int leds[] = {0,2,8,1,8,9};
  if(led < 4 || led > 9 || led == 6) return;
  _LEDDrive(leds[led-4], state<=1 ? !state : state);
} 
コード例 #2
0
ファイル: lib.c プロジェクト: c10ud/CHDK
void camera_set_led(int led, int state, int bright) {
    static char led_table[]={0,4}; // status, AF
    _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
}
コード例 #3
0
ファイル: lib.c プロジェクト: c10ud/CHDK
// powershot N has one LED - on the power button - and a focus assist / camera lamp on the front of the camera
void camera_set_led(int led, int state, int bright)
{
    static char led_table[3]={0,6,11};  // 0=green power button LED, 6=focus assist lamp (dim), 11=flash LED (bright)
    _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
}
コード例 #4
0
ファイル: lib.c プロジェクト: c10ud/CHDK
// SX160 IS has two 'lights' - Power LED, and AF assist lamp
// Power Led = first entry in table (led 0)
// AF Assist Lamp = second entry in table (led 1)
void camera_set_led(int led, int state, int bright) {
    static char led_table[2]={0,4};
    if(state<=1) _LEDDrive(led_table[led%sizeof(led_table)], (!state)&1);
}