summaryrefslogtreecommitdiff
path: root/digital/avr/modules/flash/flash.h
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-03-13 00:35:33 +0100
committerNélio Laranjeiro2008-03-13 00:35:33 +0100
commit7e1e72e29349a8248901d4d4f466d1c9b556344d (patch)
tree6d7705bfb5e1300d13b23a31e0f9cc9d2c6a51eb /digital/avr/modules/flash/flash.h
parent40eb8ed5e80d6e6e361c6092b26957905de2028b (diff)
Flash module...
Still a problem with the write array...
Diffstat (limited to 'digital/avr/modules/flash/flash.h')
-rw-r--r--digital/avr/modules/flash/flash.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/digital/avr/modules/flash/flash.h b/digital/avr/modules/flash/flash.h
index 5ff4e8ce..39fd366c 100644
--- a/digital/avr/modules/flash/flash.h
+++ b/digital/avr/modules/flash/flash.h
@@ -94,10 +94,28 @@ void
flash_send_command (uint8_t cmd);
/** Poll the busy bit in the Software Status Register of the flash memory.
- * \return the busy bit state.
+ * \return the status register.
*/
uint8_t
-flash_is_busy (void);
+flash_read_status (void);
+
+/** Poll the busy bit in the Software Status Register of the flash memory.
+ * \return the busy bit state.
+ */
+extern inline uint8_t
+flash_is_busy (void)
+{
+ return flash_read_status () & 0x1;
+}
+
+/** Return the AAI status flag of the register.
+ * \return the AAI status.
+ */
+extern inline uint8_t
+flash_status_aai (void)
+{
+ return flash_read_status () >> 6;
+}
/** Write in the flash byte provided in parameter.
* \param data the buffer to store the data.