Skip to content

Commit 262cfd4

Browse files
committed
Passing address of char_written at f_write
1 parent 5823f5e commit 262cfd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

supervisor/shared/filesystem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ static void make_empty_file(FATFS *fatfs, const char *path) {
7272

7373
static void make_sample_code_file(FATFS *fatfs) {
7474
FIL fs;
75-
UINT *char_written = 0;
75+
UINT char_written = 0;
7676
const byte buffer[] = "print('Hello World!')\n";
7777

7878
//Create or modify existing code.py file
7979
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
80-
f_write(&fs, buffer, sizeof(buffer) - 1, char_written);
80+
f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);
8181
f_close(&fs);
8282
}
8383

0 commit comments

Comments
 (0)