Lines Matching defs:blk
130 __block_read_n(uint8_t *buf, int blk, int count)
135 vol = __block2volume(blk);
141 cnt = __next_block(vol) - blk;
145 if (!sector_read_n(0, buf, __volume_offset(blk), cnt))
148 blk += cnt;
156 __block_read(uint8_t *buf, int blk)
160 vol = __block2volume(blk);
167 return sector_read(0, buf, __volume_offset(blk));
197 __block2volume(int blk)
200 if (blk < __volume.max_block)
203 blk -= __volume.max_block;
205 return (blk / (__volume.max_block - 16)) + 1;
209 __volume_offset(int blk)
212 if (blk < __volume.max_block)
213 return blk;
215 blk -= __volume.max_block;
217 return blk % (__volume.max_block - 16) + 16;