diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-05-13 23:49:21 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-05-24 14:31:33 +0100 |
| commit | 3c4b5d42817944438c16fe6f1c70447ffc751110 (patch) | |
| tree | 7a8c50e63ffda480a91a86245bc6aba02c5b0587 /py | |
| parent | 968b7dd173d58d917c18dfa7706087db2abcfa6c (diff) | |
stmhal: Implement sys.std{in,out,err}.buffer, for raw byte mode.
It's configurable and only enabled for stmhal port.
Diffstat (limited to 'py')
| -rw-r--r-- | py/mpconfig.h | 5 | ||||
| -rw-r--r-- | py/qstrdefs.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 560fdce9c..5065e3682 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -594,6 +594,11 @@ typedef double mp_float_t; #define MICROPY_PY_SYS_STDFILES (0) #endif +// Whether to provide sys.{stdin,stdout,stderr}.buffer object +// This is implemented per-port +#ifndef MICROPY_PY_SYS_STDIO_BUFFER +#define MICROPY_PY_SYS_STDIO_BUFFER (0) +#endif // Extended modules diff --git a/py/qstrdefs.h b/py/qstrdefs.h index 4b5218eb5..2f51d470d 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -448,6 +448,9 @@ Q(platform) Q(stdin) Q(stdout) Q(stderr) +#if MICROPY_PY_SYS_STDIO_BUFFER +Q(buffer) +#endif Q(version) Q(version_info) #if MICROPY_PY_ATTRTUPLE |
