diff options
Diffstat (limited to 'py/stream.h')
-rw-r--r-- | py/stream.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/stream.h b/py/stream.h index 0471777c76..2354fd3c0f 100644 --- a/py/stream.h +++ b/py/stream.h @@ -49,6 +49,9 @@ mp_obj_t mp_stream_unbuffered_iter(mp_obj_t self); mp_obj_t mp_stream_write(mp_obj_t self_in, const void *buf, size_t len); +// Helper function to write entire buf to *blocking* stream +mp_uint_t mp_stream_writeall(mp_obj_t stream, const byte *buf, mp_uint_t size, int *errcode); + #if MICROPY_STREAMS_NON_BLOCK // TODO: This is POSIX-specific (but then POSIX is the only real thing, // and anything else just emulates it, right?) |