Skip to content

Commit ef61b5e

Browse files
committed
Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
cpx build compiles and loads and works in repl; test suite not run yet esp8266 not tested yet
2 parents 266be30 + 1f78e7a commit ef61b5e

File tree

834 files changed

+9751
-4666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

834 files changed

+9751
-4666
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ before_script:
3838
# For teensy build
3939
- sudo apt-get install realpath
4040
# For coverage testing
41-
- sudo pip install cpp-coveralls
41+
# cpp-coveralls 0.4 conflicts with urllib3 preinstalled in Travis VM
42+
- sudo pip install cpp-coveralls==0.3.12
4243
- gcc --version
4344
- arm-none-eabi-gcc --version
4445
- python3 --version

CODECONVENTIONS.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ require such detailed description.
2626
To get good practical examples of good commits and their messages, browse
2727
the `git log` of the project.
2828

29+
MicroPython doesn't require explicit sign-off for patches ("Signed-off-by"
30+
lines and similar). Instead, the commit message, and your name and email
31+
address on it construes your sign-off of the following:
32+
33+
* That you wrote the change yourself, or took it from a project with
34+
a compatible license (in the latter case the commit message, and possibly
35+
source code should provide reference where the implementation was taken
36+
from and give credit to the original author, as required by the license).
37+
* That you are allowed to release these changes to an open-source project
38+
(for example, changes done during paid work for a third party may require
39+
explicit approval from that third party).
40+
* That you (or your employer) agree to release the changes under
41+
MicroPython's license, which is the MIT license. Note that you retain
42+
copyright for your changes (for smaller changes, the commit message
43+
conveys your copyright; if you make significant changes to a particular
44+
source module, you're welcome to add your name to the file header).
45+
* Your signature for all of the above, which is the 'Author' line in
46+
the commit message, and which should include your full real name and
47+
a valid and active email address by which you can be contacted in the
48+
foreseeable future.
49+
2950
Python code conventions
3051
=======================
3152

@@ -114,3 +135,76 @@ Type declarations:
114135
int member;
115136
void *data;
116137
} my_struct_t;
138+
139+
Documentation conventions
140+
=========================
141+
142+
MicroPython generally follows CPython in documentation process and
143+
conventions. reStructuredText syntax is used for the documention.
144+
145+
Specific conventions/suggestions:
146+
147+
* Use `*` markup to refer to arguments of a function, e.g.:
148+
149+
```
150+
.. method:: poll.unregister(obj)
151+
152+
Unregister *obj* from polling.
153+
```
154+
155+
* Use following syntax for cross-references/cross-links:
156+
157+
```
158+
:func:`foo` - function foo in current module
159+
:func:`module1.foo` - function foo in module "module1"
160+
(similarly for other referent types)
161+
:class:`Foo` - class Foo
162+
:meth:`Class.method1` - method1 in Class
163+
:meth:`~Class.method1` - method1 in Class, but rendered just as "method1()",
164+
not "Class.method1()"
165+
:meth:`title <method1>` - reference method1, but render as "title" (use only
166+
if really needed)
167+
:mod:`module1` - module module1
168+
169+
`symbol` - generic xref syntax which can replace any of the above in case
170+
the xref is unambiguous. If there's ambiguity, there will be a warning
171+
during docs generation, which need to be fixed using one of the syntaxes
172+
above
173+
```
174+
175+
* Cross-referencing arbitrary locations
176+
~~~
177+
.. _xref_target:
178+
179+
Normal non-indented text.
180+
181+
This is :ref:`reference <xref_target>`.
182+
183+
(If xref target is followed by section title, can be just
184+
:ref:`xref_target`).
185+
~~~
186+
187+
* Linking to external URL:
188+
```
189+
`link text <http://foo.com/...>`_
190+
```
191+
192+
* Referencing builtin singleton objects:
193+
```
194+
``None``, ``True``, ``False``
195+
```
196+
197+
* Use following syntax to create common description for more than one element:
198+
~~~
199+
.. function:: foo(x)
200+
bar(y)
201+
202+
Description common to foo() and bar().
203+
~~~
204+
205+
206+
More detailed guides and quickrefs:
207+
208+
* http://www.sphinx-doc.org/en/stable/rest.html
209+
* http://www.sphinx-doc.org/en/stable/markup/inline.html
210+
* http://docutils.sourceforge.net/docs/user/rst/quickref.html

atmel-samd/Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,10 @@ SRC_C = \
227227
lib/utils/interrupt_char.c \
228228
lib/utils/pyexec.c \
229229
lib/utils/stdout_helpers.c \
230+
lib/utils/sys_stdio_mphal.c \
230231
lib/libc/string0.c \
231232
lib/mp-readline/readline.c
232233

233-
STM_SRC_C = $(addprefix stmhal/,\
234-
pybstdio.c \
235-
)
236-
237234
SRC_COMMON_HAL = \
238235
analogio/__init__.c \
239236
analogio/AnalogIn.c \
@@ -295,7 +292,6 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE))
295292

296293
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
297294
OBJ += $(addprefix $(BUILD)/, $(SRC_ASF:.c=.o))
298-
OBJ += $(addprefix $(BUILD)/, $(STM_SRC_C:.c=.o))
299295
OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o))
300296
OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o))
301297

atmel-samd/access_vfs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
// This adapts the ASF access API to MicroPython's VFS API so we can expose all
2828
// VFS block devices as Lun's over USB mass storage control.
2929

30-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H__
31-
#define __MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H__
30+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H
31+
#define MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H
3232

3333
#include "asf/common/services/storage/ctrl_access/ctrl_access.h"
3434

@@ -39,4 +39,4 @@ bool vfs_removal(void);
3939
Ctrl_status vfs_usb_read_10(uint32_t addr, uint16_t nb_sector);
4040
Ctrl_status vfs_usb_write_10(uint32_t addr, uint16_t nb_sector);
4141

42-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H__
42+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H

atmel-samd/autoreload.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H__
28-
#define __MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H__
27+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H
28+
#define MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H
2929

3030
#include <stdbool.h>
3131

@@ -39,4 +39,4 @@ void autoreload_enable(void);
3939
void autoreload_disable(void);
4040
bool autoreload_is_enabled(void);
4141

42-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H__
42+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H

atmel-samd/background.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H__
28-
#define __MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H__
27+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H
28+
#define MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H
2929

3030
void run_background_tasks(void);
3131

32-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H__
32+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H

atmel-samd/boards/board.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
// This file defines board specific functions.
2828

29-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H__
30-
#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H__
29+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H
30+
#define MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H
3131

3232
#include <stdbool.h>
3333

@@ -42,4 +42,4 @@ bool board_requests_safe_mode(void);
4242
// Reset the state of off MCU components such as neopixels.
4343
void reset_board(void);
4444

45-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H__
45+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H

atmel-samd/boards/flash_AT25DF081A.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H__
28-
#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H__
27+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H
28+
#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H
2929

3030
// Settings for the Adesto Tech AT25DF081A 1MiB SPI flash. Its on the SAMD21
3131
// Xplained board.
@@ -49,4 +49,4 @@
4949

5050
#define SPI_FLASH_SECTOR_PROTECTION
5151

52-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H__
52+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H

atmel-samd/boards/flash_GD25Q16C.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H__
28-
#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H__
27+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H
28+
#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H
2929

3030
// Settings for the Gigadevice GD25Q16C 2MiB SPI flash.
3131
// Datasheet: http://www.gigadevice.com/product/download/410.html?locale=en_US
@@ -52,4 +52,4 @@
5252
#define SPI_FLASH_JEDEC_CAPACITY 0x15
5353

5454

55-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H__
55+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H

atmel-samd/boards/flash_S25FL216K.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H__
28-
#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H__
27+
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H
28+
#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H
2929

3030
// Settings for the Cypress (was Spansion) S25FL216K 2MiB SPI flash.
3131
// Datasheet: http://www.cypress.com/file/197346/download
@@ -51,4 +51,4 @@
5151
#define SPI_FLASH_JEDEC_MEMORY_TYPE 0x40
5252
#define SPI_FLASH_JEDEC_CAPACITY 0x15
5353

54-
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H__
54+
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy