|
发表于 2020-8-8 12:20:17
6813 浏览 0 回复
MTK关于正常开机以及插入USB对LED三色灯的修改
在platform.c当中void platform_init(void);
进行了一系列的初始化;
包括对开机模式的判断:
g_boot_mode
正常开机:0
typedef enum {
= 0,
META_BOOT = 1,
RECOVERY_BOOT = 2,
SW_REBOOT = 3,
FACTORY_BOOT = 4,
ADVMETA_BOOT = 5,
ATE_FACTORY_BOOT = 6,
ALARM_BOOT = 7,
#if defined (MTK_KERNEL_POWNORMAL_BOOTER_OFF_CHARGING)
KERNEL_POWER_OFF_CHARGING_BOOT = 8,
LOW_POWER_OFF_CHARGING_BOOT = 9,
#endif
FASTBOOT = 99,
DOWNLOAD_BOOT = 100,
UNKNOWN_BOOT
} BOOTMODE;
插入USB充电
upmu_is_chr_det() == KAL_TRUE
否则:upmu_is_chr_det() == KAL_TRUE
在 boot_mode_select();
之后:
printf(" g_boot_mode:%d \n\r",g_boot_mode);
if(g_boot_mode == NORMAL_BOOT && upmu_is_chr_det() == KAL_FALSE)
{
mt6370_pmu_led_brightness_set(0,127);
}else if(g_boot_mode !=NORMAL_BOOT && upmu_is_chr_det() == KAL_TRUE)
{
printf(" LED IS NOT SET !! \n\r");
}else if(g_boot_mode == NORMAL_BOOT && upmu_is_chr_det() == KAL_TRUE)
{
mt6370_pmu_led_brightness_set(0,127);
}
可以设置开机模式的亮灯状态。
|
|
|
|
|
|
|
登录或注册
|