extmod/vfs_reader: Add file ioctl to set read buffer size.

Can be used to speed up importing a file from a vfs based filesystem.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
This commit is contained in:
Andrew Leech
2023-10-31 15:14:05 +11:00
committed by Damien George
parent dff293840e
commit 4cf741062b
4 changed files with 69 additions and 16 deletions

View File

@@ -43,6 +43,7 @@
#define MP_STREAM_GET_DATA_OPTS (8) // Get data/message options
#define MP_STREAM_SET_DATA_OPTS (9) // Set data/message options
#define MP_STREAM_GET_FILENO (10) // Get fileno of underlying file
#define MP_STREAM_GET_BUFFER_SIZE (11) // Get preferred buffer size for file
// These poll ioctl values are compatible with Linux
#define MP_STREAM_POLL_RD (0x0001)