projects
/
hackover2013-badge-firmware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cde2e04
)
Fortschrittspeichern funktionstüchtig.
author
Wintermute
<wintermute@hannover.ccc.de>
Tue, 22 Oct 2013 18:03:40 +0000
(20:03 +0200)
committer
Wintermute
<wintermute@hannover.ccc.de>
Tue, 22 Oct 2013 18:03:40 +0000
(20:03 +0200)
badge/jumpnrun/starter.c
patch
|
blob
|
history
diff --git
a/badge/jumpnrun/starter.c
b/badge/jumpnrun/starter.c
index
146e85c
..
4deb635
100644
(file)
--- a/
badge/jumpnrun/starter.c
+++ b/
badge/jumpnrun/starter.c
@@
-18,6
+18,7
@@
static uint8_t jumpnrun_load_progress(void) {
if(FR_OK == f_open(&fd, PROGRESS_FNAME, FA_OPEN_EXISTING | FA_READ)) {
UINT bytes;
f_read(&fd, &progress, sizeof(progress), &bytes);
+ f_close(&fd);
}
return progress;
@@
-26,9
+27,10
@@
static uint8_t jumpnrun_load_progress(void) {
static void jumpnrun_save_progress(uint8_t progress) {
FIL fd;
- if(FR_OK == f_open(&fd, PROGRESS_FNAME, FA_CREATE_
NEW
| FA_WRITE)) {
+ if(FR_OK == f_open(&fd, PROGRESS_FNAME, FA_CREATE_
ALWAYS
| FA_WRITE)) {
UINT bytes;
f_write(&fd, &progress, sizeof(progress), &bytes);
+ f_close(&fd);
}
}
This page took
0.034278 seconds
and
4
git commands to generate.