stmhal: Add label to internal flash drive on creation.

This commit is contained in:
Damien George 2014-09-29 09:48:35 +01:00
parent f042d7a4d7
commit 3a2795e200
3 changed files with 5 additions and 1 deletions

View File

@ -3793,6 +3793,7 @@ FRESULT f_setlabel (
/* Create a volume label in directory form */
vn[0] = 0;
if (label[0] == '/') label++;
for (sl = 0; label[sl]; sl++) ; /* Get name length */
for ( ; sl && label[sl-1] == ' '; sl--) ; /* Remove trailing spaces */
if (sl) { /* Create volume label in directory form */

View File

@ -70,7 +70,7 @@
/* To enable fast seek feature, set _USE_FASTSEEK to 1. */
#define _USE_LABEL 0 /* 0:Disable or 1:Enable */
#define _USE_LABEL 1 /* 0:Disable or 1:Enable */
/* To enable volume label functions, set _USE_LAVEL to 1 */

View File

@ -350,6 +350,9 @@ soft_reset:
__fatal_error("could not create LFS");
}
// set label
f_setlabel("/flash/pybflash");
// create empty main.py
FIL fp;
f_open(&fp, "/flash/main.py", FA_WRITE | FA_CREATE_ALWAYS);