LOCAL uint32_t _ov7675_Power_On(uint32_t power_on)
{
    SENSOR_AVDD_VAL_E		dvdd_val=g_OV7675_yuv_info.dvdd_val;
    SENSOR_AVDD_VAL_E		avdd_val=g_OV7675_yuv_info.avdd_val;
    SENSOR_AVDD_VAL_E		iovdd_val=g_OV7675_yuv_info.iovdd_val;
//    BOOLEAN 				power_down=g_OV7675_yuv_info.power_down_level;
    BOOLEAN 				reset_level=g_OV7675_yuv_info.reset_pulse_level;
    uint32_t 				reset_width=g_OV7675_yuv_info.reset_pulse_width;

    if(1==power_on)
    {
        Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val);
 //       GPIO_SetSensorPower(TRUE);
  //      GPIO_SetFrontSensorPwdn((BOOLEAN)!power_down);

        // Open Mclk in default frequency
        Sensor_SetMCLK(SENSOR_DEFALUT_MCLK);

        SENSOR_Sleep(20);
        Sensor_SetResetLevel(reset_level);
        SENSOR_Sleep(reset_width);
        Sensor_SetResetLevel((BOOLEAN)!reset_level);
        SENSOR_Sleep(100);
    }
    else
    {
//        GPIO_SetFrontSensorPwdn(power_down);

        Sensor_SetMCLK(SENSOR_DISABLE_MCLK);
//        GPIO_SetSensorPower(FALSE);
        Sensor_SetVoltage(SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED);
    }

    SENSOR_TRACE("SENSOR: _ov7675_Power_On(1:on, 0:off): %d", power_on);

    return 0;
}
LOCAL uint32_t _OV7690_Power_On(uint32_t power_on)
{
    SENSOR_AVDD_VAL_E		dvdd_val=g_OV7690_yuv_info.dvdd_val;
    SENSOR_AVDD_VAL_E		avdd_val=g_OV7690_yuv_info.avdd_val;
    SENSOR_AVDD_VAL_E		iovdd_val=g_OV7690_yuv_info.iovdd_val;  
    BOOLEAN 				power_down=g_OV7690_yuv_info.power_down_level;	    
    BOOLEAN 				reset_level=g_OV7690_yuv_info.reset_pulse_level;
    uint32_t 				reset_width=g_OV7690_yuv_info.reset_pulse_width;	    
    
    if(DCAM_TRUE==power_on)
    {
        Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val);
        
        Sensor_PowerDown(!power_down);

        // Open Mclk in default frequency
        Sensor_SetMCLK(SENSOR_DEFALUT_MCLK);   
        
        DCAM_Sleep(20);
        Sensor_SetResetLevel(reset_level);
        DCAM_Sleep(reset_width);
        Sensor_SetResetLevel(!reset_level);
        DCAM_Sleep(100);
    }
    else
    {
        Sensor_PowerDown(power_down);

        Sensor_SetMCLK(SENSOR_DISABLE_MCLK);           

        Sensor_SetVoltage(SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED);        
    }

    SENSOR_TRACE("SENSOR: _OV7690_Power_On(1:on, 0:off): %d", power_on);    
    
    return DCAM_SUCCESS;
}