projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor code, moved page_modified variable in KFileFlashAvr struct
[bertos.git]
/
bertos
/
cpu
/
avr
/
drv
/
flash_avr.h
diff --git
a/bertos/cpu/avr/drv/flash_avr.h
b/bertos/cpu/avr/drv/flash_avr.h
index 91de1e3cbfa9b8fc975c6aa3292c2a59bf6b6312..bb7698aba42bb9072f9b1457d332edb7c5d60519 100644
(file)
--- a/
bertos/cpu/avr/drv/flash_avr.h
+++ b/
bertos/cpu/avr/drv/flash_avr.h
@@
-44,12
+44,32
@@
#include <kern/kfile.h>
#include <kern/kfile.h>
+/**
+ * Definition of type for avr flash module.
+ */
+typedef uint16_t avr_page_t;
+
+
/**
* FlashAvr KFile context structure.
*/
typedef struct KFileFlashAvr
{
/**
* FlashAvr KFile context structure.
*/
typedef struct KFileFlashAvr
{
- KFile fd; ///< File descriptor.
+ /**
+ * File descriptor.
+ */
+ KFile fd;
+
+ /**
+ * Current buffered page.
+ */
+ avr_page_t curr_page;
+
+ /**
+ * Flag for checking if current page is modified.
+ */
+ bool page_modified;
+
} KFileFlashAvr;
} KFileFlashAvr;