Commit dd1f8752 authored by Gregor's avatar Gregor
Browse files

Fix typos and small enhancement of docu

parent 1d976e54
...@@ -250,13 +250,17 @@ Get the current LFS and SPIFFS partition information. ...@@ -250,13 +250,17 @@ Get the current LFS and SPIFFS partition information.
none none
#### Returns #### Returns
An array containing entries for `lfs_addr`, `lfs_size`, `spiffs_addr` and `spiffs_size`. The address values are offsets relative to the startof the Flash memory. An array containing entries for `lfs_addr`, `lfs_size`, `spiffs_addr` and `spiffs_size`. The address values are offsets relative to the start of the Flash memory.
#### Example #### Example
```lua ```lua
print("The LFS size is " .. node.getpartitiontable().lfs_size) print("The LFS size is " .. node.getpartitiontable().lfs_size)
``` ```
#### See also
[`node.setpartitiontable()`](#nodesetpartitiontable)
## node.heap() ## node.heap()
Returns the current available heap size in bytes. Note that due to fragmentation, actual allocations of this size may not be possible. Returns the current available heap size in bytes. Note that due to fragmentation, actual allocations of this size may not be possible.
...@@ -445,7 +449,7 @@ Sets the current LFS and / or SPIFFS partition information. ...@@ -445,7 +449,7 @@ Sets the current LFS and / or SPIFFS partition information.
This function is typically only used once during initial provisioning after first flashing the firmware. It does some consistency checks to validate the specified parameters, and it then reboots the ESP module to load the new partition table. If the LFS or SPIFFS regions have changed then you will need to reload LFS, reformat the SPIFSS and reload its contents. This function is typically only used once during initial provisioning after first flashing the firmware. It does some consistency checks to validate the specified parameters, and it then reboots the ESP module to load the new partition table. If the LFS or SPIFFS regions have changed then you will need to reload LFS, reformat the SPIFSS and reload its contents.
#### Parameters #### Parameters
An array containing one or more of the following enties. The address values are byte offsets relative to the startof the Flash memory. The size values are in bytes. Note that these parameters must be a multiple of 8Kb to align to Flash page boundaries. An array containing one or more of the following enties. The address values are byte offsets relative to the start of the Flash memory. The size values are in bytes. Note that these parameters must be a multiple of 8Kb to align to Flash page boundaries.
- `lfs_addr`. The base address of the LFS region. - `lfs_addr`. The base address of the LFS region.
- `lfs_size`. The size of the LFS region. - `lfs_size`. The size of the LFS region.
- `spiffs_addr`. The base address of the SPIFFS region. - `spiffs_addr`. The base address of the SPIFFS region.
...@@ -459,6 +463,10 @@ Not applicable. The ESP module will be rebooted for a valid new set, or a Lua e ...@@ -459,6 +463,10 @@ Not applicable. The ESP module will be rebooted for a valid new set, or a Lua e
node.setpartitiontable{lfs_size = 0x20000, spiffs_addr = 0x120000, spiffs_size = 0x20000} node.setpartitiontable{lfs_size = 0x20000, spiffs_addr = 0x120000, spiffs_size = 0x20000}
``` ```
#### See also
[`node.getpartitiontable()`](#nodegetpartitiontable)
## node.sleep() ## node.sleep()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment