| 84 | } |
| 85 | |
| 86 | uint16_t FileStream::readMemoryBlock(char* data, int bufSize) |
| 87 | { |
| 88 | GET_FS(0) |
| 89 | |
| 90 | assert(bufSize >= 0); |
| 91 | size_t startPos = pos; |
| 92 | size_t count = readBytes(data, bufSize); |
| 93 | |
| 94 | // Move cursor back to start position |
| 95 | (void)fs->lseek(handle, startPos, SeekOrigin::Start); |
| 96 | pos = startPos; |
| 97 | |
| 98 | return count; |
| 99 | } |
| 100 | |
| 101 | size_t FileStream::write(const uint8_t* buffer, size_t size) |
| 102 | { |