-
Notifications
You must be signed in to change notification settings - Fork 3
/
esp8266.cpp
34 lines (30 loc) · 1.07 KB
/
esp8266.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
esp8266.cpp - Small Library for my esp2866 functions.
*/
#include <ESP8266WiFi.h>
#include "debug.h"
#include "Arduino.h"
#include "esp8266.h"
void MyESP::chipInfo() {
#ifdef debugMode
uint32_t realSize = ESP.getFlashChipRealSize();
uint32_t ideSize = ESP.getFlashChipSize();
FlashMode_t ideMode = ESP.getFlashChipMode();
Serial.println();
Serial.println("------");
Serial.printf("Flash real id: %08X\n", ESP.getFlashChipId());
Serial.printf("Flash real size: %u\n\n", realSize);
Serial.printf("Flash ide size: %u\n", ideSize);
Serial.printf("Flash ide speed: %u\n", ESP.getFlashChipSpeed());
Serial.printf("Flash ide mode: %s\n", (ideMode == FM_QIO ? "QIO" : ideMode == FM_QOUT ? "QOUT" : ideMode == FM_DIO ? "DIO" : ideMode == FM_DOUT ? "DOUT" : "UNKNOWN"));
Serial.println();
if(ideSize != realSize) {
Serial.println("Flash Chip configuration wrong!");
} else {
Serial.println("Flash Chip configuration ok.");
}
Serial.println("------");
Serial.println();
#endif
}
void MyESP::getConfig() { }