if (!uapi_is_lcd_connect()) {
return;
}
-
+
#ifdef ENABLE_UIKIT
InitGraphicService();
#endif
#ifdef SUPPORT_POWER_MANAGER
const power_display_svr_api_t *display_api = power_display_svr_get_api();
display_api->turn_on_screen();
- display_api->set_screen_set_keepon_timeout(15000);
+ display_api->set_screen_set_keepon_timeout(25000);
#endif
#if defined(CONFIG_OTA_UPDATE_SUPPORT) && defined(ENABLE_UIKIT)
if (upg_check_upgrade_need_upgrade())
- {
- boot_animation_init();
+ {
ShowGraphicOTALogo();
}else{
- boot_animation_init();
+
ShowGraphicLogo();
}
#else
-#ifdef ENABLE_UIKIT
- boot_animation_init();
+#ifdef ENABLE_UIKIT
ShowGraphicLogo();
#endif
#endif
+#ifdef ENABLE_UIKIT
+ boot_animation_init();
+#endif
+
+
#ifdef CFG_DRIVERS_NANDFLASH
//为了加速启动,把最耗时的mount分区放到显示log之后
mount_user_res_partition();
#endif
+
+wait_animation_stop();
+
#if defined(CONFIG_OTA_UPDATE_SUPPORT) && defined(ENABLE_UIKIT)
//如果在升级状态,则不进入系统
if (upg_check_upgrade_need_upgrade()) return ;
}
}
-#define MAG_BOARD_TASK_SIZE 0x900
+#define MAG_BOARD_TASK_SIZE 0x1000
errcode_t uapi_mag_service_init(void)
{
for(int i = 0; i < len; i++)
PRINT("read_data[%d] : %d \r\n",i,readdata[i]);
+}
+
+errcode_t custom_i2c_test(void)
+{
+ uint8_t ppg_id = 0;
+ unsigned char mmc_id = 0;
+ uint8_t cywee_id = 0;
+
+ uapi_ppg_get_id(&ppg_id);
+ if(ppg_id != 0x65)
+ return ERRCODE_FAIL;
+
+ mmc5603_getid(&mmc_id);
+ if(mmc_id != 0X10)
+ return ERRCODE_FAIL;
+
+ uapi_cywee_get_id(&cywee_id);
+ if(cywee_id != 0X44)
+ return ERRCODE_FAIL;
+
+ return ERRCODE_SUCC;
}
\ No newline at end of file
errcode_t custom_i2c_write_reg(uint16_t slaveAddr, uint16_t reg, int regLength, uint8_t *writeData, int writeDataSize, int busIndex);
errcode_t custom_i2c_read_regs(uint16_t slaveAddr, uint16_t reg, int regLength, uint8_t *readData, int readDataSize, int busIndex);
errcode_t custom_i2c_transfer(uint16_t slaveAddr, uint16_t reg, int regLength, uint8_t *writeData, int writeDataSize, uint8_t *readData, int readDataSize, int busIndex);
+errcode_t custom_i2c_test(void);
uint32_t custom_i2c_suspend(void);
uint32_t custom_i2c_resume(void);
ClearAll();
+ //boot_group->SetVisible(false);
+ OHOS::RootView::GetInstance()->Remove(boot_group);
+ delete boot_group;
+ boot_group = nullptr;
+
+
+
errcode_t ret = uapi_terminate_thread(taskcfg.task_handle);
if(ret != ERRCODE_SUCC)
else
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"kill boot_animation_task succed !");
- //boot_group->SetVisible(false);
- OHOS::RootView::GetInstance()->Remove(boot_group);
- delete boot_group;
- boot_group = nullptr;
+ if(taskcfg.attr.stack_mem != NULL)
+ {
+ free(taskcfg.attr.stack_mem);
+ taskcfg.attr.stack_mem = NULL;
+ }
+ if(taskcfg.task_handle != NULL)
+ taskcfg.task_handle = NULL;
}
};
}
-void ShowGraphicLogo(void)
+void wait_animation_stop(void)
{
while(boot_animation_flag == false)
{
- LOS_Mdelay(1);
+ LOS_Msleep(1000);
}
+}
+
+void ShowGraphicLogo(void)
+{
if (g_showLogo) {
return;
}
OHOS::RootView::GetInstance()->Invalidate();
},
false);
-
+ //LOS_Msleep(1000);
}
void ShowGraphicOTALogo(void)
{
- while(boot_animation_flag == false)
- {
- LOS_Mdelay(1);
- }
+
if (g_showOtaLogo) {
return;
}
OHOS::RootView::GetInstance()->Invalidate();
},
false);
+ //LOS_Msleep(1000);
}
void boot_animation_init(void)
taskcfg.task_handle = g_boot_animation_task_handle;
taskcfg.attr.name="boot_animation_service";
- taskcfg.attr.priority = TASK_PRIORITY_SDK;
+ taskcfg.attr.priority = TASK_PRIORITY_APP;
taskcfg.attr.stack_size = 0x1000;
taskcfg.func = boot_animation_task;
taskcfg.use_mem = USE_EXTEND_MEM;