static void aw2013_white_enable(u8 type,u8 enable,u8 breath,u8 ratio) { if((type >= TYPE_MIN) && (type < TYPE_MAX)) { spin_lock(&led_lock); led_state[type].breath = (breath>0)?1:0; led_state[type].r = 1; led_state[type].r_ratio = MAX(MIN(ratio,3),0); led_state[type].g = 1; led_state[type].g_ratio = MAX(MIN(ratio,3),0); led_state[type].b = 1; led_state[type].b_ratio = MAX(MIN(ratio,3),0); led_state[type].rise_time = AW2013_LED_TIME_0_52S; led_state[type].hold_time = AW2013_LED_TIME_1_04S; led_state[type].fall_time = AW2013_LED_TIME_0_52S; led_state[type].off_time = AW2013_LED_TIME_1_04S; led_state[type].delay_time = AW2013_LED_DELAY_TIME_0S; led_state[type].period_num = AW2013_LED_REPEAT_ALWAYS; /* always */ spin_unlock(&led_lock); enable = (enable > 0)? 1:0; led_power_on(type,enable); // power on / off led . } }
int aw2013_power_on_standby(int enable, int press_time) { if( keyhome_standby_breathled_enabled == 0 )enable = 0; led_power_on(TYPE_STANDBY, enable); }
static void system_init(void) { delay_init(); led_init(); beep_init(); key_init(); uart_init(); lcd_init(); sram_init(); time_init(); flash_inside_init(); flash_outside_init(); led_power_on(); lcd_on(); }
static ssize_t led_enable_store(struct device_driver *ddri, const char *buf, size_t count) { u8 type = 0; u8 enable = 0; if(2 == sscanf(buf, "%d %d", &type,&enable)) { if((type >= TYPE_MIN) && (type < TYPE_MAX)) { enable = (enable > 0)? 1:0; led_power_on(type,enable); // power on / off led . } } return count; }
void ui_wakeup(void) { LED_On(LED0_GPIO); led_power_on(); }
void ui_wakeup(void) { backlight_start_pwm(); adc_enable(&LIGHT_SENSOR_ADC_MODULE); led_power_on(); }