Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
b630de11
Commit
b630de11
authored
9 years ago
by
Daniel Campora
Browse files
Options
Downloads
Patches
Plain Diff
cc3200: Rename os.mkdisk() to os.mkfs().
parent
1811c6bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cc3200/mods/moduos.c
+4
-4
4 additions, 4 deletions
cc3200/mods/moduos.c
cc3200/qstrdefsport.h
+1
-1
1 addition, 1 deletion
cc3200/qstrdefsport.h
with
5 additions
and
5 deletions
cc3200/mods/moduos.c
+
4
−
4
View file @
b630de11
...
...
@@ -353,16 +353,16 @@ STATIC mp_obj_t os_urandom(mp_obj_t num) {
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
os_urandom_obj
,
os_urandom
);
#endif
/// \function mk
disk
('path')
/// \function mk
fs
('path')
/// Formats the selected drive, useful when the filesystem has been damaged beyond repair
STATIC
mp_obj_t
os_mk
disk
(
mp_obj_t
path_o
)
{
STATIC
mp_obj_t
os_mk
fs
(
mp_obj_t
path_o
)
{
const
char
*
path
=
mp_obj_str_get_str
(
path_o
);
if
(
FR_OK
!=
f_mkfs
(
path
,
1
,
0
))
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_OSError
,
mpexception_os_operation_failed
));
}
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
os_mk
disk
_obj
,
os_mk
disk
);
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
os_mk
fs
_obj
,
os_mk
fs
);
STATIC
const
mp_map_elem_t
os_module_globals_table
[]
=
{
{
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_uos
)
},
...
...
@@ -381,7 +381,7 @@ STATIC const mp_map_elem_t os_module_globals_table[] = {
#if MICROPY_HW_ENABLE_RNG
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_urandom
),
(
mp_obj_t
)
&
os_urandom_obj
},
#endif
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_mk
disk
),
(
mp_obj_t
)
&
os_mk
disk
_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_mk
fs
),
(
mp_obj_t
)
&
os_mk
fs
_obj
},
/// \constant sep - separation character used in paths
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_sep
),
MP_OBJ_NEW_QSTR
(
MP_QSTR__slash_
)
},
...
...
This diff is collapsed.
Click to expand it.
cc3200/qstrdefsport.h
+
1
−
1
View file @
b630de11
...
...
@@ -59,7 +59,6 @@ Q(elapsed_micros)
Q
(
udelay
)
Q
(
flush
)
Q
(
FileIO
)
Q
(
mkdisk
)
Q
(
enable
)
Q
(
disable
)
// Entries for sys.path
...
...
@@ -102,6 +101,7 @@ Q(unlink)
Q
(
sep
)
Q
(
stat
)
Q
(
urandom
)
Q
(
mkfs
)
// for file class
Q
(
seek
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment