Skip to content

Commit d4492aa

Browse files
committed
Merge remote-tracking branch 'adafruit/master' into packet_buffer
2 parents 11a8fc7 + 22644d3 commit d4492aa

File tree

104 files changed

+8242
-11
lines changed

Some content is hidden

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

104 files changed

+8242
-11
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,16 @@ jobs:
102102
- "feather_m0_rfm9x"
103103
- "feather_m0_supersized"
104104
- "feather_m4_express"
105+
- "feather_mimxrt1011"
106+
- "feather_mimxrt1062"
105107
- "feather_nrf52840_express"
106108
- "feather_radiofruit_zigbee"
107109
- "feather_stm32f405_express"
108110
- "gemma_m0"
109111
- "grandcentral_m4_express"
110112
- "hallowing_m0_express"
111113
- "hallowing_m4_express"
114+
- "imxrt1010_evk"
112115
- "itsybitsy_m0_express"
113116
- "itsybitsy_m4_express"
114117
- "itsybitsy_nrf52840_express"

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,6 @@
108108
[submodule "lib/mp3"]
109109
path = lib/mp3
110110
url = https://github.com/adafruit/Adafruit_MP3
111+
[submodule "ports/mimxrt10xx/sdk"]
112+
path = ports/mimxrt10xx/sdk
113+
url = https://github.com/arturo182/MIMXRT10xx_SDK

conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@
131131
"ports/esp8266/common-hal",
132132
"ports/esp8266/modules",
133133
"ports/minimal",
134+
"ports/mimxrt10xx/peripherals",
135+
"ports/mimxrt10xx/sdk",
134136
"ports/nrf/device",
135137
"ports/nrf/bluetooth",
136138
"ports/nrf/modules",

docs/shared_bindings_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import re
2727

2828

29-
SUPPORTED_PORTS = ["atmel-samd", "nrf"]
29+
SUPPORTED_PORTS = ["atmel-samd", "nrf", "mimxrt10xx"]
3030

3131

3232
def parse_port_config(contents, chip_keyword=None):

docs/supported_ports.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and ESP8266.
88
:maxdepth: 2
99

1010
../ports/atmel-samd/README
11+
../ports/mimxrt10xx/README
1112
../ports/nrf/README
1213
../ports/stm32f4/README
1314
../ports/cxd56/README

ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@
1919
// USB is always used internally so skip the pin objects for it.
2020
#define IGNORE_PIN_PA24 1
2121
#define IGNORE_PIN_PA25 1
22+
23+
// Enable the use of 2 displays
24+
25+
#define CIRCUITPY_DISPLAY_LIMIT (2)
26+
27+
28+

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

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,36 @@
3535

3636
displayio_fourwire_obj_t board_display_obj;
3737

38+
typedef struct {
39+
const uint32_t *config_data;
40+
void *handoverHID;
41+
void *handoverMSC;
42+
const char *info_uf2;
43+
} UF2_BInfo;
44+
45+
#define APP_START_ADDRESS 0x00004000
46+
#define UF2_BINFO ((UF2_BInfo *)(APP_START_ADDRESS - sizeof(UF2_BInfo)))
47+
48+
#define CFG_DISPLAY_CFG0 39
49+
#define CFG_MAGIC0 0x1e9e10f1
50+
3851
#define DELAY 0x80
3952

53+
uint32_t lookupCfg(uint32_t key, uint32_t defl) {
54+
const uint32_t *ptr = UF2_BINFO->config_data;
55+
if (!ptr || (((uint32_t)ptr) & 3) || *ptr != CFG_MAGIC0) {
56+
// no config data!
57+
} else {
58+
ptr += 4;
59+
while (*ptr) {
60+
if (*ptr == key)
61+
return ptr[1];
62+
ptr += 2;
63+
}
64+
}
65+
return defl;
66+
}
67+
4068
uint8_t display_init_sequence[] = {
4169
0x01, 0 | DELAY, 150, // SWRESET
4270
0x11, 0 | DELAY, 255, // SLPOUT
@@ -63,8 +91,6 @@ uint8_t display_init_sequence[] = {
6391
0x2E, 0x2C, 0x29, 0x2D,
6492
0x2E, 0x2E, 0x37, 0x3F,
6593
0x00, 0x00, 0x02, 0x10,
66-
0x2a, 3, 0x02, 0x00, 0x81, // _CASET XSTART = 2, XEND = 129
67-
0x2b, 3, 0x02, 0x00, 0x81, // _RASET XSTART = 2, XEND = 129
6894
0x13, 0 | DELAY, 10, // _NORON
6995
0x29, 0 | DELAY, 100, // _DISPON
7096
};
@@ -83,14 +109,17 @@ void board_init(void) {
83109
&pin_PA17, // TFT_RST Reset
84110
60000000);
85111

112+
uint32_t cfg0 = lookupCfg(CFG_DISPLAY_CFG0, 0x000000);
113+
uint32_t offX = (cfg0 >> 8) & 0xff;
114+
uint32_t offY = (cfg0 >> 16) & 0xff;
86115
displayio_display_obj_t* display = &displays[0].display;
87116
display->base.type = &displayio_display_type;
88117
common_hal_displayio_display_construct(display,
89118
bus,
90119
160, // Width (after rotation)
91120
128, // Height (after rotation)
92-
0, // column start
93-
0, // row start
121+
offX, // column start
122+
offY, // row start
94123
0, // rotation
95124
16, // Color depth
96125
false, // grayscale

ports/mimxrt10xx/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build-*/

0 commit comments

Comments
 (0)