mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 14:42:05 +00:00
add spi_host support
This commit is contained in:
parent
5c05c81ece
commit
ae82c32c29
@ -1,6 +1,6 @@
|
||||
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
||||
[portduino_base]
|
||||
platform = https://github.com/meshtastic/platform-native.git#659e49346aa33008b150dfb206b1817ddabc7132
|
||||
platform = https://github.com/meshtastic/platform-native.git#2ef818943157a3ebea7cbbc283d124fb67c0ffc1
|
||||
framework = arduino
|
||||
|
||||
build_src_filter =
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c6f3ee6d68e8ce9acd36d95f6e810423986c7c56
|
||||
Subproject commit 7a39caafd43bf2c149d9e61f2a6935b31d242044
|
12
src/main.cpp
12
src/main.cpp
@ -679,6 +679,9 @@ void setup()
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
auto spiHost = [](const std::string &spidev) {
|
||||
return spidev.empty() ? 0 : (spidev[11] - '0') | (spidev[13] - '0') << 4;
|
||||
};
|
||||
displayConfig.device(DisplayDriverConfig::device_t::CUSTOM_TFT)
|
||||
.panel(DisplayDriverConfig::panel_config_t{.type = panels[settingsMap[displayPanel]],
|
||||
.panel_width = (uint16_t)settingsMap[displayWidth],
|
||||
@ -693,16 +696,15 @@ void setup()
|
||||
.rgb_order = (bool)settingsMap[displayRGBOrder]})
|
||||
.bus(DisplayDriverConfig::bus_config_t{.freq_write = (uint32_t)settingsMap[displayBusFrequency],
|
||||
.freq_read = 16000000,
|
||||
.spi{
|
||||
.pin_dc = (int8_t)settingsMap[displayDC], .use_lock = true,
|
||||
// .spi_host = 0 // TODO:
|
||||
}})
|
||||
.spi{.pin_dc = (int8_t)settingsMap[displayDC],
|
||||
.use_lock = true,
|
||||
.spi_host = (uint16_t)spiHost(settingsStrings[displayspidev])}})
|
||||
.touch(DisplayDriverConfig::touch_config_t{.type = touch[settingsMap[touchscreenModule]],
|
||||
.freq = (uint32_t)settingsMap[touchscreenBusFrequency],
|
||||
.pin_int = (int16_t)settingsMap[touchscreenIRQ],
|
||||
.offset_rotation = (uint8_t)settingsMap[touchscreenRotate],
|
||||
.spi{
|
||||
.spi_host = 0, // TODO:
|
||||
.spi_host = (int8_t)spiHost(settingsStrings[touchscreenspidev]),
|
||||
},
|
||||
.pin_cs = (int16_t)settingsMap[touchscreenCS]})
|
||||
.light(DisplayDriverConfig::light_config_t{.pin_bl = (int16_t)settingsMap[displayBacklight],
|
||||
|
Loading…
Reference in New Issue
Block a user