This commit is contained in:
Attila Body 2021-10-31 01:00:43 +02:00
parent 662a7a9b12
commit 7eedbfdf9b
8 changed files with 80 additions and 68 deletions

View file

@ -4,8 +4,10 @@
#include <string.h>
#include <stdarg.h>
#if defined(FREERTOS)
#include <FreeRTOS.h>
#include <task.h>
#endif
#define LCD_L 320
#define LCD_S 240
@ -278,6 +280,16 @@ void Ili9341Fsmc::Print(char const *str, uint8_t len, bool transparent)
}
}
void Ili9341Fsmc::Delay(uint32_t ms)
{
#if defined(FREERTOS)
vTaskDelay(pdMS_TO_TICKS(ms));
#else
LL_mDelay(ms);
#endif
}
void Ili9341Fsmc::Test()
{
// static PixelPair linebuf[320/2];

View file

@ -55,6 +55,8 @@ private:
void SetupDmaSize(uint32_t size);
uint16_t AdjustY(uint16_t y) { return (m_scrollOffset + y) % m_height; }
void Delay(uint32_t ms);
volatile bool m_dmaEngineBusy = false;
uint32_t m_dmaRemainingPixels = 0;
uint16_t m_dmaColor = 0;