diff options
Diffstat (limited to 'docs/library')
-rw-r--r-- | docs/library/esp32.rst | 8 | ||||
-rw-r--r-- | docs/library/framebuf.rst | 12 | ||||
-rw-r--r-- | docs/library/machine.UART.rst | 3 | ||||
-rw-r--r-- | docs/library/socket.rst | 10 |
4 files changed, 30 insertions, 3 deletions
diff --git a/docs/library/esp32.rst b/docs/library/esp32.rst index 24831c58d6..4be6dc2671 100644 --- a/docs/library/esp32.rst +++ b/docs/library/esp32.rst @@ -18,23 +18,31 @@ Functions Configure whether or not a touch will wake the device from sleep. *wake* should be a boolean value. + .. note:: This is only available for boards that have touch sensor support. + .. function:: wake_on_ulp(wake) Configure whether or not the Ultra-Low-Power co-processor can wake the device from sleep. *wake* should be a boolean value. + .. note:: This is only available for boards that have ULP coprocessor support. + .. function:: wake_on_ext0(pin, level) Configure how EXT0 wakes the device from sleep. *pin* can be ``None`` or a valid Pin object. *level* should be ``esp32.WAKEUP_ALL_LOW`` or ``esp32.WAKEUP_ANY_HIGH``. + .. note:: This is only available for boards that have ext0 support. + .. function:: wake_on_ext1(pins, level) Configure how EXT1 wakes the device from sleep. *pins* can be ``None`` or a tuple/list of valid Pin objects. *level* should be ``esp32.WAKEUP_ALL_LOW`` or ``esp32.WAKEUP_ANY_HIGH``. + .. note:: This is only available for boards that have ext1 support. + .. function:: gpio_deep_sleep_hold(enable) Configure whether non-RTC GPIO pin configuration is retained during diff --git a/docs/library/framebuf.rst b/docs/library/framebuf.rst index f22a3613bd..e2a231207d 100644 --- a/docs/library/framebuf.rst +++ b/docs/library/framebuf.rst @@ -137,6 +137,18 @@ Other methods is compared to the value from *palette*, not to the value directly from *fbuf*.) + *fbuf* can be another FrameBuffer instance, or a tuple or list of the form:: + + (buffer, width, height, format) + + or:: + + (buffer, width, height, format, stride) + + This matches the signature of the FrameBuffer constructor, and the elements + of the tuple/list are the same as the arguments to the constructor except that + the *buffer* here can be read-only. + The *palette* argument enables blitting between FrameBuffers with differing formats. Typical usage is to render a monochrome or grayscale glyph/icon to a color display. The *palette* is a FrameBuffer instance whose format is diff --git a/docs/library/machine.UART.rst b/docs/library/machine.UART.rst index 5be79cccce..fbad3fc592 100644 --- a/docs/library/machine.UART.rst +++ b/docs/library/machine.UART.rst @@ -224,7 +224,8 @@ Methods .. note:: - - The ESP32 port does not support the option hard=True. + - The ESP32 port does not support the option hard=True. It uses Timer(0) + for UART.IRQ_RXIDLE, so this timer cannot be used for other means. - The rp2 port's UART.IRQ_TXIDLE is only triggered when the message is longer than 5 characters and the trigger happens when still 5 characters diff --git a/docs/library/socket.rst b/docs/library/socket.rst index 944e7e631a..38e0aab704 100644 --- a/docs/library/socket.rst +++ b/docs/library/socket.rst @@ -227,22 +227,28 @@ Methods has the same "no short writes" policy for blocking sockets, and will return number of bytes sent on non-blocking sockets. -.. method:: socket.recv(bufsize) +.. method:: socket.recv(bufsize, [flags]) Receive data from the socket. The return value is a bytes object representing the data received. The maximum amount of data to be received at once is specified by bufsize. + Most ports support the optional *flags* argument. Available *flags* are defined as constants + in the socket module and have the same meaning as in CPython. ``MSG_PEEK`` and ``MSG_DONTWAIT`` + are supported on all ports which accept the *flags* argument. + .. method:: socket.sendto(bytes, address) Send data to the socket. The socket should not be connected to a remote socket, since the destination socket is specified by *address*. -.. method:: socket.recvfrom(bufsize) +.. method:: socket.recvfrom(bufsize, [flags]) Receive data from the socket. The return value is a pair *(bytes, address)* where *bytes* is a bytes object representing the data received and *address* is the address of the socket sending the data. + See the `recv` function for an explanation of the optional *flags* argument. + .. method:: socket.setsockopt(level, optname, value) Set the value of the given socket option. The needed symbolic constants are defined in the |