这是partition.csv
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 2048k,
storage, data, spiffs, , 1024k,
下面的代码,他想显示图片,他是怎么知道卷标号是 S 的
static void btn_event_cb(lv_event_t *event)
{
lv_obj_t *img = (lv_obj_t *) event->user_data;
const char *file_name = lv_list_get_btn_text(lv_obj_get_parent(event->target), event->target);
char *file_name_with_path = (char *) heap_caps_malloc(256, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
if (NULL != file_name_with_path) {
/* Get full file name with mount point and folder path */
strcpy(file_name_with_path, "S:/spiffs/");
strcat(file_name_with_path, file_name);
/* Set src of image with file name */
lv_img_set_src(img, file_name_with_path);
//ESP_LOGI(TAG, "image object size : %s", sizeof(img));
/* Align object */
lv_obj_align(img, LV_ALIGN_CENTER, 80, 0);
/* Only for debug */
ESP_LOGI(TAG, "Display image file : %s", file_name_with_path);
/* Don't forget to free allocated memory */
free(file_name_with_path);
}
}
如何确定分区的卷标号
Re: 如何确定分区的卷标号
这是调用 esp_vfs_spiffs_register() 函数时设置的
Who is online
Users browsing this forum: No registered users and 9 guests