summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-08-26 13:45:24 +1000
committerjacqueline <me@jacqueline.id.au>2024-08-26 13:45:24 +1000
commit275ade5d13f8e49e89ed14c7acff6644f5c644a1 (patch)
treebf52d67f5e9d2b5fc271790946a47f6d2e211fa4 /src
parent360cc5342eafdaa0a5176675cc27f083f1d9dd77 (diff)
downloadtangara-fw-275ade5d13f8e49e89ed14c7acff6644f5c644a1.tar.gz
Move some hot driver functions into iram
We've got the space for it now! Also turn SW radio coexistence off whilst we're here; the docs recommend this if you only use Bluetooth(R)
Diffstat (limited to 'src')
-rw-r--r--src/drivers/display.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/display.cpp b/src/drivers/display.cpp
index efc9df93..7321f20b 100644
--- a/src/drivers/display.cpp
+++ b/src/drivers/display.cpp
@@ -242,6 +242,7 @@ void Display::SendInitialisationSequence(const uint8_t* data) {
spi_device_release_bus(handle_);
}
+IRAM_ATTR
void Display::SendCommandWithData(uint8_t command,
const uint8_t* data,
size_t length) {
@@ -249,17 +250,20 @@ void Display::SendCommandWithData(uint8_t command,
SendData(data, length);
}
+IRAM_ATTR
void Display::SendCmd(const uint8_t* data, size_t length) {
SendTransaction(COMMAND, data, length);
}
+IRAM_ATTR
void Display::SendData(const uint8_t* data, size_t length) {
SendTransaction(DATA, data, length);
}
+IRAM_ATTR
void Display::SendTransaction(TransactionType type,
- const uint8_t* data,
- size_t length) {
+ const uint8_t* data,
+ size_t length) {
// TODO(jacqueline): What's sending this?
if (length == 0) {
return;
@@ -290,6 +294,7 @@ void Display::SendTransaction(TransactionType type,
ESP_ERROR_CHECK(spi_device_transmit(handle_, &sTransaction));
}
+IRAM_ATTR
void Display::OnLvglFlush(const lv_area_t* area, uint8_t* color_map) {
// Swap the pixel byte order first, since we don't want to do this whilst
// holding the SPI bus lock.