Skip to content

Commit 902d20a

Browse files
author
betzrhodes
authored
Merge pull request #32 from electricimp/develop
v3.0.1
2 parents 7431ba1 + 259dc02 commit 902d20a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# SPIFlashFileSystem 3.0.0 #
1+
# SPIFlashFileSystem 3.0.1 #
22

33
The SPIFlashFileSystem library implements a basic [wear leveling](https://en.wikipedia.org/wiki/Wear_leveling) file system intended for use with SPI Flash devices, such as the built-in [**hardware.spiflash**](https://developer.electricimp.com/api/hardware/spiflash) object available on the imp003 and above, or an external SPI Flash plus the [SPIFlash library](https://github.com/electricimp/spiflash) on the imp001 and imp002.
44

5-
**To include this library in your project, add** `#require "SPIFlashFileSystem.device.lib.nut:3.0.0"` **at the top of your device code.**
5+
**To include this library in your project, add** `#require "SPIFlashFileSystem.device.lib.nut:3.0.1"` **at the top of your device code.**
66

77
![Build Status](https://cse-ci.electricimp.com/app/rest/builds/buildType:(id:SPIFlashFileSystem_BuildAndTest)/statusIcon)
88

@@ -113,7 +113,7 @@ The SPIFlashFileSystem constructor allows you to specify the start and end bytes
113113
#### Example: imp003 And Above ####
114114

115115
```squirrel
116-
#require "SPIFlashFileSystem.device.lib.nut:3.0.0"
116+
#require "SPIFlashFileSystem.device.lib.nut:3.0.1"
117117
118118
// Allocate the first 2MB to the file system
119119
sffs <- SPIFlashFileSystem(0x000000, 0x200000);
@@ -124,7 +124,7 @@ sffs.init();
124124

125125
```squirrel
126126
#require "SPIFlash.class.nut:1.0.1"
127-
#require "SPIFlashFileSystem.device.lib.nut:3.0.0"
127+
#require "SPIFlashFileSystem.device.lib.nut:3.0.1"
128128
129129
// Configure the external SPIFlash
130130
flash <- SPIFlash(hardware.spi257, hardware.pin8);

SPIFlashFileSystem.device.lib.nut

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum SPIFLASHFILESYSTEM_ERROR {
5757

5858
class SPIFlashFileSystem {
5959
// Library version
60-
static VERSION = "3.0.0";
60+
static VERSION = "3.0.1";
6161

6262
// Private:
6363
_flash = null; // The SPI Flash object
@@ -766,7 +766,7 @@ class SPIFlashFileSystem.FAT {
766766
}
767767

768768
// Check the file is valid
769-
if (fileId == null || fname == null) throw SPIFlashFileSystem.SPIFLASHFILESYSTEM_ERROR.FILE_NOT_FOUND;
769+
if (fileId == null || fname == null) throw SPIFLASHFILESYSTEM_ERROR.FILE_NOT_FOUND;
770770

771771
// Add up the sizes
772772
local sizeTotal = 0, size = 0;
@@ -860,7 +860,7 @@ class SPIFlashFileSystem.FAT {
860860
}
861861

862862
// If we haven't found one after garbage collection, theow error
863-
if (next == null) throw SPIFlashFileSystem.SPIFLASHFILESYSTEM_ERROR.NO_FREE_SPACE;
863+
if (next == null) throw SPIFLASHFILESYSTEM_ERROR.NO_FREE_SPACE;
864864

865865
// If we did find a page, return it
866866
return _filesystem.dimensions().start + (next * SPIFLASHFILESYSTEM_SIZE.PAGE);

examples/example-01.device.nut

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// while class being tested can be accessed from global scope as "::Promise".
2626

2727
#require "MessageManager.lib.nut:2.0.0"
28-
#require "SPIFlashFileSystem.device.lib.nut:3.0.0"
28+
#require "SPIFlashFileSystem.device.lib.nut:3.0.1"
2929

3030
// Initialize using default settings
3131
local mm = MessageManager();

0 commit comments

Comments
 (0)