Skip to content
Snippets Groups Projects
Commit ce166e6b authored by Mike Causer's avatar Mike Causer Committed by Paul Sokolovsky
Browse files

docs: Spelling mistakes

parent 3eb532e9
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ Functions ...@@ -17,7 +17,7 @@ Functions
.. admonition:: Difference to CPython .. admonition:: Difference to CPython
:class: attention :class: attention
If additional argument, `sep` is supplied, it is used as a seperator If additional argument, `sep` is supplied, it is used as a separator
between hexadecimal values. between hexadecimal values.
.. function:: unhexlify(data) .. function:: unhexlify(data)
......
...@@ -13,10 +13,10 @@ Classes ...@@ -13,10 +13,10 @@ Classes
.. function:: namedtuple(name, fields) .. function:: namedtuple(name, fields)
This is factory function to create a new namedtuple type with a specific This is factory function to create a new namedtuple type with a specific
name and set of fields. A namedtyple is a subclass of tuple which allows name and set of fields. A namedtuple is a subclass of tuple which allows
to access its fields not just by numeric index, but also with an attribute to access its fields not just by numeric index, but also with an attribute
access syntax using symbolic field names. Fields is a sequence of strings access syntax using symbolic field names. Fields is a sequence of strings
specifying field names. For compatibily with CPython it can also be a specifying field names. For compatibility with CPython it can also be a
a string with space-separated field named (but this is less efficient). a string with space-separated field named (but this is less efficient).
Example of use:: Example of use::
......
...@@ -118,7 +118,7 @@ Module contents ...@@ -118,7 +118,7 @@ Module contents
.. data:: BIG_ENDIAN .. data:: BIG_ENDIAN
Layour type for a big-endian packed structure. Layout type for a big-endian packed structure.
.. data:: NATIVE .. data:: NATIVE
...@@ -184,7 +184,7 @@ Subscripting a pointer with other integer values but 0 are supported too, ...@@ -184,7 +184,7 @@ Subscripting a pointer with other integer values but 0 are supported too,
with the same semantics as in C. with the same semantics as in C.
Summing up, accessing structure fields generally follows C syntax, Summing up, accessing structure fields generally follows C syntax,
except for pointer derefence, when you need to use ``[0]`` operator except for pointer dereference, when you need to use ``[0]`` operator
instead of ``*``. instead of ``*``.
Limitations Limitations
......
...@@ -53,7 +53,7 @@ Constructors ...@@ -53,7 +53,7 @@ Constructors
Example:: Example::
hash = uhashlib.sha1('abcd1234', 1001) # lenght of the initial piece is multiple of 4 bytes hash = uhashlib.sha1('abcd1234', 1001) # length of the initial piece is multiple of 4 bytes
hash.update('1234') # also multiple of 4 bytes hash.update('1234') # also multiple of 4 bytes
... ...
hash.update('12345') # last chunk may be of any length hash.update('12345') # last chunk may be of any length
...@@ -68,7 +68,7 @@ Methods ...@@ -68,7 +68,7 @@ Methods
.. method:: hash.digest() .. method:: hash.digest()
Return hash for all data passed thru hash, as a bytes object. After this Return hash for all data passed through hash, as a bytes object. After this
method is called, more data cannot be fed into hash any longer. method is called, more data cannot be fed into hash any longer.
.. only:: port_wipy .. only:: port_wipy
......
...@@ -12,7 +12,7 @@ Functions ...@@ -12,7 +12,7 @@ Functions
.. function:: open(name, mode='r', **kwargs) .. function:: open(name, mode='r', **kwargs)
Open a file. Builtin ``open()`` function is alised to this function. Open a file. Builtin ``open()`` function is aliased to this function.
All ports (which provide access to file system) are required to support All ports (which provide access to file system) are required to support
`mode` parameter, but support for other arguments vary by port. `mode` parameter, but support for other arguments vary by port.
......
...@@ -81,7 +81,7 @@ Functions ...@@ -81,7 +81,7 @@ Functions
.. function:: unmount(path) .. function:: unmount(path)
Unmounts a prevoulsy mounted block device from the given path. Unmounts a previously mounted block device from the given path.
.. function:: mkfs(block_device or path) .. function:: mkfs(block_device or path)
......
...@@ -117,7 +117,7 @@ Functions ...@@ -117,7 +117,7 @@ Functions
.. function:: time() .. function:: time()
Returns the number of seconds, as an integer, since the Epoch, assuming that underlying Returns the number of seconds, as an integer, since the Epoch, assuming that underlying
RTC is set and maintained as decsribed above. If an RTC is not set, this function returns RTC is set and maintained as described above. If an RTC is not set, this function returns
number of seconds since a port-specific reference point in time (for embedded boards without number of seconds since a port-specific reference point in time (for embedded boards without
a battery-backed RTC, usually since power up or reset). If you want to develop portable a battery-backed RTC, usually since power up or reset). If you want to develop portable
MicroPython application, you should not rely on this function to provide higher than second MicroPython application, you should not rely on this function to provide higher than second
......
...@@ -95,7 +95,7 @@ We set up timer 2 as follows:: ...@@ -95,7 +95,7 @@ We set up timer 2 as follows::
The prescaler is set at 83, which makes this timer count at 1 MHz. The prescaler is set at 83, which makes this timer count at 1 MHz.
This is because the CPU clock, running at 168 MHz, is divided by This is because the CPU clock, running at 168 MHz, is divided by
2 and then by prescaler+1, giving a freqency of 168 MHz/2/(83+1)=1 MHz 2 and then by prescaler+1, giving a frequency of 168 MHz/2/(83+1)=1 MHz
for timer 2. The period is set to a large number so that the timer for timer 2. The period is set to a large number so that the timer
can count up to a large number before wrapping back around to zero. can count up to a large number before wrapping back around to zero.
In this case it will take about 17 minutes before it cycles back to In this case it will take about 17 minutes before it cycles back to
......
...@@ -61,7 +61,7 @@ The first argument to the function ``osc`` is the number of mouse events to send ...@@ -61,7 +61,7 @@ The first argument to the function ``osc`` is the number of mouse events to send
and the second argument is the delay (in milliseconds) between events. Try and the second argument is the delay (in milliseconds) between events. Try
playing around with different numbers. playing around with different numbers.
**Excercise: make the mouse go around in a circle.** **Exercise: make the mouse go around in a circle.**
Making a mouse with the accelerometer Making a mouse with the accelerometer
------------------------------------- -------------------------------------
...@@ -92,7 +92,7 @@ In safe mode, the ``boot.py`` and ``main.py`` files are not executed, and so ...@@ -92,7 +92,7 @@ In safe mode, the ``boot.py`` and ``main.py`` files are not executed, and so
the pyboard boots up with default settings. This means you now have access the pyboard boots up with default settings. This means you now have access
to the filesystem (the USB drive should appear), and you can edit ``main.py``. to the filesystem (the USB drive should appear), and you can edit ``main.py``.
(Leave ``boot.py`` as-is, because we still want to go back to HID-mode after (Leave ``boot.py`` as-is, because we still want to go back to HID-mode after
we finish editting ``main.py``.) we finish editing ``main.py``.)
In ``main.py`` put the following code:: In ``main.py`` put the following code::
......
...@@ -129,7 +129,7 @@ Non-integer data types ...@@ -129,7 +129,7 @@ Non-integer data types
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
These may be handled by means of arrays of the appropriate data type. For These may be handled by means of arrays of the appropriate data type. For
example, single precison floating point data may be processed as follows. example, single precision floating point data may be processed as follows.
This code example takes an array of floats and replaces its contents with This code example takes an array of floats and replaces its contents with
their squares. their squares.
...@@ -172,7 +172,7 @@ thus: ...@@ -172,7 +172,7 @@ thus:
The const() construct causes MicroPython to replace the variable name The const() construct causes MicroPython to replace the variable name
with its value at compile time. If constants are declared in an outer with its value at compile time. If constants are declared in an outer
Python scope they can be shared between mutiple assembler functions and Python scope they can be shared between multiple assembler functions and
with Python code. with Python code.
Assembler code as class methods Assembler code as class methods
......
...@@ -23,7 +23,7 @@ specifiers: ...@@ -23,7 +23,7 @@ specifiers:
* ne Not equal * ne Not equal
* cs Carry set * cs Carry set
* cc Carry clear * cc Carry clear
* mi Minus (negaive) * mi Minus (negative)
* pl Plus (positive) * pl Plus (positive)
* vs Overflow set * vs Overflow set
* vc Overflow clear * vc Overflow clear
......
...@@ -24,7 +24,7 @@ This summarises the points detailed below and lists the principal recommendation ...@@ -24,7 +24,7 @@ This summarises the points detailed below and lists the principal recommendation
* Where an ISR returns multiple bytes use a pre-allocated ``bytearray``. If multiple integers are to be * Where an ISR returns multiple bytes use a pre-allocated ``bytearray``. If multiple integers are to be
shared between an ISR and the main program consider an array (``array.array``). shared between an ISR and the main program consider an array (``array.array``).
* Where data is shared between the main program and an ISR, consider disabling interrupts prior to accessing * Where data is shared between the main program and an ISR, consider disabling interrupts prior to accessing
the data in the main program and re-enabling them immediately afterwards (see Critcal Sections). the data in the main program and re-enabling them immediately afterwards (see Critical Sections).
* Allocate an emergency exception buffer (see below). * Allocate an emergency exception buffer (see below).
......
...@@ -50,7 +50,7 @@ Finally type ``print(i)``, press RETURN, press BACKSPACE and press RETURN again: ...@@ -50,7 +50,7 @@ Finally type ``print(i)``, press RETURN, press BACKSPACE and press RETURN again:
>>> >>>
Auto-indent won't be applied if the previous two lines were all spaces. This Auto-indent won't be applied if the previous two lines were all spaces. This
means that you can finish entering a compound statment by pressing RETURN means that you can finish entering a compound statement by pressing RETURN
twice, and then a third press will finish and execute. twice, and then a third press will finish and execute.
Auto-completion Auto-completion
...@@ -80,7 +80,7 @@ expansions: ...@@ -80,7 +80,7 @@ expansions:
Interrupting a running program Interrupting a running program
------------------------------ ------------------------------
You can interupt a running program by pressing Ctrl-C. This will raise a KeyboardInterrupt You can interrupt a running program by pressing Ctrl-C. This will raise a KeyboardInterrupt
which will bring you back to the REPL, providing your program doesn't intercept the which will bring you back to the REPL, providing your program doesn't intercept the
KeyboardInterrupt exception. KeyboardInterrupt exception.
...@@ -184,8 +184,8 @@ variables no longer exist: ...@@ -184,8 +184,8 @@ variables no longer exist:
The special variable _ (underscore) The special variable _ (underscore)
----------------------------------- -----------------------------------
When you use the REPL, you may perfom computations and see the results. When you use the REPL, you may perform computations and see the results.
MicroPython stores the results of the previous statment in the variable _ (underscore). MicroPython stores the results of the previous statement in the variable _ (underscore).
So you can use the underscore to save the result in a variable. For example: So you can use the underscore to save the result in a variable. For example:
>>> 1 + 2 + 3 + 4 + 5 >>> 1 + 2 + 3 + 4 + 5
......
...@@ -16,7 +16,7 @@ Before applying power ...@@ -16,7 +16,7 @@ Before applying power
.. warning:: .. warning::
The GPIO pins of the WiPy are NOT 5V tolerant, connecting them to voltages higer The GPIO pins of the WiPy are NOT 5V tolerant, connecting them to voltages higher
than 3.6V will cause irreparable damage to the board. ADC pins, when configured than 3.6V will cause irreparable damage to the board. ADC pins, when configured
in analog mode cannot withstand voltages above 1.8V. Keep these considerations in in analog mode cannot withstand voltages above 1.8V. Keep these considerations in
mind when wiring your electronics. mind when wiring your electronics.
......
...@@ -205,7 +205,7 @@ See :ref:`network.Server <network.Server>` :: ...@@ -205,7 +205,7 @@ See :ref:`network.Server <network.Server>` ::
server = Server(login=('user', 'password'), timeout=60) server = Server(login=('user', 'password'), timeout=60)
server.timeout(300) # change the timeout server.timeout(300) # change the timeout
server.timeout() # get the timeout server.timeout() # get the timeout
server.isrunning() # check wether the server is running or not server.isrunning() # check whether the server is running or not
Heart beat LED Heart beat LED
-------------- --------------
......
...@@ -17,7 +17,7 @@ Because the WiPy/expansion board does not have a housing it needs a bit of care: ...@@ -17,7 +17,7 @@ Because the WiPy/expansion board does not have a housing it needs a bit of care:
If you experience a lot of static electricity in your area (eg dry and cold If you experience a lot of static electricity in your area (eg dry and cold
climates), take extra care not to shock the WiPy. If your WiPy came climates), take extra care not to shock the WiPy. If your WiPy came
in a ESD bag, then this bag is the best way to store and carry the in a ESD bag, then this bag is the best way to store and carry the
WiPy as it will protect it agains static discharges. WiPy as it will protect it against static discharges.
As long as you take care of the hardware, you should be okay. It's almost As long as you take care of the hardware, you should be okay. It's almost
impossible to break the software on the WiPy, so feel free to play around impossible to break the software on the WiPy, so feel free to play around
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment