mirror of
https://github.com/pellepl/spiffs.git
synced 2026-09-02 15:20:03 +00:00
@@ -2030,7 +2030,7 @@ s32_t spiffs_object_read(
|
||||
// remaining data in page
|
||||
len_to_read = MIN(len_to_read, SPIFFS_DATA_PAGE_SIZE(fs) - (cur_offset % SPIFFS_DATA_PAGE_SIZE(fs)));
|
||||
// remaining data in file
|
||||
len_to_read = MIN(len_to_read, fd->size);
|
||||
len_to_read = MIN(len_to_read, fd->size - cur_offset);
|
||||
SPIFFS_DBG("read: offset:"_SPIPRIi" rd:"_SPIPRIi" data spix:"_SPIPRIsp" is data_pix:"_SPIPRIpg" addr:"_SPIPRIad"\n", cur_offset, len_to_read, data_spix, data_pix,
|
||||
(u32_t)(SPIFFS_PAGE_TO_PADDR(fs, data_pix) + sizeof(spiffs_page_header) + (cur_offset % SPIFFS_DATA_PAGE_SIZE(fs))));
|
||||
if (len_to_read <= 0) {
|
||||
|
||||
@@ -32,7 +32,7 @@ static unsigned char *_area = NULL;
|
||||
static u32_t addr_offset = 0;
|
||||
|
||||
static int *_erases;
|
||||
static char _path[256];
|
||||
static char _path[255+32];
|
||||
static u32_t bytes_rd = 0;
|
||||
static u32_t bytes_wr = 0;
|
||||
static u32_t reads = 0;
|
||||
|
||||
Reference in New Issue
Block a user