first commit
This commit is contained in:
commit
5893b00dd2
1669 changed files with 1982740 additions and 0 deletions
55
libraries/M5GFX/examples/Basic/VlwFont/VlwFont.ino
Normal file
55
libraries/M5GFX/examples/Basic/VlwFont/VlwFont.ino
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#include <SD.h>
|
||||
#include <SPIFFS.h>
|
||||
|
||||
#include <M5GFX.h>
|
||||
|
||||
M5GFX display;
|
||||
|
||||
static constexpr const uint8_t PIN_SD_CS = GPIO_NUM_4;
|
||||
|
||||
void setup(void)
|
||||
{
|
||||
display.init();
|
||||
display.print("SD wait.\n");
|
||||
|
||||
SPIFFS.begin();
|
||||
|
||||
if (!display.loadFont(SPIFFS, "/font.vlw"))
|
||||
{
|
||||
#if defined (_SD_H_)
|
||||
while (!SD.begin(PIN_SD_CS, SPI, 25000000))
|
||||
{
|
||||
ESP_LOGD("debug","SD begin failed");
|
||||
delay(500);
|
||||
}
|
||||
if (!display.loadFont(SD, "/font.vlw"))
|
||||
#endif
|
||||
{
|
||||
display.print("Font data not found...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void loop(void)
|
||||
{
|
||||
display.print("Hello World !");
|
||||
delay(500);
|
||||
}
|
||||
|
||||
#if !defined ( ARDUINO )
|
||||
extern "C" {
|
||||
void loopTask(void*)
|
||||
{
|
||||
setup();
|
||||
for (;;) {
|
||||
loop();
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
void app_main()
|
||||
{
|
||||
xTaskCreatePinnedToCore(loopTask, "loopTask", 8192, NULL, 1, NULL, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
BIN
libraries/M5GFX/examples/Basic/VlwFont/data/font.vlw
Normal file
BIN
libraries/M5GFX/examples/Basic/VlwFont/data/font.vlw
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue