|
|
@@ -30,6 +30,9 @@ const uint16_t system_tips_pad_top = 46;
|
|
|
const uint8_t system_tips_btn_x = 100;
|
|
|
const int8_t system_tips_btn_y = -40;
|
|
|
|
|
|
+extern uint32_t flash_read(const char *name, uint32_t offset, void *data, uint32_t size);
|
|
|
+extern uint32_t flash_erase(const char *name); // 擦除Flash
|
|
|
+
|
|
|
static const void* loading_img[LOADING_IMG_CNT] =
|
|
|
{
|
|
|
&IMG_SCENE_WIDGET_PIC_0,
|
|
|
@@ -60,6 +63,8 @@ static const void* loading_img[LOADING_IMG_CNT] =
|
|
|
|
|
|
static void btn_click_cb(lv_obj_t *btn)
|
|
|
{
|
|
|
+ uint8_t photo_data_size_buff[3] = {0};
|
|
|
+
|
|
|
if (btn == s_ui->cancel)
|
|
|
{
|
|
|
aem_app_goback();
|
|
|
@@ -88,6 +93,10 @@ static void btn_click_cb(lv_obj_t *btn)
|
|
|
}
|
|
|
case AEM_RESET:
|
|
|
{
|
|
|
+ if (flash_read("profile_photo_name", 0, photo_data_size_buff, 3) == 0) //if can read photo name, then erase it
|
|
|
+ {
|
|
|
+ flash_erase("profile_photo_name");
|
|
|
+ }
|
|
|
on_off.type = AEM_POWER_OFF_RETURN_FACTORY;
|
|
|
aem_power_off_main(&on_off);
|
|
|
break;
|