Skip to content

Commit 855dd34

Browse files
committed
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
2 parents b8e4815 + 7063425 commit 855dd34

File tree

9 files changed

+37
-25
lines changed

9 files changed

+37
-25
lines changed

cores/esp8266/Updater.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern "C" {
2222
#include "user_interface.h"
2323
}
2424

25-
#include "flash_hal.h"
25+
#include <flash_hal.h>
2626

2727
UpdaterClass::UpdaterClass()
2828
: _async(false)

cores/esp8266/spiffs_api.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern "C" {
3535
};
3636
#include "debug.h"
3737
#include "flash_utils.h"
38-
#include "flash_hal.h"
38+
#include <flash_hal.h>
3939

4040
using namespace fs;
4141

tests/host/common/flash_hal.h

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#ifndef flash_hal_mock_h
2+
#define flash_hal_mock_h
3+
4+
#include <stdint.h>
5+
6+
#define FLASH_HAL_OK (0)
7+
#define FLASH_HAL_READ_ERROR (-1)
8+
#define FLASH_HAL_WRITE_ERROR (-2)
9+
#define FLASH_HAL_ERASE_ERROR (-3)
10+
11+
#define FS_start 0
12+
#define FS_end 0
13+
14+
extern "C"
15+
{
16+
17+
extern uint32_t s_phys_addr;
18+
extern uint32_t s_phys_size;
19+
extern uint32_t s_phys_page;
20+
extern uint32_t s_phys_block;
21+
extern uint8_t* s_phys_data;
22+
23+
extern int32_t flash_hal_read(uint32_t addr, uint32_t size, uint8_t *dst);
24+
extern int32_t flash_hal_write(uint32_t addr, uint32_t size, const uint8_t *src);
25+
extern int32_t flash_hal_erase(uint32_t addr, uint32_t size);
26+
27+
}
28+
29+
#endif

tests/host/common/flash_hal_mock.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <stdint.h>
44
#include <string.h>
55

6+
#include "flash_hal.h"
7+
68
extern "C"
79
{
810
uint32_t s_phys_addr = 0;

tests/host/common/flash_hal_mock.h

-19
This file was deleted.

tests/host/common/littlefs_mock.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <sys/stat.h>
3232
#include <fcntl.h>
3333
#include <unistd.h>
34-
#include "flash_hal_mock.h"
34+
#include <flash_hal.h>
3535

3636
#define LITTLEFS_FILE_NAME "littlefs.bin"
3737

tests/host/common/littlefs_mock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <stddef.h>
2424
#include <vector>
2525
#include <FS.h>
26-
#include "flash_hal_mock.h"
26+
#include <flash_hal.h>
2727

2828
#define DEFAULT_LITTLEFS_FILE_NAME "littlefs.bin"
2929

tests/host/common/spiffs_mock.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <fcntl.h>
2828
#include <unistd.h>
2929

30-
#include "flash_hal_mock.h"
30+
#include <flash_hal.h>
3131

3232
#define SPIFFS_FILE_NAME "spiffs.bin"
3333

tests/host/common/spiffs_mock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <stddef.h>
2121
#include <vector>
2222
#include <FS.h>
23-
#include "flash_hal_mock.h"
23+
#include <flash_hal.h>
2424

2525
#define DEFAULT_SPIFFS_FILE_NAME "spiffs.bin"
2626

0 commit comments

Comments
 (0)