Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
3a2795e2
Commit
3a2795e2
authored
Sep 29, 2014
by
Damien George
Browse files
stmhal: Add label to internal flash drive on creation.
parent
f042d7a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
stmhal/fatfs/src/ff.c
View file @
3a2795e2
...
...
@@ -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 */
...
...
stmhal/ffconf.h
View file @
3a2795e2
...
...
@@ -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 */
...
...
stmhal/main.c
View file @
3a2795e2
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment