Skip to content

Commit c13b2f2

Browse files
peterhinchdpgeorge
authored andcommitted
docs: Several minor changes: network, pyb, ADCAll and inline asm.
1 parent 22d85ec commit c13b2f2

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

docs/library/network.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
This module provides network drivers and routing configuration. Network
99
drivers for specific hardware are available within this module and are
1010
used to configure a hardware network interface. Configured interfaces
11-
are then available for use via the :mod:`socket` module.
11+
are then available for use via the :mod:`socket` module. To use this module
12+
the network build of firmware must be installed.
1213

1314
For example::
1415

docs/library/pyb.ADC.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,9 @@ Methods
7474

7575
This function does not allocate any memory.
7676

77+
The ADCAll Object
78+
-----------------
79+
80+
Instantiating this changes all ADC pins to analog inputs. It is possible to read the
81+
MCU temperature, VREF and VBAT without using ADCAll. The raw data can be accessed on
82+
ADC channels 16, 17 and 18 respectively. However appropriate scaling will need to be applied.

docs/library/pyb.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Time related functions
2525
after 2^30 milliseconds (about 12.4 days) this will start to return
2626
negative numbers.
2727

28+
Note that if :meth:`pyb.stop()` is issued the hardware counter supporting this
29+
function will pause for the duration of the "sleeping" state. This
30+
will affect the outcome of :meth:`pyb.elapsed_millis()`.
31+
2832
.. function:: micros()
2933

3034
Returns the number of microseconds since the board was last reset.
@@ -33,6 +37,10 @@ Time related functions
3337
after 2^30 microseconds (about 17.8 minutes) this will start to return
3438
negative numbers.
3539

40+
Note that if :meth:`pyb.stop()` is issued the hardware counter supporting this
41+
function will pause for the duration of the "sleeping" state. This
42+
will affect the outcome of :meth:`pyb.elapsed_micros()`.
43+
3644
.. function:: elapsed_millis(start)
3745

3846
Returns the number of milliseconds which have elapsed since ``start``.

docs/reference/asm_thumb2_hints_tips.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ three arguments, which must (if used) be named ``r0``, ``r1`` and ``r2``. When
7878
the code executes the registers will be initialised to those values.
7979

8080
The data types which can be passed in this way are integers and memory
81-
addresses. Further, integers are restricted in that the top two bits
82-
must be identical, limiting the range to -2**30 to 2**30 -1. Return
83-
values are similarly limited. These limitations can be overcome by means
84-
of the ``array`` module to allow any number of values of any type to
85-
be accessed.
81+
addresses. With current firmware all possible 32 bit values may be passed.
82+
Returned integers are restricted in that the top two bits must be identical,
83+
limiting the range to -2**30 to 2**30 -1. The limitations on number of arguments
84+
and return values can be overcome by means of the ``array`` module which enables
85+
any number of values of any type to be accessed.
8686

8787
Multiple arguments
8888
~~~~~~~~~~~~~~~~~~

docs/reference/asm_thumb2_misc.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Miscellaneous instructions
55
* wfi() Suspend execution in a low power state until an interrupt occurs.
66
* cpsid(flags) set the Priority Mask Register - disable interrupts.
77
* cpsie(flags) clear the Priority Mask Register - enable interrupts.
8+
* mrs(Rd, special_reg) ``Rd = special_reg`` copy a special register to a general register. The special register
9+
may be IPSR (Interrupt Status Register) or BASEPRI (Base Priority Register). The IPSR provides a means of determining
10+
the exception number of an interrupt being processed. It contains zero if no interrupt is being processed.
811

912
Currently the ``cpsie()`` and ``cpsid()`` functions are partially implemented.
1013
They require but ignore the flags argument and serve as a means of enabling and disabling interrupts.

0 commit comments

Comments
 (0)