Skip to content

Commit d9bf79d

Browse files
Fixed internal flash filesystem stub build issue
Internal filesystem stubs is used when both INTERNAL_FLASH_FILESYSTEM, DISABLE_FILESYSTEM are set.
1 parent e31d84d commit d9bf79d

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

supervisor/stub/filesystem.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ void filesystem_background(void) {
3131
return;
3232
}
3333

34+
void filesystem_tick(void)
35+
{
36+
return;
37+
}
38+
3439
bool filesystem_init(bool create_allowed, bool force_create) {
3540
(void)create_allowed;
3641
(void)force_create;

supervisor/stub/internal_flash.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
* THE SOFTWARE.
2525
*/
26-
#include "supervisor/internal_flash.h"
26+
#include "supervisor/flash.h"
2727

2828
#include <stdint.h>
2929
#include <string.h>
@@ -46,20 +46,23 @@ uint32_t supervisor_flash_get_block_count(void) {
4646
return 0;
4747
}
4848

49-
void port_internal_flash_flush(void) {
50-
return;
49+
mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) {
50+
return 0; // success
5151
}
5252

53-
mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) {
53+
mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t block_num, uint32_t num_blocks) {
5454
return 0; // success
5555
}
5656

57-
bool supervisor_flash_write_block(const uint8_t *src, uint32_t block) {
58-
return true;
57+
#if (0)
58+
void supervisor_flash_init_vfs(struct _fs_user_mount_t *vfs)
59+
{
60+
return;
5961
}
62+
#endif
6063

61-
mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t block_num, uint32_t num_blocks) {
62-
return 0; // success
64+
void port_internal_flash_flush(void) {
65+
return;
6366
}
6467

6568
void supervisor_flash_release_cache(void) {

0 commit comments

Comments
 (0)