Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf33ad9

Browse files
committed
atmel-samd/samd21: Enable long int on Express boards
This is necessary for using 1970 epoch in the time module.
1 parent1eb412b commitcf33ad9

File tree

10 files changed

+23
-0
lines changed

10 files changed

+23
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#defineMICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express"
22
#defineMICROPY_HW_MCU_NAME "samd21g18"
33

4+
#defineMICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
5+
#defineMP_SSIZE_MAX 0x7fffffff
6+
47
// Don't allow touch on A0 (PA02), because it's connected to the speaker.
58
#definePA02_NO_TOUCH (true)
69

‎ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ SPI_FLASH_FILESYSTEM = 1
99
CHIP_VARIANT = SAMD21G18A
1010
CHIP_FAMILY = samd21
1111

12+
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
13+
1214
# Include these Python libraries in firmware.
1315
FROZEN_MPY_DIRS +=$(TOP)/frozen/Adafruit_CircuitPython_BusDevice
1416
FROZEN_MPY_DIRS +=$(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground

‎ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#defineMICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express"
22
#defineMICROPY_HW_MCU_NAME "samd21g18"
33

4+
#defineMICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
5+
#defineMP_SSIZE_MAX 0x7fffffff
6+
47
#defineMICROPY_HW_NEOPIXEL (&pin_PA06)
58

69
// Clock rates are off: Salae reads 12MHz which is the limit even though we set it to the safer 8MHz.

‎ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ SPI_FLASH_FILESYSTEM = 1
88

99
CHIP_VARIANT = SAMD21G18A
1010
CHIP_FAMILY = samd21
11+
12+
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz

‎ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#defineMICROPY_HW_BOARD_NAME "Adafruit Itsy Bitsy M0 Express"
22
#defineMICROPY_HW_MCU_NAME "samd21g18"
33

4+
#defineMICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
5+
#defineMP_SSIZE_MAX 0x7fffffff
6+
47
#defineCIRCUITPY_BITBANG_APA102
58
#defineMICROPY_HW_APA102_MOSI (&pin_PA01)
69
#defineMICROPY_HW_APA102_SCK (&pin_PA00)

‎ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ SPI_FLASH_FILESYSTEM = 1
99
CHIP_VARIANT = SAMD21G18A
1010
CHIP_FAMILY = samd21
1111

12+
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz

‎ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#defineMICROPY_HW_BOARD_NAME "Adafruit Metro M0 Express"
22
#defineMICROPY_HW_MCU_NAME "samd21g18"
33

4+
#defineMICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
5+
#defineMP_SSIZE_MAX 0x7fffffff
6+
47
#defineMICROPY_HW_LED_TX PIN_PA27
58
//#define MICROPY_HW_LED_RX PIN_PA31
69

‎ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ SPI_FLASH_FILESYSTEM = 1
88

99
CHIP_VARIANT = SAMD21G18A
1010
CHIP_FAMILY = samd21
11+
12+
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz

‎ports/atmel-samd/mpconfigport.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ typedef long mp_off_t;
141141
#defineMICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
142142
#definePORT_HEAP_SIZE (16384 + 4096)
143143
// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk.
144+
#ifndefMICROPY_LONGINT_IMPL
144145
#defineMICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
145146
#endif
147+
#endif
146148

147149
#ifdefSAMD51
148150
#defineCIRCUITPY_MCU_FAMILY samd51

‎ports/atmel-samd/mpconfigport.mk‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
33
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
44
ifeq ($(CHIP_FAMILY), samd21)
5+
ifndefMPY_TOOL_LONGINT_IMPL
56
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
67
endif
8+
endif
79

810
ifeq ($(CHIP_FAMILY), samd51)
911
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp