Update documentation and do some basic housekeeping
This commit is contained in:
@@ -62,19 +62,19 @@ void MEM_Write(mem_block_t *in)
|
||||
WriteBlock(head, in);
|
||||
}
|
||||
|
||||
int MEM_Read(mem_block_t *out)
|
||||
bool MEM_Read(mem_block_t *out)
|
||||
{
|
||||
int head;
|
||||
|
||||
head = GetUsedBlock();
|
||||
|
||||
if (head < 0) { // Empty?
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
ReadBlock(head, out);
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void MEM_Free(void)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef MAD_CORE_COMMON_MEMORY_H
|
||||
#define MAD_CORE_COMMON_MEMORY_H
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
typedef struct mem_block_s mem_block_t;
|
||||
|
||||
// Important: Must reset EEPROM memory when the size of
|
||||
@@ -13,7 +15,7 @@ struct mem_block_s {
|
||||
} __attribute__((packed));
|
||||
|
||||
void MEM_Write(mem_block_t *in);
|
||||
int MEM_Read(mem_block_t *out);
|
||||
bool MEM_Read(mem_block_t *out);
|
||||
void MEM_Free(void);
|
||||
void MEM_Dump(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user