mirror of
https://github.com/stasenso/Thermometr_pico.git
synced 2026-06-26 21:42:42 +03:00
Add DHT22 PIO reader and simplify display output
This commit is contained in:
+8
-3
@@ -38,6 +38,7 @@ target_link_libraries(display_engine PUBLIC
|
||||
hardware_spi
|
||||
hardware_dma
|
||||
hardware_timer
|
||||
hardware_pio
|
||||
pico_multicore
|
||||
)
|
||||
|
||||
@@ -46,7 +47,7 @@ target_link_libraries(display_engine PUBLIC
|
||||
target_compile_definitions(display_engine PUBLIC
|
||||
# EN: Select the display controller backend: ST7789 or ILI9341.
|
||||
# RU: Выберите бэкенд контроллера дисплея: ST7789 или ILI9341.
|
||||
DISPLAY_TYPE=DISPLAY_TYPE_ST7789
|
||||
DISPLAY_TYPE=DISPLAY_TYPE_ILI9341
|
||||
# EN: Select the SPI peripheral connected to the display: spi0 or spi1.
|
||||
# RU: Выберите SPI-периферию, к которой подключён дисплей: spi0 или spi1.
|
||||
DISPLAY_SPI_PORT=spi1
|
||||
@@ -58,6 +59,10 @@ target_compile_definitions(display_engine PUBLIC
|
||||
DISPLAY_PIN_BL=10 # BL / LED / LEDK
|
||||
)
|
||||
|
||||
add_executable(my_app src/main.c)
|
||||
add_executable(my_app
|
||||
src/main.c
|
||||
src/dht22.c
|
||||
)
|
||||
target_link_libraries(my_app PRIVATE display_engine)
|
||||
pico_add_extra_outputs(my_app)
|
||||
pico_generate_pio_header(my_app ${CMAKE_CURRENT_LIST_DIR}/src/dht22.pio)
|
||||
pico_add_extra_outputs(my_app)
|
||||
|
||||
Reference in New Issue
Block a user