removed this->

This commit is contained in:
Lubos Petrovic
2020-12-03 11:24:58 +01:00
parent 56198a6fd0
commit e2100ad6bf
11 changed files with 1631 additions and 1598 deletions

View File

@@ -4,21 +4,58 @@
#include "BoardInterface.h"
#include "Board320_240.h"
#include "BoardM5stackCore.h"
#include <SPI.h>
#include <SD.h>
/**
Init board
*/
void BoardM5stackCore::initBoard() {
this->invertDisplay = true;
this->pinButtonLeft = BUTTON_LEFT;
this->pinButtonRight = BUTTON_RIGHT;
this->pinButtonMiddle = BUTTON_MIDDLE;
this->pinSpeaker = SPEAKER_PIN;
this->pinBrightness = TFT_BL;
invertDisplay = true;
pinButtonLeft = BUTTON_LEFT;
pinButtonRight = BUTTON_RIGHT;
pinButtonMiddle = BUTTON_MIDDLE;
pinSpeaker = SPEAKER_PIN;
pinBrightness = TFT_BL;
Board320_240::initBoard();
}
void BoardM5stackCore::mainLoop() {
Board320_240::mainLoop();
/*#define TFCARD_CS_PIN 4
if (!SD.begin(TFCARD_CS_PIN, SPI, 40000000)) {
Serial.println("Card Mount Failed");
return;
}
uint8_t cardType = SD.cardType();
if (cardType == CARD_NONE) {
Serial.println("No SD card attached");
return;
}
Serial.print("SD Card Type: ");
if (cardType == CARD_MMC) {
Serial.println("MMC");
} else if (cardType == CARD_SD) {
Serial.println("SDSC");
} else if (cardType == CARD_SDHC) {
Serial.println("SDHC");
} else {
Serial.println("UNKNOWN");
}
uint64_t cardSize = SD.cardSize() / (1024 * 1024);
Serial.printf("SD Card Size: %lluMB\n", cardSize);
Serial.printf("Total space: %lluMB\n", SD.totalBytes() / (1024 * 1024));
Serial.printf("Used space: %lluMB\n", SD.usedBytes() / (1024 * 1024));
*/
}
#endif // BOARDM5STACKCORE_CPP