Skip to content

Commit c433a82

Browse files
authored
Merge pull request micropython#573 from arturo182/master
nRF port improvements and pca10056 support
2 parents c33db95 + 76f5c01 commit c433a82

File tree

16 files changed

+548
-17
lines changed

16 files changed

+548
-17
lines changed

ports/nrf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ wt51822_s4at | s110 | Peripheral | Manual
8585
pca10040 | s132 | Peripheral and Central | [Segger](#segger-targets)
8686
feather52 | s132 | Peripheral and Central | [UART DFU](#dfu-targets)
8787
arduino_primo | s132 | Peripheral and Central | [PyOCD](#pyocdopenocd-targets)
88-
pca10056 | | | [Segger](#segger-targets)
88+
pca10056 | s140 | Peripheral | [Segger](#segger-targets)
8989

9090
## Segger Targets
9191

ports/nrf/bluetooth_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define MICROPY_PY_UBLUEPY (1)
1212
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
1313

14-
#elif (BLUETOOTH_SD == 132)
14+
#elif (BLUETOOTH_SD == 132 || BLUETOOTH_SD == 140)
1515

1616
#define MICROPY_PY_BLE (1)
1717
#define MICROPY_PY_BLE_NUS (0)

ports/nrf/boards/nrf52840_1M_256k.ld

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ MEMORY
77
{
88
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 /* entire flash, 1 MiB */
99
FLASH_ISR (rx) : ORIGIN = 0x00000000, LENGTH = 0x001000 /* sector 0, 4 KiB */
10-
FLASH_TEXT (rx) : ORIGIN = 0x00001000, LENGTH = 0x0FF000 /* 1020 KiB */
10+
FLASH_TEXT (rx) : ORIGIN = 0x00001000, LENGTH = 0x0E6000 /* 920 KiB */
11+
FLASH_FATFS (r) : ORIGIN = 0x000E7000, LENGTH = 0x019000 /* File system 100 KiB */
1112
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x040000 /* 256 KiB */
1213
}
1314

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
GNU linker script for NRF52840 w/ s140 6.0.0-6.alpha SoftDevice
3+
*/
4+
5+
/* Specify the memory areas */
6+
MEMORY
7+
{
8+
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 /* entire flash, 1 MiB */
9+
FLASH_ISR (rx) : ORIGIN = 0x00025000, LENGTH = 0x001000 /* sector 0, 4 KiB */
10+
FLASH_TEXT (rx) : ORIGIN = 0x00026000, LENGTH = 0x09A000 /* 616 KiB */
11+
FLASH_FATFS (r) : ORIGIN = 0x000C0000, LENGTH = 0x040000 /* File system 256 KiB */
12+
RAM (xrw) : ORIGIN = 0x20004000, LENGTH = 0x03C000 /* 240 KiB */
13+
}
14+
15+
/* produce a link error if there is not this amount of RAM for these sections */
16+
_minimum_stack_size = 40K;
17+
_minimum_heap_size = 0;
18+
19+
/* top end of the stack */
20+
21+
/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/
22+
_estack = ORIGIN(RAM) + LENGTH(RAM);
23+
24+
/* RAM extents for the garbage collector */
25+
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
26+
_heap_end = 0x20020000; /* tunable */
27+
28+
INCLUDE "boards/common.ld"

ports/nrf/boards/pca10056/board.c

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#include <string.h>
28+
#include <stdbool.h>
29+
30+
#include "nrf.h"
31+
32+
#include "boards/board.h"
33+
34+
volatile uint32_t ticks_ms = 0;
35+
36+
#define HAL_LFCLK_FREQ (32768UL)
37+
#define HAL_RTC_FREQ (1024UL)
38+
#define HAL_RTC_COUNTER_PRESCALER ((HAL_LFCLK_FREQ/HAL_RTC_FREQ)-1)
39+
40+
/* Maximum RTC ticks */
41+
#define portNRF_RTC_MAXTICKS ((1U<<24)-1U)
42+
43+
void board_init(void)
44+
{
45+
// 32Khz XTAL
46+
NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk);
47+
NRF_CLOCK->TASKS_LFCLKSTART = 1UL;
48+
49+
// Set up RTC1 as tick timer
50+
NVIC_DisableIRQ(RTC1_IRQn);
51+
NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk;
52+
NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk;
53+
NRF_RTC1->TASKS_STOP = 1;
54+
NRF_RTC1->TASKS_CLEAR = 1;
55+
56+
ticks_ms = 0;
57+
58+
NRF_RTC1->PRESCALER = HAL_RTC_COUNTER_PRESCALER;
59+
NRF_RTC1->INTENSET = RTC_INTENSET_TICK_Msk;
60+
NRF_RTC1->TASKS_START = 1;
61+
NRF_RTC1->EVTENSET = RTC_EVTEN_OVRFLW_Msk;
62+
NVIC_SetPriority(RTC1_IRQn, 0xf); // lowest priority
63+
NVIC_EnableIRQ(RTC1_IRQn);
64+
}
65+
66+
void RTC1_IRQHandler(void)
67+
{
68+
// Clear event
69+
NRF_RTC1->EVENTS_TICK = 0;
70+
volatile uint32_t dummy = NRF_RTC1->EVENTS_TICK;
71+
(void) dummy;
72+
//
73+
//// Tick correction
74+
uint32_t systick_counter = NRF_RTC1->COUNTER;
75+
uint32_t diff = (systick_counter - ticks_ms) & portNRF_RTC_MAXTICKS;
76+
ticks_ms += diff;
77+
}
78+
79+
bool board_requests_safe_mode(void) {
80+
return false;
81+
}
82+
83+
void reset_board(void) {
84+
85+
}

ports/nrf/boards/pca10056/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@
8282
#endif
8383

8484
#define HELP_TEXT_BOARD_LED "1,2,3,4"
85+
86+
#define PORT_HEAP_SIZE (128*1024)
87+
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
MCU_SERIES = m4
2+
MCU_VARIANT = nrf52
3+
MCU_SUB_VARIANT = nrf52840
4+
SOFTDEV_VERSION ?= 6.0.0-6.alpha
5+
6+
LD_FILE = boards/nrf52840_1M_256k_s140_$(SOFTDEV_VERSION).ld
7+
8+
NRF_DEFINES += -DNRF52840_XXAA

ports/nrf/boards/pca10056/nrf52_hal_conf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef NRF52_HAL_CONF_H__
22
#define NRF52_HAL_CONF_H__
33

4-
// #define HAL_UART_MODULE_ENABLED
4+
#define HAL_UART_MODULE_ENABLED
55
#define HAL_SPI_MODULE_ENABLED
66
#define HAL_TIME_MODULE_ENABLED
77
#define HAL_PWM_MODULE_ENABLED
@@ -11,7 +11,7 @@
1111
#define HAL_ADCE_MODULE_ENABLED
1212
#define HAL_TEMP_MODULE_ENABLED
1313
#define HAL_RNG_MODULE_ENABLED
14-
#define HAL_UARTE_MODULE_ENABLED
14+
// #define HAL_UARTE_MODULE_ENABLED
1515
// #define HAL_SPIE_MODULE_ENABLED
1616
// #define HAL_TWIE_MODULE_ENABLED
1717

ports/nrf/boards/pca10056/pins.c

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
// This file was automatically generated by make-pins.py
2+
//
3+
// --af nrf52_af.csv
4+
// --board boards/pca10056/pins.csv
5+
// --prefix boards/nrf52_prefix.c
6+
7+
// nrf52_prefix.c becomes the initial portion of the generated pins file.
8+
9+
#include <stdio.h>
10+
11+
#include "py/obj.h"
12+
#include "py/mphal.h"
13+
#include "pin.h"
14+
15+
#define AF(af_idx, af_fn, af_unit, af_type, af_ptr) \
16+
{ \
17+
{ &pin_af_type }, \
18+
.name = MP_QSTR_AF ## af_idx ## _ ## af_fn ## af_unit, \
19+
.idx = (af_idx), \
20+
.fn = AF_FN_ ## af_fn, \
21+
.unit = (af_unit), \
22+
.type = AF_PIN_TYPE_ ## af_fn ## _ ## af_type, \
23+
.af_fn = (af_ptr) \
24+
}
25+
26+
#define PIN(p_port, p_pin, p_af, p_adc_channel) \
27+
{ \
28+
{ &mcu_pin_type }, \
29+
.name = MP_QSTR_ ## p_port ## p_pin, \
30+
.port = PORT_ ## p_port, \
31+
.pin = (p_pin), \
32+
.num_af = (sizeof(p_af) / sizeof(pin_af_obj_t)), \
33+
/*.pin_mask = (1 << p_pin), */\
34+
.af = p_af, \
35+
.adc_channel = p_adc_channel,\
36+
}
37+
38+
#define NO_ADC 0
39+
40+
const pin_obj_t pin_A0 = PIN(A, 0, NULL, 0);
41+
const pin_obj_t pin_A1 = PIN(A, 1, NULL, 0);
42+
const pin_obj_t pin_A2 = PIN(A, 2, NULL, SAADC_CH_PSELP_PSELP_AnalogInput0);
43+
const pin_obj_t pin_A3 = PIN(A, 3, NULL, SAADC_CH_PSELP_PSELP_AnalogInput1);
44+
const pin_obj_t pin_A4 = PIN(A, 4, NULL, SAADC_CH_PSELP_PSELP_AnalogInput2);
45+
const pin_obj_t pin_A5 = PIN(A, 5, NULL, SAADC_CH_PSELP_PSELP_AnalogInput3);
46+
const pin_obj_t pin_A6 = PIN(A, 6, NULL, 0);
47+
const pin_obj_t pin_A7 = PIN(A, 7, NULL, 0);
48+
const pin_obj_t pin_A8 = PIN(A, 8, NULL, 0);
49+
const pin_obj_t pin_A9 = PIN(A, 9, NULL, 0);
50+
const pin_obj_t pin_A10 = PIN(A, 10, NULL, 0);
51+
const pin_obj_t pin_A11 = PIN(A, 11, NULL, 0);
52+
const pin_obj_t pin_A12 = PIN(A, 12, NULL, 0);
53+
const pin_obj_t pin_A13 = PIN(A, 13, NULL, 0);
54+
const pin_obj_t pin_A14 = PIN(A, 14, NULL, 0);
55+
const pin_obj_t pin_A15 = PIN(A, 15, NULL, 0);
56+
const pin_obj_t pin_A16 = PIN(A, 16, NULL, 0);
57+
const pin_obj_t pin_A17 = PIN(A, 17, NULL, 0);
58+
const pin_obj_t pin_A18 = PIN(A, 18, NULL, 0);
59+
const pin_obj_t pin_A19 = PIN(A, 19, NULL, 0);
60+
const pin_obj_t pin_A20 = PIN(A, 20, NULL, 0);
61+
const pin_obj_t pin_A21 = PIN(A, 21, NULL, 0);
62+
const pin_obj_t pin_A22 = PIN(A, 22, NULL, 0);
63+
const pin_obj_t pin_A23 = PIN(A, 23, NULL, 0);
64+
const pin_obj_t pin_A24 = PIN(A, 24, NULL, 0);
65+
const pin_obj_t pin_A25 = PIN(A, 25, NULL, 0);
66+
const pin_obj_t pin_A26 = PIN(A, 26, NULL, 0);
67+
const pin_obj_t pin_A27 = PIN(A, 27, NULL, 0);
68+
const pin_obj_t pin_A28 = PIN(A, 28, NULL, SAADC_CH_PSELP_PSELP_AnalogInput4);
69+
const pin_obj_t pin_A29 = PIN(A, 29, NULL, SAADC_CH_PSELP_PSELP_AnalogInput5);
70+
const pin_obj_t pin_A30 = PIN(A, 30, NULL, SAADC_CH_PSELP_PSELP_AnalogInput6);
71+
const pin_obj_t pin_A31 = PIN(A, 31, NULL, SAADC_CH_PSELP_PSELP_AnalogInput7);
72+
const pin_obj_t pin_B0 = PIN(B, 0, NULL, 0);
73+
const pin_obj_t pin_B1 = PIN(B, 1, NULL, 0);
74+
const pin_obj_t pin_B2 = PIN(B, 2, NULL, 0);
75+
const pin_obj_t pin_B3 = PIN(B, 3, NULL, 0);
76+
const pin_obj_t pin_B4 = PIN(B, 4, NULL, 0);
77+
const pin_obj_t pin_B5 = PIN(B, 5, NULL, 0);
78+
const pin_obj_t pin_B6 = PIN(B, 6, NULL, 0);
79+
const pin_obj_t pin_B7 = PIN(B, 7, NULL, 0);
80+
const pin_obj_t pin_B8 = PIN(B, 8, NULL, 0);
81+
const pin_obj_t pin_B9 = PIN(B, 9, NULL, 0);
82+
const pin_obj_t pin_B10 = PIN(B, 10, NULL, 0);
83+
const pin_obj_t pin_B11 = PIN(B, 11, NULL, 0);
84+
const pin_obj_t pin_B12 = PIN(B, 12, NULL, 0);
85+
const pin_obj_t pin_B13 = PIN(B, 13, NULL, 0);
86+
const pin_obj_t pin_B14 = PIN(B, 14, NULL, 0);
87+
const pin_obj_t pin_B15 = PIN(B, 15, NULL, 0);
88+
89+
STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
90+
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_A0) },
91+
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_A1) },
92+
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_A2) },
93+
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_A3) },
94+
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_A4) },
95+
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_A5) },
96+
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_A6) },
97+
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_A7) },
98+
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_A8) },
99+
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_A9) },
100+
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_A10) },
101+
{ MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_A11) },
102+
{ MP_ROM_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_A12) },
103+
{ MP_ROM_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_A13) },
104+
{ MP_ROM_QSTR(MP_QSTR_A14), MP_ROM_PTR(&pin_A14) },
105+
{ MP_ROM_QSTR(MP_QSTR_A15), MP_ROM_PTR(&pin_A15) },
106+
{ MP_ROM_QSTR(MP_QSTR_A16), MP_ROM_PTR(&pin_A16) },
107+
{ MP_ROM_QSTR(MP_QSTR_A17), MP_ROM_PTR(&pin_A17) },
108+
{ MP_ROM_QSTR(MP_QSTR_A18), MP_ROM_PTR(&pin_A18) },
109+
{ MP_ROM_QSTR(MP_QSTR_A19), MP_ROM_PTR(&pin_A19) },
110+
{ MP_ROM_QSTR(MP_QSTR_A20), MP_ROM_PTR(&pin_A20) },
111+
{ MP_ROM_QSTR(MP_QSTR_A21), MP_ROM_PTR(&pin_A21) },
112+
{ MP_ROM_QSTR(MP_QSTR_A22), MP_ROM_PTR(&pin_A22) },
113+
{ MP_ROM_QSTR(MP_QSTR_A23), MP_ROM_PTR(&pin_A23) },
114+
{ MP_ROM_QSTR(MP_QSTR_A24), MP_ROM_PTR(&pin_A24) },
115+
{ MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_A25) },
116+
{ MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_A26) },
117+
{ MP_ROM_QSTR(MP_QSTR_A27), MP_ROM_PTR(&pin_A27) },
118+
{ MP_ROM_QSTR(MP_QSTR_A28), MP_ROM_PTR(&pin_A28) },
119+
{ MP_ROM_QSTR(MP_QSTR_A29), MP_ROM_PTR(&pin_A29) },
120+
{ MP_ROM_QSTR(MP_QSTR_A30), MP_ROM_PTR(&pin_A30) },
121+
{ MP_ROM_QSTR(MP_QSTR_A31), MP_ROM_PTR(&pin_A31) },
122+
{ MP_ROM_QSTR(MP_QSTR_B0), MP_ROM_PTR(&pin_B0) },
123+
{ MP_ROM_QSTR(MP_QSTR_B1), MP_ROM_PTR(&pin_B1) },
124+
{ MP_ROM_QSTR(MP_QSTR_B2), MP_ROM_PTR(&pin_B2) },
125+
{ MP_ROM_QSTR(MP_QSTR_B3), MP_ROM_PTR(&pin_B3) },
126+
{ MP_ROM_QSTR(MP_QSTR_B4), MP_ROM_PTR(&pin_B4) },
127+
{ MP_ROM_QSTR(MP_QSTR_B5), MP_ROM_PTR(&pin_B5) },
128+
{ MP_ROM_QSTR(MP_QSTR_B6), MP_ROM_PTR(&pin_B6) },
129+
{ MP_ROM_QSTR(MP_QSTR_B7), MP_ROM_PTR(&pin_B7) },
130+
{ MP_ROM_QSTR(MP_QSTR_B8), MP_ROM_PTR(&pin_B8) },
131+
{ MP_ROM_QSTR(MP_QSTR_B9), MP_ROM_PTR(&pin_B9) },
132+
{ MP_ROM_QSTR(MP_QSTR_B10), MP_ROM_PTR(&pin_B10) },
133+
{ MP_ROM_QSTR(MP_QSTR_B11), MP_ROM_PTR(&pin_B11) },
134+
{ MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_B12) },
135+
{ MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_B13) },
136+
{ MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_B14) },
137+
{ MP_ROM_QSTR(MP_QSTR_B15), MP_ROM_PTR(&pin_B15) },
138+
};
139+
MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);
140+
141+
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
142+
{ MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_A0) },
143+
{ MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_A1) },
144+
{ MP_ROM_QSTR(MP_QSTR_PA2), MP_ROM_PTR(&pin_A2) },
145+
{ MP_ROM_QSTR(MP_QSTR_PA3), MP_ROM_PTR(&pin_A3) },
146+
{ MP_ROM_QSTR(MP_QSTR_PA4), MP_ROM_PTR(&pin_A4) },
147+
{ MP_ROM_QSTR(MP_QSTR_PA5), MP_ROM_PTR(&pin_A5) },
148+
{ MP_ROM_QSTR(MP_QSTR_PA6), MP_ROM_PTR(&pin_A6) },
149+
{ MP_ROM_QSTR(MP_QSTR_PA7), MP_ROM_PTR(&pin_A7) },
150+
{ MP_ROM_QSTR(MP_QSTR_PA8), MP_ROM_PTR(&pin_A8) },
151+
{ MP_ROM_QSTR(MP_QSTR_PA9), MP_ROM_PTR(&pin_A9) },
152+
{ MP_ROM_QSTR(MP_QSTR_PA10), MP_ROM_PTR(&pin_A10) },
153+
{ MP_ROM_QSTR(MP_QSTR_PA11), MP_ROM_PTR(&pin_A11) },
154+
{ MP_ROM_QSTR(MP_QSTR_PA12), MP_ROM_PTR(&pin_A12) },
155+
{ MP_ROM_QSTR(MP_QSTR_PA13), MP_ROM_PTR(&pin_A13) },
156+
{ MP_ROM_QSTR(MP_QSTR_PA14), MP_ROM_PTR(&pin_A14) },
157+
{ MP_ROM_QSTR(MP_QSTR_PA15), MP_ROM_PTR(&pin_A15) },
158+
{ MP_ROM_QSTR(MP_QSTR_PA16), MP_ROM_PTR(&pin_A16) },
159+
{ MP_ROM_QSTR(MP_QSTR_PA17), MP_ROM_PTR(&pin_A17) },
160+
{ MP_ROM_QSTR(MP_QSTR_PA18), MP_ROM_PTR(&pin_A18) },
161+
{ MP_ROM_QSTR(MP_QSTR_PA19), MP_ROM_PTR(&pin_A19) },
162+
{ MP_ROM_QSTR(MP_QSTR_PA20), MP_ROM_PTR(&pin_A20) },
163+
{ MP_ROM_QSTR(MP_QSTR_PA21), MP_ROM_PTR(&pin_A21) },
164+
{ MP_ROM_QSTR(MP_QSTR_PA22), MP_ROM_PTR(&pin_A22) },
165+
{ MP_ROM_QSTR(MP_QSTR_PA23), MP_ROM_PTR(&pin_A23) },
166+
{ MP_ROM_QSTR(MP_QSTR_PA24), MP_ROM_PTR(&pin_A24) },
167+
{ MP_ROM_QSTR(MP_QSTR_PA25), MP_ROM_PTR(&pin_A25) },
168+
{ MP_ROM_QSTR(MP_QSTR_PA26), MP_ROM_PTR(&pin_A26) },
169+
{ MP_ROM_QSTR(MP_QSTR_PA27), MP_ROM_PTR(&pin_A27) },
170+
{ MP_ROM_QSTR(MP_QSTR_PA28), MP_ROM_PTR(&pin_A28) },
171+
{ MP_ROM_QSTR(MP_QSTR_PA29), MP_ROM_PTR(&pin_A29) },
172+
{ MP_ROM_QSTR(MP_QSTR_PA30), MP_ROM_PTR(&pin_A30) },
173+
{ MP_ROM_QSTR(MP_QSTR_PA31), MP_ROM_PTR(&pin_A31) },
174+
{ MP_ROM_QSTR(MP_QSTR_PB0), MP_ROM_PTR(&pin_B0) },
175+
{ MP_ROM_QSTR(MP_QSTR_PB1), MP_ROM_PTR(&pin_B1) },
176+
{ MP_ROM_QSTR(MP_QSTR_PB2), MP_ROM_PTR(&pin_B2) },
177+
{ MP_ROM_QSTR(MP_QSTR_PB3), MP_ROM_PTR(&pin_B3) },
178+
{ MP_ROM_QSTR(MP_QSTR_PB4), MP_ROM_PTR(&pin_B4) },
179+
{ MP_ROM_QSTR(MP_QSTR_PB5), MP_ROM_PTR(&pin_B5) },
180+
{ MP_ROM_QSTR(MP_QSTR_PB6), MP_ROM_PTR(&pin_B6) },
181+
{ MP_ROM_QSTR(MP_QSTR_PB7), MP_ROM_PTR(&pin_B7) },
182+
{ MP_ROM_QSTR(MP_QSTR_PB8), MP_ROM_PTR(&pin_B8) },
183+
{ MP_ROM_QSTR(MP_QSTR_PB9), MP_ROM_PTR(&pin_B9) },
184+
{ MP_ROM_QSTR(MP_QSTR_PB10), MP_ROM_PTR(&pin_B10) },
185+
{ MP_ROM_QSTR(MP_QSTR_PB11), MP_ROM_PTR(&pin_B11) },
186+
{ MP_ROM_QSTR(MP_QSTR_PB12), MP_ROM_PTR(&pin_B12) },
187+
{ MP_ROM_QSTR(MP_QSTR_PB13), MP_ROM_PTR(&pin_B13) },
188+
{ MP_ROM_QSTR(MP_QSTR_PB14), MP_ROM_PTR(&pin_B14) },
189+
{ MP_ROM_QSTR(MP_QSTR_PB15), MP_ROM_PTR(&pin_B15) },
190+
};
191+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

0 commit comments

Comments
 (0)