Skip to content

Commit 5fb7576

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 84851a3 + 702b4a5 commit 5fb7576

File tree

244 files changed

+2308
-1740
lines changed

Some content is hidden

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

244 files changed

+2308
-1740
lines changed

BUILDING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To compile (or recompile) mpy-cross:
4848

4949
make -C mpy-cross
5050

51-
# Building
51+
## Building
5252

5353
There a number of ports of CircuitPython! To build for your board, change to the appropriate ports directory and build.
5454

@@ -64,7 +64,7 @@ If you aren't sure what boards exist, have a peek in the boards subdirectory of
6464
If you have a fast computer with many cores, consider adding `-j` to your build flags, such as `-j17` on
6565
a 6-core 12-thread machine.
6666

67-
# Testing
67+
## Testing
6868

6969
If you are working on changes to the core language, you might find it useful to run the test suite.
7070
The test suite in the top level `tests` directory. It needs the unix port to run.
@@ -84,7 +84,7 @@ A successful run will say something like
8484
676 tests passed
8585
30 tests skipped: buffered_writer builtin_help builtin_range_binop class_delattr_setattr cmd_parsetree extra_coverage framebuf1 framebuf16 framebuf2 framebuf4 framebuf8 framebuf_subclass mpy_invalid namedtuple_asdict non_compliant resource_stream schedule sys_getsizeof urandom_extra ure_groups ure_span ure_sub ure_sub_unmatched vfs_basic vfs_fat_fileio1 vfs_fat_fileio2 vfs_fat_more vfs_fat_oldproto vfs_fat_ramdisk vfs_userfs
8686

87-
# Debugging
87+
## Debugging
8888

8989
The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB.
9090
Instructions can be found at https://learn.adafruit.com/debugging-the-samd21-with-gdb
@@ -99,7 +99,7 @@ Example:
9999
If your port/build includes `arm-none-eabi-gdb-py`, consider using it instead, as it can be used for better register
100100
debugging with https://github.com/bnahill/PyCortexMDebug
101101

102-
# Code Quality Checks
102+
## Code Quality Checks
103103

104104
We apply code quality checks using pre-commit. Install pre-commit once per system with
105105

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ For SAMD21 debugging workflow tips check out [this learn guide](https://learn.ad
3838
Scott Shawcroft ([@tannewt](https://github.com/tannewt)) is the lead developer of CircuitPython
3939
and is sponsored by [Adafruit Industries LLC](https://adafruit.com). Scott is usually available
4040
during US West Coast working hours. Dan Halbert ([@dhalbert](https://github.com/dhalbert)) and
41-
Kattni Rembor ([@kattni](https://github.com/kattni)) are also sponsored by [Adafruit Industries
42-
LLC](https://adafruit.com) and are usually available during US East Coast daytime hours including
43-
some weekends.
41+
Jeff Epler ([@jepler](https://github.com/jepler)) are also sponsored by [Adafruit Industries
42+
LLC](https://adafruit.com) and are usually available during US daytime hours including some
43+
weekends.
4444

4545
They are all reachable on [Discord](https://adafru.it/discord), GitHub issues and the [Adafruit
4646
support forum](https://forums.adafruit.com/viewforum.php?f=60).

README.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ Specifically useful documentation when starting out:
5656
- `CircuitPython Essentials <https://learn.adafruit.com/circuitpython-essentials>`__
5757
- `Example Code <https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/CircuitPython_Essentials>`__
5858

59-
Code Search
60-
------------
61-
GitHub doesn't currently support code search on forks. Therefore, CircuitPython doesn't have code search through GitHub because it is a fork of MicroPython. Luckily, `SourceGraph <https://sourcegraph.com/github.com/adafruit/circuitpython>`_ has free code search for public repos like CircuitPython. So, visit `sourcegraph.com/github.com/adafruit/circuitpython <https://sourcegraph.com/github.com/adafruit/circuitpython>`_ to search the CircuitPython codebase online.
62-
6359
Contributing
6460
------------
6561

conf.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ def autoapi_prepare_jinja_env(jinja_env):
218218
"ports/nrf/usb",
219219
"ports/raspberrypi/sdk",
220220
"ports/raspberrypi/lib",
221-
"ports/silabs",
221+
"ports/silabs/gecko_sdk",
222+
"ports/silabs/tools",
222223
"ports/stm/st_driver",
223224
"ports/stm/packages",
224225
"ports/stm/peripherals",
225226
"ports/stm/ref",
226-
"ports/unix",
227227
"py",
228228
"shared/*",
229229
"shared-bindings/util.*",
@@ -362,14 +362,21 @@ def autoapi_prepare_jinja_env(jinja_env):
362362
# Additional stuff for the LaTeX preamble.
363363
#'preamble': '',
364364
# Include 3 levels of headers in PDF ToC
365-
'preamble': '\setcounter{tocdepth}{2}',
365+
'preamble': r'''
366+
\setcounter{tocdepth}{2}
367+
\hbadness=99999
368+
\hfuzz=20pt
369+
\usepackage{pdflscape}
370+
''',
366371
}
367372

368373
# Grouping the document tree into LaTeX files. List of tuples
369374
# (source start file, target name, title,
370375
# author, documentclass [howto, manual, or own class]).
371376
latex_documents = [
372-
(master_doc, 'CircuitPython.tex', 'CircuitPython Documentation',
377+
("docs/pdf", 'CircuitPython.tex', 'CircuitPython Documentation',
378+
'CircuitPython Contributors', 'manual'),
379+
("shared-bindings/support_matrix", 'SupportMatrix.tex', 'Board Support Matrix',
373380
'CircuitPython Contributors', 'manual'),
374381
]
375382

docs/pdf.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
:orphan:
2+
3+
Adafruit CircuitPython API Reference
4+
====================================
5+
6+
Welcome to the API reference documentation for Adafruit CircuitPython.
7+
This contains low-level API reference docs which may link out to separate
8+
*"getting started"* guides. `Adafruit <https://adafruit.com>`_ has many
9+
excellent tutorials available through the
10+
`Adafruit Learning System <https://learn.adafruit.com/>`_.
11+
12+
13+
.. toctree::
14+
:maxdepth: 3
15+
16+
../README.rst
17+
libraries.rst
18+
workflows
19+
environment.rst
20+
troubleshooting.rst
21+
../CONTRIBUTING
22+
../BUILDING
23+
../WEBUSB_README
24+
supported_ports.rst
25+
26+
Design and porting reference
27+
----------------------------
28+
29+
.. toctree::
30+
:maxdepth: 1
31+
32+
design_guide
33+
porting
34+
common_hal
35+
36+
API Reference
37+
----------------------
38+
39+
.. toctree::
40+
:glob:
41+
:maxdepth: 3
42+
43+
library/index.rst
44+
../shared-bindings/*/index
45+
../shared-bindings/help
46+
47+
48+
.. toctree::
49+
:maxdepth: 1
50+
51+
reference/glossary.rst
52+
../CODE_OF_CONDUCT
53+
../docs/LICENSE
54+
55+
Indices and tables
56+
==================
57+
58+
* :ref:`genindex`
59+
* :ref:`modindex`
60+
* :ref:`search`

docs/supported_ports.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ is limited.
1212
:maxdepth: 2
1313

1414
../ports/atmel-samd/README
15+
../ports/broadcom/README
1516
../ports/cxd56/README
1617
../ports/espressif/README
1718
../ports/litex/README
1819
../ports/mimxrt10xx/README
1920
../ports/nrf/README
2021
../ports/raspberrypi/README
22+
../ports/silabs/README
2123
../ports/stm/README
24+
../ports/unix/README

extmod/vfs_fat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ STATIC const mp_vfs_proto_t fat_vfs_proto = {
540540
MP_DEFINE_CONST_OBJ_TYPE(
541541
mp_fat_vfs_type,
542542
MP_QSTR_VfsFat,
543-
MP_TYPE_FLAG_NONE,
543+
MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS,
544544
make_new, fat_vfs_make_new,
545545
protocol, &fat_vfs_proto,
546546
locals_dict, &fat_vfs_locals_dict

main.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
#include "shared-module/displayio/__init__.h"
9595
#endif
9696

97+
#if CIRCUITPY_EPAPERDISPLAY
98+
#include "shared-bindings/epaperdisplay/EPaperDisplay.h"
99+
#endif
100+
97101
#if CIRCUITPY_KEYPAD
98102
#include "shared-module/keypad/__init__.h"
99103
#endif
@@ -534,7 +538,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
534538

535539
// Program has finished running.
536540
bool printed_press_any_key = false;
537-
#if CIRCUITPY_DISPLAYIO
541+
#if CIRCUITPY_EPAPERDISPLAY
538542
size_t time_to_epaper_refresh = 1;
539543
#endif
540544

@@ -682,7 +686,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
682686
// Refresh the ePaper display if we have one. That way it'll show an error message.
683687
// Skip if we're about to autoreload. Otherwise we may delay when user code can update
684688
// the display.
685-
#if CIRCUITPY_DISPLAYIO
689+
#if CIRCUITPY_EPAPERDISPLAY
686690
if (time_to_epaper_refresh > 0 && !autoreload_pending()) {
687691
time_to_epaper_refresh = maybe_refresh_epaperdisplay();
688692
}
@@ -724,7 +728,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
724728
}
725729
time_to_next_change = total_time - tick_diff;
726730
}
727-
#if CIRCUITPY_DISPLAYIO
731+
#if CIRCUITPY_EPAPERDISPLAY
728732
if (time_to_epaper_refresh > 0 && time_to_next_change > 0) {
729733
time_to_next_change = MIN(time_to_next_change, time_to_epaper_refresh);
730734
}

ports/atmel-samd/bindings/samd/Clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ STATIC MP_DEFINE_CONST_DICT(samd_clock_locals_dict, samd_clock_locals_dict_table
131131
MP_DEFINE_CONST_OBJ_TYPE(
132132
samd_clock_type,
133133
MP_QSTR_Clock,
134-
MP_TYPE_FLAG_NONE,
134+
MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS,
135135
print, samd_clock_print,
136136
locals_dict, &samd_clock_locals_dict
137137
);

ports/atmel-samd/boards/hallowing_m0_express/board.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
#include "supervisor/board.h"
2828

2929
#include "shared-bindings/board/__init__.h"
30-
#include "shared-bindings/displayio/FourWire.h"
30+
#include "shared-bindings/fourwire/FourWire.h"
3131
#include "shared-module/displayio/__init__.h"
3232
#include "shared-module/displayio/mipi_constants.h"
3333
#include "shared-bindings/busio/SPI.h"
3434

35-
displayio_fourwire_obj_t board_display_obj;
35+
fourwire_fourwire_obj_t board_display_obj;
3636

3737
#define DELAY 0x80
3838

@@ -69,11 +69,11 @@ uint8_t display_init_sequence[] = {
6969
};
7070

7171
void board_init(void) {
72-
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
73-
bus->base.type = &displayio_fourwire_type;
72+
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
73+
bus->base.type = &fourwire_fourwire_type;
7474
busio_spi_obj_t *spi = common_hal_board_create_spi(0);
7575
common_hal_busio_spi_never_reset(spi);
76-
common_hal_displayio_fourwire_construct(bus,
76+
common_hal_fourwire_fourwire_construct(bus,
7777
spi,
7878
&pin_PA28, // Command or data
7979
&pin_PA01, // Chip select
@@ -82,9 +82,9 @@ void board_init(void) {
8282
0, // Polarity
8383
0); // Phase
8484

85-
displayio_display_obj_t *display = &allocate_display()->display;
86-
display->base.type = &displayio_display_type;
87-
common_hal_displayio_display_construct(display,
85+
busdisplay_busdisplay_obj_t *display = &allocate_display()->display;
86+
display->base.type = &busdisplay_busdisplay_type;
87+
common_hal_busdisplay_busdisplay_construct(display,
8888
bus,
8989
128, // Width
9090
128, // Height

ports/atmel-samd/boards/hallowing_m4_express/board.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
#include "mpconfigboard.h"
2929
#include "hal/include/hal_gpio.h"
3030
#include "shared-bindings/busio/SPI.h"
31-
#include "shared-bindings/displayio/FourWire.h"
31+
#include "shared-bindings/busdisplay/BusDisplay.h"
32+
#include "shared-bindings/fourwire/FourWire.h"
3233
#include "shared-module/displayio/__init__.h"
3334
#include "shared-module/displayio/mipi_constants.h"
3435

35-
displayio_fourwire_obj_t board_display_obj;
36+
fourwire_fourwire_obj_t board_display_obj;
3637

3738
#define DELAY 0x80
3839

@@ -47,13 +48,13 @@ uint8_t display_init_sequence[] = {
4748
};
4849

4950
void board_init(void) {
50-
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
51+
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
5152
busio_spi_obj_t *spi = &bus->inline_bus;
5253
common_hal_busio_spi_construct(spi, &pin_PA01, &pin_PA00, NULL, false);
5354
common_hal_busio_spi_never_reset(spi);
5455

55-
bus->base.type = &displayio_fourwire_type;
56-
common_hal_displayio_fourwire_construct(bus,
56+
bus->base.type = &fourwire_fourwire_type;
57+
common_hal_fourwire_fourwire_construct(bus,
5758
spi,
5859
&pin_PB31, // TFT_DC Command or data
5960
&pin_PA27, // TFT_CS Chip select
@@ -62,9 +63,9 @@ void board_init(void) {
6263
0, // Polarity
6364
0); // Phase
6465

65-
displayio_display_obj_t *display = &allocate_display()->display;
66-
display->base.type = &displayio_display_type;
67-
common_hal_displayio_display_construct(display,
66+
busdisplay_busdisplay_obj_t *display = &allocate_display()->display;
67+
display->base.type = &busdisplay_busdisplay_type;
68+
common_hal_busdisplay_busdisplay_construct(display,
6869
bus,
6970
240, // Width (after rotation)
7071
240, // Height (after rotation)

ports/atmel-samd/boards/monster_m4sk/board.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
#include "mpconfigboard.h"
2929
#include "hal/include/hal_gpio.h"
3030
#include "shared-bindings/busio/SPI.h"
31-
#include "shared-bindings/displayio/FourWire.h"
31+
#include "shared-bindings/fourwire/FourWire.h"
3232
#include "shared-module/displayio/__init__.h"
3333
#include "shared-module/displayio/mipi_constants.h"
3434

35-
displayio_fourwire_obj_t board_display_obj;
35+
fourwire_fourwire_obj_t board_display_obj;
3636

3737
#define DELAY 0x80
3838

@@ -48,13 +48,13 @@ uint8_t display_init_sequence[] = {
4848
};
4949

5050
void board_init(void) {
51-
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
51+
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
5252
busio_spi_obj_t *spi = &bus->inline_bus;
5353
common_hal_busio_spi_construct(spi, &pin_PA13, &pin_PA12, NULL, false);
5454
common_hal_busio_spi_never_reset(spi);
5555

56-
bus->base.type = &displayio_fourwire_type;
57-
common_hal_displayio_fourwire_construct(bus,
56+
bus->base.type = &fourwire_fourwire_type;
57+
common_hal_fourwire_fourwire_construct(bus,
5858
spi,
5959
&pin_PA07, // TFT_DC Command or data
6060
&pin_PA06, // TFT_CS Chip select
@@ -63,9 +63,9 @@ void board_init(void) {
6363
0, // Polarity
6464
0); // Phase
6565

66-
displayio_display_obj_t *display = &allocate_display()->display;
67-
display->base.type = &displayio_display_type;
68-
common_hal_displayio_display_construct(display,
66+
busdisplay_busdisplay_obj_t *display = &allocate_display()->display;
67+
display->base.type = &busdisplay_busdisplay_type;
68+
common_hal_busdisplay_busdisplay_construct(display,
6969
bus,
7070
240, // Width (after rotation)
7171
240, // Height (after rotation)

0 commit comments

Comments
 (0)