This commit is contained in:
e2002
2022-06-28 14:53:55 +03:00
parent b7043b7d5c
commit 0d25b5fcd1
27 changed files with 246 additions and 14 deletions

View File

@@ -16,6 +16,9 @@
#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */
#endif
#define TAKE_MUTEX() if(player.mutex_pl) xSemaphoreTake(player.mutex_pl, portMAX_DELAY)
#define GIVE_MUTEX() if(player.mutex_pl) xSemaphoreGive(player.mutex_pl)
DspCore::DspCore(): Adafruit_ST7735(&SPI, TFT_CS, TFT_DC, TFT_RST) {
}
@@ -362,6 +365,16 @@ void DspCore::ip(const char* str) {
print(str);
}
void DspCore::startWrite(void) {
TAKE_MUTEX();
Adafruit_ST7735::startWrite();
}
void DspCore::endWrite(void) {
Adafruit_ST7735::endWrite();
GIVE_MUTEX();
}
void DspCore::set_TextSize(uint8_t s) {
setTextSize(s);
}