Skip to content

Commit a510473

Browse files
committed
Update Readme.
1 parent 86faf5d commit a510473

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

README.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@ The supported devices are Espressif's ESP32 and ESP8266 MCUs.
2727
* ESP8266 MCU
2828

2929

30-
## PSRAM support in ESP32
3130

32-
The library supports PSRAM in ESP32 via macro, in file **ESPFormFS.h**
31+
### Use SRAM/PSRAM in ESP32 and ESP8266
3332

34-
```
35-
#define ESPFORM_USE_PSRAM
36-
```
3733

3834
To enable PSRAM in ESP32 module with on-board PSRAM chip, in Arduino IDE
3935

40-
![Enable PSRAM in ESP32](media/images/ESP32-PSRAM.png)
36+
![Enable PSRAM in ESP32](/media/images/ESP32-PSRAM.png)
4137

4238

4339
In PlatformIO in VSCode IDE, add the following build_flags in your project's platformio.ini file
@@ -49,6 +45,46 @@ build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
4945
*When config the IDE or add the build flags to use PSRAM in the ESP32 dev boards that do not have on-board PSRAM chip, your device will be crashed (reset).
5046

5147

48+
In ESP8266, to use external Heap from 1 Mbit SRAM 23LC1024, choose the MMU **option 5**, 128K External 23LC1024.
49+
50+
![MMU VM 128K](/media/images/ESP8266_VM.png)
51+
52+
To use external Heap from PSRAM, choose the MMU **option 6**, 1M External 64 MBit PSRAM.
53+
54+
In PlatformIO, **PIO_FRAMEWORK_ARDUINO_MMU_EXTERNAL_128K** or **PIO_FRAMEWORK_ARDUINO_MMU_EXTERNAL_1024K** build flag should be assigned in platformio.ini.
55+
56+
```ini
57+
[env:d1_mini]
58+
platform = espressif8266
59+
build_flags = -D PIO_FRAMEWORK_ARDUINO_MMU_EXTERNAL_128K
60+
board = d1_mini
61+
framework = arduino
62+
monitor_speed = 115200
63+
```
64+
65+
The connection between SRAM/PSRAM and ESP8266
66+
67+
```
68+
23LC1024/ESP-PSRAM64 ESP8266
69+
70+
CS (Pin 1) GPIO15
71+
SCK (Pin 6) GPIO14
72+
MOSI (Pin 5) GPIO13
73+
MISO (Pin 2) GPIO12
74+
/HOLD (Pin 7 on 23LC1024 only) 3V3
75+
Vcc (Pin 8) 3V3
76+
Vcc (Pin 4) GND
77+
```
78+
79+
80+
To use SRAM/PSRAM in this library, the macro in file [**ESPFormFS.h**](src/ESPFormFS.h) was set.
81+
82+
```cpp
83+
#define ESPFORM_USE_PSRAM
84+
```
85+
86+
87+
5288

5389
## The Basic Usages
5490

media/images/ESP8266_VM.png

40.9 KB
Loading

src/json/MB_String.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,17 @@ class MB_String
115115
{
116116
return equals(rhs);
117117
}
118+
118119
unsigned char operator==(const char *cstr) const
119120
{
120121
return equals(cstr);
121122
}
123+
122124
unsigned char operator!=(const MB_String &rhs) const
123125
{
124126
return !equals(rhs);
125127
}
128+
126129
unsigned char operator!=(const char *cstr) const
127130
{
128131
return !equals(cstr);
@@ -418,6 +421,7 @@ class MB_String
418421
}
419422
}
420423
}
424+
421425
return str;
422426
}
423427

@@ -694,6 +698,7 @@ class MB_String
694698
static const size_t npos = -1;
695699

696700
private:
701+
697702
size_t getReservedLen(size_t len)
698703
{
699704
int blen = len + 1;

0 commit comments

Comments
 (0)