Skip to content
Snippets Groups Projects
Commit ae831ec0 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

docs/library/micropython: Deconditionalize.

parent 61616e84
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,16 @@ ...@@ -7,7 +7,16 @@
Functions Functions
--------- ---------
.. only:: port_pyboard or port_unix .. function:: alloc_emergency_exception_buf(size)
Allocate ``size`` bytes of RAM for the emergency exception buffer (a good
size is around 100 bytes). The buffer is used to create exceptions in cases
when normal RAM allocation would fail (eg within an interrupt handler) and
therefore give useful traceback information in these situations.
A good way to use this function is to put it at the start of your main script
(eg boot.py or main.py) and then the emergency exception buffer will be active
for all the code following it.
.. function:: mem_info([verbose]) .. function:: mem_info([verbose])
...@@ -26,14 +35,3 @@ Functions ...@@ -26,14 +35,3 @@ Functions
The information that is printed is implementation dependent, but currently The information that is printed is implementation dependent, but currently
includes the number of interned strings and the amount of RAM they use. In includes the number of interned strings and the amount of RAM they use. In
verbose mode it prints out the names of all RAM-interned strings. verbose mode it prints out the names of all RAM-interned strings.
.. function:: alloc_emergency_exception_buf(size)
Allocate ``size`` bytes of RAM for the emergency exception buffer (a good
size is around 100 bytes). The buffer is used to create exceptions in cases
when normal RAM allocation would fail (eg within an interrupt handler) and
therefore give useful traceback information in these situations.
A good way to use this function is to put it at the start of your main script
(eg boot.py or main.py) and then the emergency exception buffer will be active
for all the code following it.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment