Skip to content

Commit daf90aa

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into pulseout_switch
2 parents 412eb87 + 8258f51 commit daf90aa

File tree

16 files changed

+86
-38
lines changed

16 files changed

+86
-38
lines changed

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ Behavior
140140
- Autoreload is disabled while the REPL is active.
141141
- Main is one of these: ``code.txt``, ``code.py``, ``main.py``,
142142
``main.txt``
143-
- Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``,
144-
``boot.txt``
143+
- Boot is one of these: ``boot.py``, ``boot.txt``
145144

146145
API
147146
~~~

locale/pt_BR.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
88
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
9-
"PO-Revision-Date: 2021-07-23 12:45+0000\n"
9+
"PO-Revision-Date: 2021-07-24 15:35+0000\n"
1010
"Last-Translator: Wellington Terumi Uemura <[email protected]>\n"
1111
"Language-Team: \n"
1212
"Language: pt_BR\n"
@@ -1222,7 +1222,7 @@ msgstr "Erro de entrada/saída"
12221222
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
12231223
#, c-format
12241224
msgid "Missing jmp_pin. Instruction %d jumps on pin"
1225-
msgstr ""
1225+
msgstr "Falta o jmp_pin. A instrução %d salta no pino"
12261226

12271227
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
12281228
#, c-format

locale/sv.po

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
88
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
9-
"PO-Revision-Date: 2021-07-22 18:33+0000\n"
9+
"PO-Revision-Date: 2021-07-24 15:35+0000\n"
1010
"Last-Translator: Jonny Bergdahl <[email protected]>\n"
1111
"Language-Team: LANGUAGE <[email protected]>\n"
1212
"Language: sv\n"
@@ -1207,7 +1207,7 @@ msgstr "Indata-/utdatafel"
12071207
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
12081208
#, c-format
12091209
msgid "Missing jmp_pin. Instruction %d jumps on pin"
1210-
msgstr ""
1210+
msgstr "Saknar jmp_pin. Instruktion %d hoppar på pin"
12111211

12121212
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
12131213
#, c-format
@@ -2846,7 +2846,7 @@ msgstr ""
28462846

28472847
#: extmod/ulab/code/ndarray.c
28482848
msgid "cannot assign new shape"
2849-
msgstr ""
2849+
msgstr "kan inte tilldela en ny form"
28502850

28512851
#: extmod/ulab/code/ndarray_operators.c
28522852
msgid "cannot cast output with casting rule"
@@ -3600,7 +3600,7 @@ msgstr "memoryview: längden är inte en multipel av itemsize"
36003600

36013601
#: extmod/ulab/code/numpy/linalg/linalg.c
36023602
msgid "mode must be complete, or reduced"
3603-
msgstr ""
3603+
msgstr "mode måste vara complete, eller reduced"
36043604

36053605
#: py/builtinimport.c
36063606
msgid "module not found"
@@ -3846,11 +3846,11 @@ msgstr "operander kan inte sändas tillsammans"
38463846

38473847
#: extmod/ulab/code/numpy/linalg/linalg.c
38483848
msgid "operation is defined for 2D arrays only"
3849-
msgstr ""
3849+
msgstr "operation definierad endast för 2D-matriser"
38503850

38513851
#: extmod/ulab/code/numpy/linalg/linalg.c
38523852
msgid "operation is defined for ndarrays only"
3853-
msgstr ""
3853+
msgstr "operation definierad endast för ndarrays"
38543854

38553855
#: extmod/ulab/code/ndarray.c
38563856
msgid "operation is implemented for 1D Boolean arrays only"

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
631631
&& safe_mode == NO_SAFE_MODE
632632
&& MP_STATE_VM(vfs_mount_table) != NULL;
633633

634-
static const char * const boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt");
634+
static const char * const boot_py_filenames[] = STRING_LIST("boot.py", "boot.txt");
635635
bool skip_boot_output = false;
636636

637637
if (ok_to_run) {

ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ CIRCUITPY_RTC = 0
2121
CIRCUITPY_USB_MIDI = 0
2222

2323
CIRCUITPY_PIXELBUF = 1
24+
CIRCUITPY_BUSDEVICE = 1
2425

2526
# Include these Python libraries in firmware.
2627
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#define MICROPY_HW_LED_STATUS (&pin_PA17)
55

6+
#define MICROPY_HW_NEOPIXEL (&pin_PB23)
7+
#define MICROPY_HW_NEOPIXEL_COUNT (10)
8+
69
// Don't allow touch on A0 (PA02), because it's connected to the speaker.
710
#define PA02_NO_TOUCH (true)
811

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#define MICROPY_HW_LED_STATUS (&pin_PA17)
55

6+
#define MICROPY_HW_NEOPIXEL (&pin_PB23)
7+
#define MICROPY_HW_NEOPIXEL_COUNT (10)
8+
69
// Don't allow touch on A0 (PA02), because it's connected to the speaker.
710
#define PA02_NO_TOUCH (true)
811

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#define MICROPY_HW_LED_STATUS (&pin_PA17)
55

6+
#define MICROPY_HW_NEOPIXEL (&pin_PB23)
7+
#define MICROPY_HW_NEOPIXEL_COUNT (10)
8+
69
// Don't allow touch on A0 (PA02), because it's connected to the speaker.
710
#define PA02_NO_TOUCH (true)
811

ports/nrf/boards/circuitplayground_bluefruit/board.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,31 @@
3333
#include "nrf_gpio.h"
3434

3535
void board_init(void) {
36+
// Turn on power to sensors and neopixels.
37+
nrf_gpio_cfg(POWER_SWITCH_PIN->number,
38+
NRF_GPIO_PIN_DIR_OUTPUT,
39+
NRF_GPIO_PIN_INPUT_DISCONNECT,
40+
NRF_GPIO_PIN_NOPULL,
41+
NRF_GPIO_PIN_S0S1,
42+
NRF_GPIO_PIN_NOSENSE);
43+
nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false);
3644
}
3745

38-
bool board_requests_safe_mode(void) {
39-
return false;
40-
}
41-
42-
void reset_board(void) {
43-
// Turn off board.POWER_SWITCH (power-saving switch) on each soft reload, to prevent confusion.
46+
void board_deinit(void) {
47+
// Turn off power to sensors and neopixels.
4448
nrf_gpio_cfg(POWER_SWITCH_PIN->number,
4549
NRF_GPIO_PIN_DIR_OUTPUT,
4650
NRF_GPIO_PIN_INPUT_DISCONNECT,
4751
NRF_GPIO_PIN_NOPULL,
4852
NRF_GPIO_PIN_S0S1,
4953
NRF_GPIO_PIN_NOSENSE);
50-
nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false);
54+
nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true);
55+
}
5156

57+
bool board_requests_safe_mode(void) {
58+
return false;
59+
}
60+
61+
void reset_board(void) {
5262
board_reset_user_neopixels(&pin_P0_13, 10);
5363
}

ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232

3333
#define MICROPY_HW_LED_STATUS (&pin_P1_14)
3434

35+
#define MICROPY_HW_NEOPIXEL (&pin_P0_13)
36+
#define MICROPY_HW_NEOPIXEL_COUNT (10)
37+
3538
// Board does not have a 32kHz crystal. It does have a 32MHz crystal.
3639
#define BOARD_HAS_32KHZ_XTAL (0)
3740

ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ USB_MANUFACTURER = "Arduino"
77
CHIP_VARIANT = RP2040
88
CHIP_FAMILY = rp2
99

10-
EXTERNAL_FLASH_DEVICES = "AT25SF128A"
10+
EXTERNAL_FLASH_DEVICES = "AT25SF128A, IS25LP128F"
1111

1212
CIRCUITPY__EVE = 1

ports/stm/boards/STM32F411_nofs.ld

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
GNU linker script for STM32F411 without nvm and an external flash chip.
3+
No space is reserved for a filesystem.
4+
*/
5+
6+
/* Specify the memory areas */
7+
MEMORY
8+
{
9+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
10+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08004000, LENGTH = 496K /* sectors 1,2,3 are 16k, sector 4 is 64K, sectors 5,6,7 are 128K */
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
13+
}
14+
15+
/* produce a link error if there is not this amount of RAM for these sections */
16+
_minimum_stack_size = 24K;
17+
_minimum_heap_size = 16K;
18+
19+
/* Define the top end of the stack. The stack is full descending so begins just
20+
above last byte of RAM. Note that EABI requires the stack to be 8-byte
21+
aligned for a call. */
22+
_estack = ORIGIN(RAM) + LENGTH(RAM);
23+
24+
/* RAM extents for the garbage collector */
25+
_ram_start = ORIGIN(RAM);
26+
_ram_end = ORIGIN(RAM) + LENGTH(RAM);

ports/stm/boards/feather_stm32f405_express/pins.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
5050
{ MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PD02) },
5151
{ MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) },
5252

53-
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB09) },
54-
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB08) },
53+
{ MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB08) },
54+
{ MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB09) },
5555
};
5656
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,4 @@ MCU_VARIANT = STM32F411xE
1515
MCU_PACKAGE = UFQFPN48
1616

1717
LD_COMMON = boards/common_default.ld
18-
LD_FILE = boards/STM32F411_nvm_nofs.ld
19-
20-
# Too big for the flash
21-
CIRCUITPY_AUDIOCORE = 0
22-
CIRCUITPY_AUDIOPWMIO = 0
23-
CIRCUITPY_SYNTHIO = 0
24-
CIRCUITPY_BITMAPTOOLS = 0
25-
CIRCUITPY_VECTORIO = 0
18+
LD_FILE = boards/STM32F411_nofs.ld

ports/stm/peripherals/stm32f4/stm32f405xx/periph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const mcu_periph_obj_t mcu_sdio_data3_list[1] = {
220220
// CAN
221221
CAN_TypeDef *mcu_can_banks[2] = {CAN1, CAN2};
222222

223-
const mcu_periph_obj_t mcu_can_tx_list[6] = {
223+
const mcu_periph_obj_t mcu_can_rx_list[6] = {
224224
PERIPH(1, 9, &pin_PA11),
225225
PERIPH(1, 9, &pin_PB08),
226226
PERIPH(1, 9, &pin_PD00),
@@ -230,7 +230,7 @@ const mcu_periph_obj_t mcu_can_tx_list[6] = {
230230
PERIPH(2, 9, &pin_PB05),
231231
};
232232

233-
const mcu_periph_obj_t mcu_can_rx_list[6] = {
233+
const mcu_periph_obj_t mcu_can_tx_list[6] = {
234234
PERIPH(1, 9, &pin_PA12),
235235
PERIPH(1, 9, &pin_PB09),
236236
PERIPH(1, 9, &pin_PD01),

supervisor/shared/status_leds.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ static digitalio_digitalinout_obj_t _status_power;
3939

4040
#ifdef MICROPY_HW_NEOPIXEL
4141
uint8_t rgb_status_brightness = 63;
42-
#include "shared-bindings/digitalio/DigitalInOut.h"
43-
#include "shared-bindings/neopixel_write/__init__.h"
44-
static uint8_t status_neopixel_color[3];
42+
#include "shared-bindings/digitalio/DigitalInOut.h"
43+
#include "shared-bindings/neopixel_write/__init__.h"
44+
45+
#ifndef MICROPY_HW_NEOPIXEL_COUNT
46+
#define MICROPY_HW_NEOPIXEL_COUNT (1)
47+
#endif
48+
49+
static uint8_t status_neopixel_color[3 * MICROPY_HW_NEOPIXEL_COUNT];
4550
static digitalio_digitalinout_obj_t status_neopixel;
4651

4752
#elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
@@ -240,10 +245,12 @@ void new_status_color(uint32_t rgb) {
240245
#endif
241246

242247
#ifdef MICROPY_HW_NEOPIXEL
243-
status_neopixel_color[0] = (rgb_adjusted >> 8) & 0xff;
244-
status_neopixel_color[1] = (rgb_adjusted >> 16) & 0xff;
245-
status_neopixel_color[2] = rgb_adjusted & 0xff;
246-
common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3);
248+
for (size_t i = 0; i < MICROPY_HW_NEOPIXEL_COUNT; i++) {
249+
status_neopixel_color[3 * i + 0] = (rgb_adjusted >> 8) & 0xff;
250+
status_neopixel_color[3 * i + 1] = (rgb_adjusted >> 16) & 0xff;
251+
status_neopixel_color[3 * i + 2] = rgb_adjusted & 0xff;
252+
}
253+
common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3 * MICROPY_HW_NEOPIXEL_COUNT);
247254

248255
#elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
249256
status_apa102_color[5] = rgb_adjusted & 0xff;

0 commit comments

Comments
 (0)