Skip to content

Commit a3c8b3f

Browse files
committed
Renaming MKRGSM to SSU in order to better reflect that the ota storage is used in combi with the SSU bootloader
1 parent 8f05a0d commit a3c8b3f

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

src/ArduinoIoTCloudTCP.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "tls/utility/CryptoUtil.h"
3030
#endif
3131

32-
#include "utility/ota/OTAStorage_MKRGSM.h"
32+
#include "utility/ota/OTAStorage_SSU.h"
3333
#include "utility/ota/OTAStorage_MKRMEM.h"
3434

3535
#include "cbor/CBOREncoder.h"
@@ -40,8 +40,8 @@
4040

4141
TimeService time_service;
4242

43-
#if OTA_STORAGE_MKRGSM
44-
static OTAStorage_MKRGSM ota_storage_ssu;
43+
#if OTA_STORAGE_SSU
44+
static OTAStorage_SSU ota_storage_ssu;
4545
#elif OTA_STORAGE_MKRMEM
4646
static OTAStorage_MKRMEM ota_storage_sfu;
4747
#endif
@@ -144,7 +144,7 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
144144

145145
printConnectionStatus(_iot_status);
146146

147-
#if OTA_STORAGE_MKRGSM
147+
#if OTA_STORAGE_SSU
148148
setOTAStorage(ota_storage_ssu);
149149
#elif OTA_STORAGE_MKRMEM
150150
setOTAStorage(ota_storage_sfu);

src/ArduinoIoTCloud_Config.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
#endif
2828

2929
#ifdef ARDUINO_SAMD_MKRGSM1400
30-
#define OTA_STORAGE_MKRGSM (1)
30+
#define OTA_STORAGE_SSU (1)
3131
#else
32-
#define OTA_STORAGE_MKRGSM (0)
32+
#define OTA_STORAGE_SSU (0)
3333
#endif
3434

3535
/******************************************************************************
3636
* AUTOMATIC CONFIGURED DEFINES
3737
******************************************************************************/
3838

39-
#if OTA_STORAGE_MKRMEM || OTA_STORAGE_MKRGSM
39+
#if OTA_STORAGE_MKRMEM || OTA_STORAGE_SSU
4040
#define OTA_ENABLED (1)
4141
#else
4242
#define OTA_ENABLED (0)

src/utility/ota/OTAStorage_MKRGSM.cpp renamed to src/utility/ota/OTAStorage_SSU.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
******************************************************************************/
2121

2222
#include <ArduinoIoTCloud_Config.h>
23-
#if OTA_STORAGE_MKRGSM
23+
#if OTA_STORAGE_SSU
2424

25-
#include "OTAStorage_MKRGSM.h"
25+
#include "OTAStorage_SSU.h"
2626

2727
/******************************************************************************
2828
CONSTANTS
@@ -35,7 +35,7 @@ static char const SSU_CHECK_FILE_NAME[] = "UPDATE.OK";
3535
PUBLIC MEMBER FUNCTIONS
3636
******************************************************************************/
3737

38-
bool OTAStorage_MKRGSM::init()
38+
bool OTAStorage_SSU::init()
3939
{
4040
if (!_fileUtils.begin())
4141
return false;
@@ -49,28 +49,28 @@ bool OTAStorage_MKRGSM::init()
4949
return false;
5050
}
5151

52-
bool OTAStorage_MKRGSM::open(char const * /* file_name */)
52+
bool OTAStorage_SSU::open(char const * /* file_name */)
5353
{
5454
return true;
5555
}
5656

57-
size_t OTAStorage_MKRGSM::write(uint8_t const* const buf, size_t const num_bytes)
57+
size_t OTAStorage_SSU::write(uint8_t const* const buf, size_t const num_bytes)
5858
{
5959
_fileUtils.appendFile(SSU_UPDATE_FILENAME, (const char*)buf, num_bytes);
6060
return num_bytes;
6161
}
6262

63-
void OTAStorage_MKRGSM::close()
63+
void OTAStorage_SSU::close()
6464
{
6565
/* Nothing to do */
6666
}
6767

68-
void OTAStorage_MKRGSM::remove(char const * /* file_name */)
68+
void OTAStorage_SSU::remove(char const * /* file_name */)
6969
{
7070
_fileUtils.deleteFile(SSU_UPDATE_FILENAME);
7171
}
7272

73-
bool OTAStorage_MKRGSM::rename(char const * /* old_file_name */, char const * /* new_file_name */)
73+
bool OTAStorage_SSU::rename(char const * /* old_file_name */, char const * /* new_file_name */)
7474
{
7575
/* Create a file 'UPDATE.OK' which is used by the SSU
7676
* 2nd stage bootloader to recognise that the update
@@ -82,9 +82,9 @@ bool OTAStorage_MKRGSM::rename(char const * /* old_file_name */, char const * /*
8282
return (_fileUtils.appendFile(SSU_CHECK_FILE_NAME, &c, sizeof(c)) == sizeof(c));
8383
}
8484

85-
void OTAStorage_MKRGSM::deinit()
85+
void OTAStorage_SSU::deinit()
8686
{
8787
/* Nothing to do */
8888
}
8989

90-
#endif /* OTA_STORAGE_MKRGSM */
90+
#endif /* OTA_STORAGE_SSU */

src/utility/ota/OTAStorage_MKRGSM.h renamed to src/utility/ota/OTAStorage_SSU.h

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

18-
#ifndef ARDUINO_OTA_STORAGE_MKRGSM_H_
19-
#define ARDUINO_OTA_STORAGE_MKRGSM_H_
18+
#ifndef ARDUINO_OTA_STORAGE_SSU_H_
19+
#define ARDUINO_OTA_STORAGE_SSU_H_
2020

2121
/******************************************************************************
2222
* INCLUDE
2323
******************************************************************************/
2424

2525
#include <ArduinoIoTCloud_Config.h>
26-
#if OTA_STORAGE_MKRGSM
26+
#if OTA_STORAGE_SSU
2727

2828
#include <SSU.h>
2929

@@ -35,11 +35,11 @@
3535
* CLASS DECLARATION
3636
******************************************************************************/
3737

38-
class OTAStorage_MKRGSM : public OTAStorage
38+
class OTAStorage_SSU : public OTAStorage
3939
{
4040
public:
4141

42-
virtual ~OTAStorage_MKRGSM() { }
42+
virtual ~OTAStorage_SSU() { }
4343

4444

4545
virtual bool init () override;
@@ -56,6 +56,6 @@ class OTAStorage_MKRGSM : public OTAStorage
5656

5757
};
5858

59-
#endif /* OTA_STORAGE_MKRGSM */
59+
#endif /* OTA_STORAGE_SSU */
6060

61-
#endif /* ARDUINO_OTA_STORAGE_MKRGSM_H_ */
61+
#endif /* ARDUINO_OTA_STORAGE_SSU_H_ */

0 commit comments

Comments
 (0)