<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/docs/library, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>py/objexcept: Support errno attribute on OSError exceptions.</title>
<updated>2021-04-23T12:03:46+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-20T07:11:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3c4bfd1dec28ffbefc6379dedeaa24feaa2ef373'/>
<id>3c4bfd1dec28ffbefc6379dedeaa24feaa2ef373</id>
<content type='text'>
This commit adds the errno attribute to exceptions, so code can retrieve
errno codes from an OSError using exc.errno.

The implementation here simply lets `errno` (and the existing `value`)
attributes work on any exception instance (they both alias args[0]).  This
is for efficiency and to keep code size down.  The pros and cons of this
are:

Pros:
- more compatible with CPython, less difference to document and learn
- OSError().errno will correctly return None, whereas the current way of
  doing it via OSError().args[0] will raise an IndexError
- it reduces code size on most bare-metal ports (because they already have
  the errno qstr)
- for Python code that uses exc.errno the generated bytecode is 2 bytes
  smaller and more efficient to execute (compared with exc.args[0]); so
  bytecode loaded to RAM saves 2 bytes RAM for each use of this attribute,
  and bytecode that is frozen saves 2 bytes flash/ROM for each use
- it's easier/shorter to type, and saves 2 bytes of space in .py files that
  use it (for each use)

Cons:
- increases code size by 4-8 bytes on minimal ports that don't already have
  the `errno` qstr
- all exceptions now have .errno and .value attributes (a cpydiff test is
  added to address this)

See also #2407.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds the errno attribute to exceptions, so code can retrieve
errno codes from an OSError using exc.errno.

The implementation here simply lets `errno` (and the existing `value`)
attributes work on any exception instance (they both alias args[0]).  This
is for efficiency and to keep code size down.  The pros and cons of this
are:

Pros:
- more compatible with CPython, less difference to document and learn
- OSError().errno will correctly return None, whereas the current way of
  doing it via OSError().args[0] will raise an IndexError
- it reduces code size on most bare-metal ports (because they already have
  the errno qstr)
- for Python code that uses exc.errno the generated bytecode is 2 bytes
  smaller and more efficient to execute (compared with exc.args[0]); so
  bytecode loaded to RAM saves 2 bytes RAM for each use of this attribute,
  and bytecode that is frozen saves 2 bytes flash/ROM for each use
- it's easier/shorter to type, and saves 2 bytes of space in .py files that
  use it (for each use)

Cons:
- increases code size by 4-8 bytes on minimal ports that don't already have
  the `errno` qstr
- all exceptions now have .errno and .value attributes (a cpydiff test is
  added to address this)

See also #2407.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>esp32: Add basic support for Non-Volatile-Storage in esp32 module.</title>
<updated>2021-02-19T04:05:19+00:00</updated>
<author>
<name>Thorsten von Eicken</name>
</author>
<published>2021-01-18T09:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=c10d431819f9f7095c3573c98f01c98526a2cb0b'/>
<id>c10d431819f9f7095c3573c98f01c98526a2cb0b</id>
<content type='text'>
This commit implements basic NVS support for the esp32.  It follows the
pattern of the esp32.Partition class and exposes an NVS object per NVS
namespace.  The initial support provided is only for signed 32-bit integers
and binary blobs.  It's easy (albeit a bit tedious) to add support for
more types.

See discussions in: #4436, #4707, #6780
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit implements basic NVS support for the esp32.  It follows the
pattern of the esp32.Partition class and exposes an NVS object per NVS
namespace.  The initial support provided is only for signed 32-bit integers
and binary blobs.  It's easy (albeit a bit tedious) to add support for
more types.

See discussions in: #4436, #4707, #6780
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/modussl: Fix ussl read/recv/send/write errors when non-blocking.</title>
<updated>2021-02-17T00:50:54+00:00</updated>
<author>
<name>Thorsten von Eicken</name>
</author>
<published>2020-04-02T17:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=2c1299b0071c2c528cc01e3cde9eb22743820176'/>
<id>2c1299b0071c2c528cc01e3cde9eb22743820176</id>
<content type='text'>
Also fix related problems with socket on esp32, improve docs for
wrap_socket, and add more tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fix related problems with socket on esp32, improve docs for
wrap_socket, and add more tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>docs/library/uasyncio.rst: Add docs for ThreadSafeFlag.</title>
<updated>2021-02-16T05:35:37+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2021-02-15T06:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=cdf9c8648f81dd4f2795a71b075aab75f01a9f1f'/>
<id>cdf9c8648f81dd4f2795a71b075aab75f01a9f1f</id>
<content type='text'>
Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/uasyncio: Add asyncio.current_task().</title>
<updated>2021-02-13T04:11:17+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2021-02-12T03:11:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=7ed99544e4cc1c09bd5abf9f54869c3122fa033b'/>
<id>7ed99544e4cc1c09bd5abf9f54869c3122fa033b</id>
<content type='text'>
Matches CPython behavior.

Fixes #6686
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Matches CPython behavior.

Fixes #6686
</pre>
</div>
</content>
</entry>
<entry>
<title>docs/library/machine.Pin.rst: Make it clear which methods are not core.</title>
<updated>2021-02-02T13:54:18+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-02-01T02:40:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0e4458707673bdf04a812ab9cd2ae06712bcdd1a'/>
<id>0e4458707673bdf04a812ab9cd2ae06712bcdd1a</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs,stm32: Fix minor typos in RTC docs, and-&gt;an.</title>
<updated>2021-01-30T03:13:30+00:00</updated>
<author>
<name>Andrew Scheller</name>
</author>
<published>2021-01-19T09:22:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=499e199addacd3777244c61cc4c3b4efdfa9b300'/>
<id>499e199addacd3777244c61cc4c3b4efdfa9b300</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/pyb_can: Add ability to calculate CAN bit timing from baudrate.</title>
<updated>2020-12-17T12:01:15+00:00</updated>
<author>
<name>iabdalkader</name>
</author>
<published>2020-12-06T18:28:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=20f8ce19825d1a976f8d61e79e661e67509681bd'/>
<id>20f8ce19825d1a976f8d61e79e661e67509681bd</id>
<content type='text'>
Calculate the bit timing from baudrate if provided, allowing sample point
override.  This makes it a lot easier to make CAN work between different
MCUs with different clocks, prescalers etc.

Tested on F4, F7 and H7 Y/V variants.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calculate the bit timing from baudrate if provided, allowing sample point
override.  This makes it a lot easier to make CAN work between different
MCUs with different clocks, prescalers etc.

Tested on F4, F7 and H7 Y/V variants.
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/modubinascii: Update code, docs for hexlify now CPython has sep.</title>
<updated>2020-12-14T03:35:29+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-12-13T05:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=1719459c28138be009c8dd41f0e6cb3b942eb2dd'/>
<id>1719459c28138be009c8dd41f0e6cb3b942eb2dd</id>
<content type='text'>
Since CPython 3.8 the optional "sep" argument to hexlify is officially
supported, so update comments in the code and the docs to reflect this.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since CPython 3.8 the optional "sep" argument to hexlify is officially
supported, so update comments in the code and the docs to reflect this.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs/library/ubluetooth.rst: Add passkey docs.</title>
<updated>2020-12-02T03:44:36+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2020-11-26T13:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=68136eb4babeafa26de1e06565fcf69e8f10d136'/>
<id>68136eb4babeafa26de1e06565fcf69e8f10d136</id>
<content type='text'>
Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
