micropython/ports
Damien George cf31d384f1 py/stream: Switch stream close operation from method to ioctl.
This patch moves the implementation of stream closure from a dedicated
method to the ioctl of the stream protocol, for each type that implements
closing.  The benefits of this are:

1. Rounds out the stream ioctl function, which already includes flush,
   seek and poll (among other things).

2. Makes calling mp_stream_close() on an object slightly more efficient
   because it now no longer needs to lookup the close method and call it,
   rather it just delegates straight to the ioctl function (if it exists).

3. Reduces code size and allows future types that implement the stream
   protocol to be smaller because they don't need a dedicated close method.

Code size reduction is around 200 bytes smaller for x86 archs and around
30 bytes smaller for the bare-metal archs.
2018-04-10 13:41:32 +10:00
..
bare-arm ports/{bare-arm,minimal}/Makefile: Only build with core source files. 2018-02-22 12:48:51 +11:00
cc3200 py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
esp32 py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
esp8266 esp8266/esp_mphal.h: Fix I2C glitching by using input mode for od_high. 2018-03-12 12:45:09 +11:00
minimal minimal/Makefile: Explicitly include lib/utils/printf.c in build. 2018-02-22 13:19:09 +11:00
pic16bit all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
qemu-arm qemu-arm/test_main: Include setjmp.h because it's used by gc_collect. 2017-12-20 15:42:06 +11:00
stm32 py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
teensy teensy: Update GPIO speed consts to align with changes in stm32 port. 2018-02-14 10:52:45 +11:00
unix py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
windows ports: Enable ucollections.deque on relevant ports. 2018-02-21 22:55:13 +11:00
zephyr py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00