-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmicropython.cmake
More file actions
64 lines (50 loc) · 1.85 KB
/
Copy pathmicropython.cmake
File metadata and controls
64 lines (50 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# MicroPython CMake glue for displayif (ESP32, RP2, …).
#
# Included from cmods/micropython.cmake when displayif is a workspace sibling.
# Hardware interfaces build only on MCU ports — not unix, windows, etc.
set(DISPLAYIF_MOD_DIR ${CMAKE_CURRENT_LIST_DIR})
get_filename_component(_DISPLAYIF_PORT_DIR "${MICROPY_PORT_DIR}" ABSOLUTE)
set(DISPLAYIF_PORT_ESP32 FALSE)
set(DISPLAYIF_PORT_MIMXRT FALSE)
set(DISPLAYIF_PORT_SAMD FALSE)
set(DISPLAYIF_PORT_RP2 FALSE)
if(_DISPLAYIF_PORT_DIR MATCHES "/ports/esp32")
set(DISPLAYIF_PORT_ESP32 TRUE)
elseif(_DISPLAYIF_PORT_DIR MATCHES "/ports/mimxrt")
set(DISPLAYIF_PORT_MIMXRT TRUE)
elseif(_DISPLAYIF_PORT_DIR MATCHES "/ports/samd")
set(DISPLAYIF_PORT_SAMD TRUE)
elseif(_DISPLAYIF_PORT_DIR MATCHES "/ports/rp2")
set(DISPLAYIF_PORT_RP2 TRUE)
endif()
set(DISPLAYIF_IS_MCU FALSE)
if(DISPLAYIF_PORT_ESP32 OR DISPLAYIF_PORT_MIMXRT OR DISPLAYIF_PORT_SAMD OR DISPLAYIF_PORT_RP2)
set(DISPLAYIF_IS_MCU TRUE)
endif()
if(DISPLAYIF_PORT_ESP32 AND CONFIG_IDF_TARGET_ESP32S3)
set(DISPLAYIF_RGBMATRIX_USE_PROTOMATTER TRUE)
endif()
if(DISPLAYIF_PORT_MIMXRT AND BOARD MATCHES "TEENSY4.*|MIMXRT1060_EVK")
set(DISPLAYIF_RGBMATRIX_USE_PROTOMATTER TRUE)
endif()
if(DISPLAYIF_PORT_SAMD AND MCU_SERIES MATCHES "SAMD51")
set(DISPLAYIF_RGBMATRIX_USE_PROTOMATTER TRUE)
endif()
if(DISPLAYIF_PORT_RP2)
set(DISPLAYIF_RGBMATRIX_USE_PROTOMATTER TRUE)
endif()
if(DISPLAYIF_IS_MCU)
include(${DISPLAYIF_MOD_DIR}/ports/common/micropython.cmake)
endif()
if(DISPLAYIF_PORT_ESP32)
include(${DISPLAYIF_MOD_DIR}/ports/esp32/micropython.cmake)
endif()
if(DISPLAYIF_PORT_MIMXRT)
include(${DISPLAYIF_MOD_DIR}/ports/mimxrt/micropython.cmake)
endif()
if(DISPLAYIF_PORT_SAMD)
include(${DISPLAYIF_MOD_DIR}/ports/samd/micropython.cmake)
endif()
if(DISPLAYIF_PORT_RP2)
include(${DISPLAYIF_MOD_DIR}/ports/rp2/micropython.cmake)
endif()