Lines Matching refs:btr
132 static lv_fs_res_t lv_fs_read_cached(lv_fs_file_t * file_p, char * buf, uint32_t btr, uint32_t * br) in lv_fs_read_cached() argument
146 if(btr <= buffer_remaining_length) { in lv_fs_read_cached()
148 lv_memcpy(buf, buffer + buffer_offset, btr); in lv_fs_read_cached()
149 *br = btr; in lv_fs_read_cached()
156 if(btr > buffer_size) { in lv_fs_read_cached()
159 btr - buffer_remaining_length, &bytes_read_to_buffer); in lv_fs_read_cached()
167 … uint16_t data_chunk_remaining = LV_MIN(btr - buffer_remaining_length, bytes_read_to_buffer); in lv_fs_read_cached()
170 *br = LV_MIN(buffer_remaining_length + bytes_read_to_buffer, btr); in lv_fs_read_cached()
175 if(btr > buffer_size) { in lv_fs_read_cached()
177 res = file_p->drv->read_cb(file_p->drv, file_p->file_d, (void *)buf, btr, br); in lv_fs_read_cached()
192 *br = LV_MIN(btr, bytes_read_to_buffer); in lv_fs_read_cached()
205 lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br) in lv_fs_read() argument
215 res = lv_fs_read_cached(file_p, (char *)buf, btr, &br_tmp); in lv_fs_read()
218 res = file_p->drv->read_cb(file_p->drv, file_p->file_d, buf, btr, &br_tmp); in lv_fs_read()