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
b73085d2
Commit
b73085d2
authored
11 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
stm: add pyb.sd_test; flash cache flushed only via MSD.
parent
a3dcd9e8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
stm/lib/usbd_storage_msd.c
+1
-0
1 addition, 0 deletions
stm/lib/usbd_storage_msd.c
stm/main.c
+8
-0
8 additions, 0 deletions
stm/main.c
stm/storage.c
+0
-1
0 additions, 1 deletion
stm/storage.c
with
9 additions
and
1 deletion
stm/lib/usbd_storage_msd.c
+
1
−
0
View file @
b73085d2
...
...
@@ -309,6 +309,7 @@ int8_t STORAGE_Write (uint8_t lun,
#endif
*/
disk_write
(
0
,
buf
,
blk_addr
,
blk_len
);
storage_flush
();
// XXX hack for now so that the cache is always flushed
return
(
0
);
}
...
...
This diff is collapsed.
Click to expand it.
stm/main.c
+
8
−
0
View file @
b73085d2
...
...
@@ -367,6 +367,13 @@ static py_obj_t pyb_info(void) {
return
py_const_none
;
}
// SD card test
static
py_obj_t
pyb_sd_test
(
void
)
{
extern
void
sdio_init
(
void
);
sdio_init
();
return
py_const_none
;
}
static
void
SYSCLKConfig_STOP
(
void
)
{
/* After wake-up from STOP reconfigure the system clock */
/* Enable HSE */
...
...
@@ -1010,6 +1017,7 @@ soft_reset:
py_obj_t
m
=
py_module_new
();
rt_store_attr
(
m
,
qstr_from_str_static
(
"info"
),
rt_make_function_0
(
pyb_info
));
rt_store_attr
(
m
,
qstr_from_str_static
(
"sd_test"
),
rt_make_function_0
(
pyb_sd_test
));
rt_store_attr
(
m
,
qstr_from_str_static
(
"stop"
),
rt_make_function_0
(
pyb_stop
));
rt_store_attr
(
m
,
qstr_from_str_static
(
"standby"
),
rt_make_function_0
(
pyb_standby
));
rt_store_attr
(
m
,
qstr_from_str_static
(
"source_dir"
),
rt_make_function_1
(
pyb_source_dir
));
...
...
This diff is collapsed.
Click to expand it.
stm/storage.c
+
0
−
1
View file @
b73085d2
...
...
@@ -152,7 +152,6 @@ bool storage_write_block(const uint8_t *src, uint32_t block) {
uint8_t
*
dest
=
cache_get_addr_for_write
(
flash_addr
);
memcpy
(
dest
,
src
,
BLOCK_SIZE
);
sys_tick_counter_last_write
=
sys_tick_counter
;
cache_flush
();
// XXX hack for now so that the cache is always flushed
return
true
;
}
else
{
...
...
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