Skip to content

Commit d84a064

Browse files
committed
Change disk size constant to macro in vfs_user.c.
1 parent eecee51 commit d84a064

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/daplink/drag-n-drop/vfs_user.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
#include "cortex_m.h"
3737
#include "target_board.h"
3838

39-
// Must be bigger than 4x the flash size of the biggest supported
40-
// device. This is to accomodate for hex file programming.
41-
static const uint32_t disc_size = MB(64);
39+
//! @brief Size in bytes of the virtual disk.
40+
//!
41+
//! Must be bigger than 4x the flash size of the biggest supported
42+
//! device. This is to accomodate for hex file programming.
43+
#define VFS_DISK_SIZE (MB(64))
4244

4345
static const char mbed_redirect_file[] =
4446
"<!doctype html>\r\n"
@@ -85,7 +87,7 @@ void vfs_user_build_filesystem()
8587
uint32_t file_size;
8688
vfs_file_t file_handle;
8789
// Setup the filesystem based on target parameters
88-
vfs_init(get_daplink_drive_name(), disc_size);
90+
vfs_init(get_daplink_drive_name(), VFS_DISK_SIZE);
8991
// MBED.HTM
9092
file_size = get_file_size(read_file_mbed_htm);
9193
vfs_create_file(get_daplink_url_name(), read_file_mbed_htm, 0, file_size);

0 commit comments

Comments
 (0)