Skip to content

Commit dd426b4

Browse files
authored
Renaming OTAStorage_MKRMEM to OTAStorage_SFU in order to reflect that the OTA storage medium is used in combination with the SFU second stage bootloader (#157)
1 parent bfc2ff9 commit dd426b4

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

Diff for: src/ArduinoIoTCloudTCP.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#endif
3131

3232
#include "utility/ota/OTAStorage_SSU.h"
33-
#include "utility/ota/OTAStorage_MKRMEM.h"
33+
#include "utility/ota/OTAStorage_SFU.h"
3434

3535
#include "cbor/CBOREncoder.h"
3636

@@ -43,7 +43,7 @@ TimeService time_service;
4343
#if OTA_STORAGE_SSU
4444
static OTAStorage_SSU ota_storage_ssu;
4545
#elif OTA_STORAGE_MKRMEM
46-
static OTAStorage_MKRMEM ota_storage_sfu;
46+
static OTAStorage_SFU ota_storage_sfu;
4747
#endif
4848

4949
/******************************************************************************

Diff for: src/utility/ota/OTAStorage_MKRMEM.cpp renamed to src/utility/ota/OTAStorage_SFU.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* INCLUDE
2020
******************************************************************************/
2121

22-
#include "OTAStorage_MKRMEM.h"
22+
#include "OTAStorage_SFU.h"
2323
#if OTA_STORAGE_MKRMEM
2424

2525
#include <Arduino_DebugUtils.h>
@@ -28,7 +28,7 @@
2828
* CTOR/DTOR
2929
******************************************************************************/
3030

31-
OTAStorage_MKRMEM::OTAStorage_MKRMEM()
31+
OTAStorage_SFU::OTAStorage_SFU()
3232
: _file{nullptr}
3333
{
3434

@@ -38,56 +38,56 @@ OTAStorage_MKRMEM::OTAStorage_MKRMEM()
3838
* PUBLIC MEMBER FUNCTIONS
3939
******************************************************************************/
4040

41-
bool OTAStorage_MKRMEM::init()
41+
bool OTAStorage_SFU::init()
4242
{
4343
flash.begin();
4444
if(SPIFFS_OK != filesystem.mount()) {
45-
Debug.print(DBG_ERROR, "OTAStorage_MKRMEM::init - mount() failed with error code %d", filesystem.err());
45+
Debug.print(DBG_ERROR, "OTAStorage_SFU::init - mount() failed with error code %d", filesystem.err());
4646
return false;
4747
}
4848

4949
if(SPIFFS_OK != filesystem.check()) {
50-
Debug.print(DBG_ERROR, "OTAStorage_MKRMEM::init - check() failed with error code %d", filesystem.err());
50+
Debug.print(DBG_ERROR, "OTAStorage_SFU::init - check() failed with error code %d", filesystem.err());
5151
return false;
5252
}
5353

5454
return true;
5555
}
5656

57-
bool OTAStorage_MKRMEM::open(char const * file_name)
57+
bool OTAStorage_SFU::open(char const * file_name)
5858
{
5959
filesystem.clearerr();
6060
_file = new File(filesystem.open(file_name, CREATE | WRITE_ONLY| TRUNCATE));
6161
if(SPIFFS_OK != filesystem.err()) {
62-
Debug.print(DBG_ERROR, "OTAStorage_MKRMEM::open - open() failed with error code %d", filesystem.err());
62+
Debug.print(DBG_ERROR, "OTAStorage_SFU::open - open() failed with error code %d", filesystem.err());
6363
delete _file;
6464
return false;
6565
}
6666
return true;
6767
}
6868

69-
size_t OTAStorage_MKRMEM::write(uint8_t const * const buf, size_t const num_bytes)
69+
size_t OTAStorage_SFU::write(uint8_t const * const buf, size_t const num_bytes)
7070
{
7171
return _file->write(const_cast<uint8_t *>(buf), num_bytes);
7272
}
7373

74-
void OTAStorage_MKRMEM::close()
74+
void OTAStorage_SFU::close()
7575
{
7676
_file->close();
7777
delete _file;
7878
}
7979

80-
void OTAStorage_MKRMEM::remove(char const * file_name)
80+
void OTAStorage_SFU::remove(char const * file_name)
8181
{
8282
filesystem.remove(file_name);
8383
}
8484

85-
bool OTAStorage_MKRMEM::rename(char const * old_file_name, char const * new_file_name)
85+
bool OTAStorage_SFU::rename(char const * old_file_name, char const * new_file_name)
8686
{
8787
return (SPIFFS_OK == filesystem.rename(old_file_name, new_file_name));
8888
}
8989

90-
void OTAStorage_MKRMEM::deinit()
90+
void OTAStorage_SFU::deinit()
9191
{
9292
filesystem.unmount();
9393
}

Diff for: src/utility/ota/OTAStorage_MKRMEM.h renamed to src/utility/ota/OTAStorage_SFU.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
a commercial license, send an email to [email protected].
1616
*/
1717

18-
#ifndef ARDUINO_OTA_STORAGE_MKRKEM_H_
19-
#define ARDUINO_OTA_STORAGE_MKRKEM_H_
18+
#ifndef ARDUINO_OTA_STORAGE_SFU_H_
19+
#define ARDUINO_OTA_STORAGE_SFU_H_
2020

2121
/******************************************************************************
2222
* INCLUDE
@@ -35,12 +35,12 @@
3535
* CLASS DECLARATION
3636
******************************************************************************/
3737

38-
class OTAStorage_MKRMEM : public OTAStorage
38+
class OTAStorage_SFU : public OTAStorage
3939
{
4040
public:
4141

42-
OTAStorage_MKRMEM();
43-
virtual ~OTAStorage_MKRMEM() { }
42+
OTAStorage_SFU();
43+
virtual ~OTAStorage_SFU() { }
4444

4545

4646
virtual bool init () override;
@@ -60,4 +60,4 @@ class OTAStorage_MKRMEM : public OTAStorage
6060

6161
#endif /* OTA_STORAGE_MKRMEM */
6262

63-
#endif /* ARDUINO_OTA_STORAGE_MKRKEM_H_ */
63+
#endif /* ARDUINO_OTA_STORAGE_SFU_H_ */

0 commit comments

Comments
 (0)