SRD Standelone programmation box: MemoryManager.h File Reference

| SRD Standelone programmation box 2.0 (16/11/15 10:00:00) Documentation of the SRD standelone programmation box

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations | Functions | Variables
MemoryManager.h File Reference

Headerfile for Memory manager. More...

`#include "FM25V20.h"`
`#include "checksum.h"`
`#include "watchdog.h"`
`#include "SRDMemorymapping.h"`
Include dependency graph for MemoryManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | tMemoryManagerDiving
| Define a structure used to save the diving parameters. More...
struct | tMemoryManagerSerial
| Define a structure used to save the serial parameters. More...
struct | tMemoryManagerCtrl
| Define a structure used to control the memory operation. More...
struct | tMemoryManagerLog
| Define a structure used to store a log in memory. More...

## Macros

#define | MEMORYMANAGER_MAX_NBR_LOG ( (FM25V20_NBR_BYTE - MEMORYMANAGER_ADDR_LOG_START) / MEMORYMANAGER_LOG_SIZE)
| Define the maximum number of log that we can save in the memory. More...
#define | MEMORYMANAGER_ADDR_DIVING_START (31U)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_DIVING_DEPTH (MEMORYMANAGER_ADDR_DIVING_START + 0)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_DIVING_FILTER_MSB (MEMORYMANAGER_ADDR_DIVING_START + 1)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_DIVING_FILTER_LSB (MEMORYMANAGER_ADDR_DIVING_START + 2)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_DIVING_CHECKSUM (MEMORYMANAGER_ADDR_DIVING_START + 3)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_DIVING_BLOCK_SIZE (4U)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_START (0U)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_1 (MEMORYMANAGER_ADDR_SERIAL_START + 0)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_2 (MEMORYMANAGER_ADDR_SERIAL_START + 1)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_3 (MEMORYMANAGER_ADDR_SERIAL_START + 2)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_4 (MEMORYMANAGER_ADDR_SERIAL_START + 3)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_5 (MEMORYMANAGER_ADDR_SERIAL_START + 4)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_6 (MEMORYMANAGER_ADDR_SERIAL_START + 5)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_7 (MEMORYMANAGER_ADDR_SERIAL_START + 6)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_8 (MEMORYMANAGER_ADDR_SERIAL_START + 7)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_SERIAL_CHECKSUM (MEMORYMANAGER_ADDR_SERIAL_START + 8)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_SERIAL_BLOCK_SIZE (9U)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_ADDR_LOG_START (64U)
| Define memory mapping of the log and control structure. More...
#define | MEMORYMANAGER_LOG_SIZE (SRD_MEMORY_NBR_BYTE + 8)
| Define memory mapping of the log and control structure. More...

## Enumerations

enum | tMemoryManagerRWOp { MEMORYMANAGER_WRITE_OPERATION = 0x01, MEMORYMANAGER_READ_OPERATION = 0x02 }
| Define the log operation (write or read operation). More...

## Functions

void | MemoryManagerInit (void)
| function use to initialize the memory manager. More...
signed short | MemoryManagerComputeNbrLog (void)
| Return the number of log stored in memory. More...
signed short | MemoryManagerReadDiving (tMemoryManagerDiving *divingParameters)
| function used read/write and check the diving parameters in the memory. More...
void | MemoryManagerCheckDiving (tMemoryManagerDiving *divingParameters)
| function used read/write and check the diving parameters in the memory. More...
signed short | MemoryManagerWriteDiving (tMemoryManagerDiving *divingParameters)
| function used read/write and check the diving parameters in the memory. More...
signed short | MemoryManagerReadSerial (tMemoryManagerSerial *serialParameters)
| function used read/write and check the serial parameters in the memory. More...
void | MemoryManagerCheckSerial (tMemoryManagerSerial *serialParameters)
| function used read/write and check the serial parameters in the memory. More...
signed short | MemoryManagerWriteSerial (tMemoryManagerSerial *serialParameters)
| function used read/write and check the serial parameters in the memory. More...
signed short | MemoryManagerWriteLog (unsigned long date, tMemoryManagerRWOp opType, tSRDEeprom *data)
| function used read/write and check the log in the memory. More...
signed short | MemoryManagerClearLog (void)
| function used read/write and check the log in the memory. More...
signed short | MemoryManagerReadLog (unsigned short addr, tMemoryManagerLog *data)
| function used read/write and check the log in the memory. More...

## Variables

tMemoryManagerCtrl | MemoryManagerCtrl
| Variable used to control the memory manager. More...
tMemoryManagerDiving | DivingParameters
| Variable used to control the diving parameters. More...
tMemoryManagerSerial | SerialParameters
| Variable used to control the serial parameters. More...

## Detailed Description

Headerfile for Memory manager.

Author
  Thibaut LALUQUE 3D-Ouest

Date
  24/11/2014

Version
  1.0

All Right Reserved.

Definition in file MemoryManager.h.

## Macro Definition Documentation

#define MEMORYMANAGER_ADDR_DIVING_CHECKSUM (MEMORYMANAGER_ADDR_DIVING_START + 3)

Define memory mapping of the log and control structure.

Definition at line 44 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_DIVING_DEPTH (MEMORYMANAGER_ADDR_DIVING_START + 0)

Define memory mapping of the log and control structure.

Definition at line 41 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_DIVING_FILTER_LSB (MEMORYMANAGER_ADDR_DIVING_START + 2)

Define memory mapping of the log and control structure.

Definition at line 43 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_DIVING_FILTER_MSB (MEMORYMANAGER_ADDR_DIVING_START + 1)

Define memory mapping of the log and control structure.

Definition at line 42 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_DIVING_START (31U)

Define memory mapping of the log and control structure.

Definition at line 40 of file MemoryManager.h.

Referenced by MemoryManagerReadDiving(), and MemoryManagerWriteDiving().

#define MEMORYMANAGER_ADDR_LOG_START (64U)

Define memory mapping of the log and control structure.

Definition at line 60 of file MemoryManager.h.

Referenced by MemoryManagerClearLog(), MemoryManagerComputeNbrLog(), MemoryManagerReadLog(), and MemoryManagerWriteLog().

#define MEMORYMANAGER_ADDR_SERIAL_1 (MEMORYMANAGER_ADDR_SERIAL_START + 0)

Define memory mapping of the log and control structure.

Definition at line 49 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_2 (MEMORYMANAGER_ADDR_SERIAL_START + 1)

Define memory mapping of the log and control structure.

Definition at line 50 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_3 (MEMORYMANAGER_ADDR_SERIAL_START + 2)

Define memory mapping of the log and control structure.

Definition at line 51 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_4 (MEMORYMANAGER_ADDR_SERIAL_START + 3)

Define memory mapping of the log and control structure.

Definition at line 52 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_5 (MEMORYMANAGER_ADDR_SERIAL_START + 4)

Define memory mapping of the log and control structure.

Definition at line 53 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_6 (MEMORYMANAGER_ADDR_SERIAL_START + 5)

Define memory mapping of the log and control structure.

Definition at line 54 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_7 (MEMORYMANAGER_ADDR_SERIAL_START + 6)

Define memory mapping of the log and control structure.

Definition at line 55 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_8 (MEMORYMANAGER_ADDR_SERIAL_START + 7)

Define memory mapping of the log and control structure.

Definition at line 56 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_CHECKSUM (MEMORYMANAGER_ADDR_SERIAL_START + 8)

Define memory mapping of the log and control structure.

Definition at line 57 of file MemoryManager.h.

#define MEMORYMANAGER_ADDR_SERIAL_START (0U)

Define memory mapping of the log and control structure.

Definition at line 48 of file MemoryManager.h.

Referenced by MemoryManagerReadSerial(), and MemoryManagerWriteSerial().

#define MEMORYMANAGER_DIVING_BLOCK_SIZE (4U)

Define memory mapping of the log and control structure.

Definition at line 45 of file MemoryManager.h.

Referenced by MemoryManagerCheckDiving(), MemoryManagerReadDiving(), and MemoryManagerWriteDiving().

#define MEMORYMANAGER_LOG_SIZE (SRD_MEMORY_NBR_BYTE + 8)

Define memory mapping of the log and control structure.

Definition at line 61 of file MemoryManager.h.

Referenced by MemoryManagerClearLog(), MemoryManagerComputeNbrLog(), MemoryManagerReadLog(), MemoryManagerWriteLog(), and UsbManagerCmdDealer().

#define MEMORYMANAGER_MAX_NBR_LOG ( (FM25V20_NBR_BYTE - MEMORYMANAGER_ADDR_LOG_START) / MEMORYMANAGER_LOG_SIZE)

Define the maximum number of log that we can save in the memory.

Definition at line 70 of file MemoryManager.h.

Referenced by MemoryManagerClearLog(), MemoryManagerComputeNbrLog(), and MemoryManagerWriteLog().

#define MEMORYMANAGER_SERIAL_BLOCK_SIZE (9U)

Define memory mapping of the log and control structure.

Definition at line 58 of file MemoryManager.h.

Referenced by MemoryManagerCheckSerial(), MemoryManagerReadSerial(), MemoryManagerWriteSerial(), and UsbManagerCmdDealer().

## Enumeration Type Documentation

enum tMemoryManagerRWOp

Define the log operation (write or read operation).

Enumerator
MEMORYMANAGER_WRITE_OPERATION | Write operation
MEMORYMANAGER_READ_OPERATION | Read operation

Definition at line 111 of file MemoryManager.h.

111 {
112 MEMORYMANAGER_WRITE_OPERATION = 0x01, /*!< Write operation */
113 MEMORYMANAGER_READ_OPERATION = 0x02 /*!< Read operation */
114 }tMemoryManagerRWOp;
tMemoryManagerRWOp
tMemoryManagerRWOp
Define the log operation (write or read operation).
Definition: MemoryManager.h:111
MEMORYMANAGER_READ_OPERATION
Definition: MemoryManager.h:113
MEMORYMANAGER_WRITE_OPERATION
Definition: MemoryManager.h:112

## Function Documentation

void MemoryManagerCheckDiving | ( | tMemoryManagerDiving * | divingParameters | ) |

function used read/write and check the diving parameters in the memory.

Definition at line 128 of file MemoryManager.c.

References tMemoryManagerCtrl::bits, tMemoryManagerDiving::checksum, ChecksumByteCompute(), tMemoryManagerDiving::depth, tMemoryManagerDiving::filterLSB, tMemoryManagerDiving::filterMSB, tMemoryManagerCtrl::isValid, and MEMORYMANAGER_DIVING_BLOCK_SIZE.

Referenced by MemoryManagerInit(), and UsbManagerCmdDealer().

128 {
129
130 unsigned char checksumExpected = ChecksumByteCompute((unsigned char*)divingParameters, MEMORYMANAGER_DIVING_BLOCK_SIZE-1);
131
132 if(checksumExpected != divingParameters->checksum || (divingParameters->depth == 0 && divingParameters->filterLSB == 0 && divingParameters->filterMSB == 0) ) {
133 MemoryManagerCtrl.isValid.bits.diving = 0;
134 } else {
135 MemoryManagerCtrl.isValid.bits.diving = 1;
136 }
137 }
tMemoryManagerDiving::checksum
unsigned char checksum
Definition: MemoryManager.h:91
tMemoryManagerDiving::filterLSB
unsigned char filterLSB
Definition: MemoryManager.h:90
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
tMemoryManagerDiving::depth
unsigned char depth
Definition: MemoryManager.h:88
MEMORYMANAGER_DIVING_BLOCK_SIZE
#define MEMORYMANAGER_DIVING_BLOCK_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:45
tMemoryManagerDiving::filterMSB
unsigned char filterMSB
Definition: MemoryManager.h:89
tMemoryManagerCtrl::isValid
union tMemoryManagerCtrl::@2 isValid
tMemoryManagerCtrl::bits
struct tMemoryManagerCtrl::@2::@3 bits
ChecksumByteCompute
unsigned char ChecksumByteCompute(unsigned char *data, unsigned long dataLength)
Compute and return a checksum on the right data type.
Definition: checksum.c:78

Here is the call graph for this function:

Here is the caller graph for this function:

void MemoryManagerCheckSerial | ( | tMemoryManagerSerial * | serialParameters | ) |

function used read/write and check the serial parameters in the memory.

Definition at line 193 of file MemoryManager.c.

References tMemoryManagerCtrl::bits, tMemoryManagerSerial::checksum, ChecksumByteCompute(), tMemoryManagerCtrl::isValid, MEMORYMANAGER_SERIAL_BLOCK_SIZE, and tMemoryManagerSerial::serial.

Referenced by MemoryManagerInit().

193 {
194
195 unsigned char checksumExpected = ChecksumByteCompute((unsigned char*)serialParameters, MEMORYMANAGER_SERIAL_BLOCK_SIZE-1);
196
197 if(checksumExpected != serialParameters->checksum || (serialParameters->serial == 0)) {
198 MemoryManagerCtrl.isValid.bits.serial = 0;
199 } else {
200 MemoryManagerCtrl.isValid.bits.serial = 1;
201 }
202 }
tMemoryManagerSerial::checksum
unsigned char checksum
Definition: MemoryManager.h:102
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
MEMORYMANAGER_SERIAL_BLOCK_SIZE
#define MEMORYMANAGER_SERIAL_BLOCK_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:58
tMemoryManagerCtrl::isValid
union tMemoryManagerCtrl::@2 isValid
tMemoryManagerCtrl::bits
struct tMemoryManagerCtrl::@2::@3 bits
ChecksumByteCompute
unsigned char ChecksumByteCompute(unsigned char *data, unsigned long dataLength)
Compute and return a checksum on the right data type.
Definition: checksum.c:78
tMemoryManagerSerial::serial
unsigned long long serial
Definition: MemoryManager.h:101

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerClearLog | ( | void |  | ) |

function used read/write and check the log in the memory.

Definition at line 280 of file MemoryManager.c.

References FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20WakeUp(), FM25V20WriteData(), MEMORYMANAGER_ADDR_LOG_START, MEMORYMANAGER_LOG_SIZE, MEMORYMANAGER_MAX_NBR_LOG, tMemoryManagerCtrl::nbrLog, and WatchdogKick().

Referenced by UsbManagerCmdDealer().

280 {
281 signed short result = 0;
282
283 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
284
285 /*=== Wake up device if it's in lpm ===*/
286 if(LPM == FM25V20_LowPowerMode) {
287 FM25V20WakeUp();
288 WatchdogKick();
289 }
290
291 MemoryManagerCtrl.nbrLog = 0;
292
293 unsigned char data[MEMORYMANAGER_LOG_SIZE] = {0};
294
295 //Erase
296 while(result == 0 && MemoryManagerCtrl.nbrLog < MEMORYMANAGER_MAX_NBR_LOG) {
297 WatchdogKick();
298 result = FM25V20WriteData(MEMORYMANAGER_ADDR_LOG_START + (MemoryManagerCtrl.nbrLog * MEMORYMANAGER_LOG_SIZE), data, MEMORYMANAGER_LOG_SIZE);
299 MemoryManagerCtrl.nbrLog++;
300 }
301
302 MemoryManagerCtrl.nbrLog = 0; //Clear log counter
303
304 /*=== restore low power mode ===*/
305 if(LPM == FM25V20_LowPowerMode) {
306 FM25V20LPM();
307 }
308
309 if(result == 0) {
310 return 0;
311 } else {
312 return -1;
313 }
314 }
FM25V20WriteData
signed char FM25V20WriteData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Write data to the memory.
Definition: FM25V20.c:199
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_MAX_NBR_LOG
#define MEMORYMANAGER_MAX_NBR_LOG
Define the maximum number of log that we can save in the memory.
Definition: MemoryManager.h:70
tMemoryManagerCtrl::nbrLog
unsigned long nbrLog
Definition: MemoryManager.h:131
MEMORYMANAGER_LOG_SIZE
#define MEMORYMANAGER_LOG_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:61
MEMORYMANAGER_ADDR_LOG_START
#define MEMORYMANAGER_ADDR_LOG_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:60
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerComputeNbrLog | ( | void |  | ) |

Return the number of log stored in memory.

Returns
  (signed short) : Return the number of log in the memory.

Definition at line 316 of file MemoryManager.c.

References FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20ReadData(), FM25V20WakeUp(), MEMORYMANAGER_ADDR_LOG_START, MEMORYMANAGER_LOG_SIZE, MEMORYMANAGER_MAX_NBR_LOG, tMemoryManagerCtrl::nbrLog, and WatchdogKick().

Referenced by MemoryManagerInit().

316 {
317
318 signed short result = 0;
319
320 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
321
322 /*=== Wake up device if it's in lpm ===*/
323 if(LPM == FM25V20_LowPowerMode) {
324 FM25V20WakeUp();
325 WatchdogKick();
326 }
327
328 MemoryManagerCtrl.nbrLog = 0;
329 unsigned long data = 0xFFFFFFFF;
330
331
332 while(result == 0 && MemoryManagerCtrl.nbrLog < MEMORYMANAGER_MAX_NBR_LOG && data != 0) {
333 WatchdogKick();
334 result = FM25V20ReadData(MEMORYMANAGER_ADDR_LOG_START + (MemoryManagerCtrl.nbrLog * MEMORYMANAGER_LOG_SIZE), (unsigned char*)&data, 4);
335 MemoryManagerCtrl.nbrLog++;
336 }
337
338 /*=== restore low power mode ===*/
339 if(LPM == FM25V20_LowPowerMode) {
340 FM25V20LPM();
341 }
342
343 if(result == -1) {
344 return -1;
345 } else {
346 return 0;
347 }
348 }
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_MAX_NBR_LOG
#define MEMORYMANAGER_MAX_NBR_LOG
Define the maximum number of log that we can save in the memory.
Definition: MemoryManager.h:70
tMemoryManagerCtrl::nbrLog
unsigned long nbrLog
Definition: MemoryManager.h:131
MEMORYMANAGER_LOG_SIZE
#define MEMORYMANAGER_LOG_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:61
MEMORYMANAGER_ADDR_LOG_START
#define MEMORYMANAGER_ADDR_LOG_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:60
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189
FM25V20ReadData
signed char FM25V20ReadData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Read data from the memory.
Definition: FM25V20.c:224

Here is the call graph for this function:

Here is the caller graph for this function:

void MemoryManagerInit | ( | void |  | ) |

function use to initialize the memory manager.

Definition at line 73 of file MemoryManager.c.

References tMemoryManagerCtrl::all, tMemoryManagerCtrl::bits, FM25V20Init(), tMemoryManagerCtrl::isValid, MemoryManagerCheckDiving(), MemoryManagerCheckSerial(), MemoryManagerComputeNbrLog(), MemoryManagerReadDiving(), MemoryManagerReadSerial(), tMemoryManagerCtrl::nbrLog, and WatchdogKick().

Referenced by Setup().

73 {
74
75 FM25V20Init();
76 WatchdogKick();
77
78 MemoryManagerCtrl.isValid.all = 0; //At start-up all is false
79
80 signed short result = MemoryManagerReadDiving(&DivingParameters);
81
82 if(result == 0) {
83 MemoryManagerCheckDiving(&DivingParameters);
84 } else {
85 MemoryManagerCtrl.isValid.bits.diving = 0;
86 }
87
88
89 result = MemoryManagerReadSerial(&SerialParameters);
90
91 if(result == 0) {
92 MemoryManagerCheckSerial(&SerialParameters);
93 } else {
94 MemoryManagerCtrl.isValid.bits.serial = 0;
95 }
96
97 result = MemoryManagerComputeNbrLog ();
98 if(result != 0) {
99 MemoryManagerCtrl.nbrLog = 0;
100 }
101 }
FM25V20Init
void FM25V20Init(void)
Function used to initialize the FM25V20 memory.
Definition: FM25V20.c:67
MemoryManagerReadSerial
signed short MemoryManagerReadSerial(tMemoryManagerSerial *serialParameters)
function used read/write and check the serial parameters in the memory.
Definition: MemoryManager.c:168
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
DivingParameters
tMemoryManagerDiving DivingParameters
Variable used to control the diving parameters.
Definition: MemoryManager.c:54
MemoryManagerCheckDiving
void MemoryManagerCheckDiving(tMemoryManagerDiving *divingParameters)
Definition: MemoryManager.c:128
MemoryManagerReadDiving
signed short MemoryManagerReadDiving(tMemoryManagerDiving *divingParameters)
function used read/write and check the diving parameters in the memory.
Definition: MemoryManager.c:103
SerialParameters
tMemoryManagerSerial SerialParameters
Variable used to control the serial parameters.
Definition: MemoryManager.c:55
tMemoryManagerCtrl::nbrLog
unsigned long nbrLog
Definition: MemoryManager.h:131
tMemoryManagerCtrl::isValid
union tMemoryManagerCtrl::@2 isValid
MemoryManagerCheckSerial
void MemoryManagerCheckSerial(tMemoryManagerSerial *serialParameters)
Definition: MemoryManager.c:193
tMemoryManagerCtrl::bits
struct tMemoryManagerCtrl::@2::@3 bits
MemoryManagerComputeNbrLog
signed short MemoryManagerComputeNbrLog(void)
Return the number of log stored in memory.
Definition: MemoryManager.c:316
tMemoryManagerCtrl::all
unsigned short all
Definition: MemoryManager.h:129

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerReadDiving | ( | tMemoryManagerDiving * | divingParameters | ) |

function used read/write and check the diving parameters in the memory.

Definition at line 103 of file MemoryManager.c.

References FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20ReadData(), FM25V20WakeUp(), MEMORYMANAGER_ADDR_DIVING_START, MEMORYMANAGER_DIVING_BLOCK_SIZE, and WatchdogKick().

Referenced by MemoryManagerInit().

103 {
104 signed short result;
105
106 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
107
108 /*=== Wake up device if it's in lpm ===*/
109 if(LPM == FM25V20_LowPowerMode) {
110 FM25V20WakeUp();
111 WatchdogKick();
112 }
113
114 result = FM25V20ReadData(MEMORYMANAGER_ADDR_DIVING_START, (unsigned char*)divingParameters, MEMORYMANAGER_DIVING_BLOCK_SIZE);
115
116 /*=== restore low power mode ===*/
117 if(LPM == FM25V20_LowPowerMode) {
118 FM25V20LPM();
119 }
120
121 if(result == 0) {
122 return 0;
123 } else {
124 return -1;
125 }
126 }
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_ADDR_DIVING_START
#define MEMORYMANAGER_ADDR_DIVING_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:40
MEMORYMANAGER_DIVING_BLOCK_SIZE
#define MEMORYMANAGER_DIVING_BLOCK_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:45
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189
FM25V20ReadData
signed char FM25V20ReadData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Read data from the memory.
Definition: FM25V20.c:224

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerReadLog | ( | unsigned short | addr,
|  | tMemoryManagerLog * | data
| ) |  |

function used read/write and check the log in the memory.

Definition at line 350 of file MemoryManager.c.

References ChecksumByteOnShortCompute(), FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20ReadData(), FM25V20WakeUp(), tMemoryManagerLog::logOp, MEMORYMANAGER_ADDR_LOG_START, MEMORYMANAGER_LOG_SIZE, tMemoryManagerCtrl::nbrLog, and WatchdogKick().

Referenced by UsbManagerCmdDealer().

350 {
351
352 signed short result;
353
354 if(addr < MemoryManagerCtrl.nbrLog) {
355 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
356
357 /*=== Wake up device if it's in lpm ===*/
358 if(LPM == FM25V20_LowPowerMode) {
359 FM25V20WakeUp();
360 WatchdogKick();
361 }
362
363 unsigned long memAddr = MEMORYMANAGER_ADDR_LOG_START + (addr * MEMORYMANAGER_LOG_SIZE);
364
365 result = FM25V20ReadData(memAddr, (unsigned char*)data, MEMORYMANAGER_LOG_SIZE);
366
367 unsigned long checksumSave = data->logOp;
368 checksumSave = (checksumSave >> 16) & 0x0000FFFF;
369
370 data->logOp &= 0x0000FFFF;
371
372 unsigned long checksum = ChecksumByteOnShortCompute((unsigned char*)data,MEMORYMANAGER_LOG_SIZE);
373
374 data->logOp |= (checksumSave<<16);
375
376 if(checksum != checksumSave) {
377 result = -1;
378 }
379
380 /*=== restore low power mode ===*/
381 if(LPM == FM25V20_LowPowerMode) {
382 FM25V20LPM();
383 }
384
385 return result;
386
387 } else {
388 return -1;
389 }
390 }
ChecksumByteOnShortCompute
unsigned short ChecksumByteOnShortCompute(unsigned char *data, unsigned long dataLength)
Definition: checksum.c:111
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
tMemoryManagerLog::logOp
unsigned long logOp
Definition: MemoryManager.h:142
tMemoryManagerCtrl::nbrLog
unsigned long nbrLog
Definition: MemoryManager.h:131
MEMORYMANAGER_LOG_SIZE
#define MEMORYMANAGER_LOG_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:61
MEMORYMANAGER_ADDR_LOG_START
#define MEMORYMANAGER_ADDR_LOG_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:60
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189
FM25V20ReadData
signed char FM25V20ReadData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Read data from the memory.
Definition: FM25V20.c:224

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerReadSerial | ( | tMemoryManagerSerial * | serialParameters | ) |

function used read/write and check the serial parameters in the memory.

Definition at line 168 of file MemoryManager.c.

References FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20ReadData(), FM25V20WakeUp(), MEMORYMANAGER_ADDR_SERIAL_START, MEMORYMANAGER_SERIAL_BLOCK_SIZE, and WatchdogKick().

Referenced by MemoryManagerInit().

168 {
169 signed short result;
170
171 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
172
173 /*=== Wake up device if it's in lpm ===*/
174 if(LPM == FM25V20_LowPowerMode) {
175 FM25V20WakeUp();
176 WatchdogKick();
177 }
178
179 result = FM25V20ReadData(MEMORYMANAGER_ADDR_SERIAL_START, (unsigned char*)serialParameters, MEMORYMANAGER_SERIAL_BLOCK_SIZE);
180
181 /*=== restore low power mode ===*/
182 if(LPM == FM25V20_LowPowerMode) {
183 FM25V20LPM();
184 }
185
186 if(result == 0) {
187 return 0;
188 } else {
189 return -1;
190 }
191 }
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MEMORYMANAGER_ADDR_SERIAL_START
#define MEMORYMANAGER_ADDR_SERIAL_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:48
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_SERIAL_BLOCK_SIZE
#define MEMORYMANAGER_SERIAL_BLOCK_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:58
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189
FM25V20ReadData
signed char FM25V20ReadData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Read data from the memory.
Definition: FM25V20.c:224

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerWriteDiving | ( | tMemoryManagerDiving * | divingParameters | ) |

function used read/write and check the diving parameters in the memory.

Definition at line 139 of file MemoryManager.c.

References tMemoryManagerCtrl::bits, tMemoryManagerDiving::checksum, ChecksumByteCompute(), tMemoryManagerDiving::depth, tMemoryManagerDiving::filterLSB, tMemoryManagerDiving::filterMSB, FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20WakeUp(), FM25V20WriteData(), tMemoryManagerCtrl::isValid, MEMORYMANAGER_ADDR_DIVING_START, MEMORYMANAGER_DIVING_BLOCK_SIZE, and WatchdogKick().

Referenced by UsbManagerCmdDealer().

139 {
140 signed short result;
141
142 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
143
144 /*=== Wake up device if it's in lpm ===*/
145 if(LPM == FM25V20_LowPowerMode) {
146 FM25V20WakeUp();
147 WatchdogKick();
148 }
149
150 divingParameters->checksum = ChecksumByteCompute((unsigned char*)divingParameters, MEMORYMANAGER_DIVING_BLOCK_SIZE-1);
151
152 result = FM25V20WriteData(MEMORYMANAGER_ADDR_DIVING_START, (unsigned char*)divingParameters, MEMORYMANAGER_DIVING_BLOCK_SIZE);
153
154 /*=== restore low power mode ===*/
155 if(LPM == FM25V20_LowPowerMode) {
156 FM25V20LPM();
157 }
158
159 if(result == 0 && (divingParameters->depth != 0 && (divingParameters->filterLSB != 0 || divingParameters->filterMSB != 0)) ) {
160 MemoryManagerCtrl.isValid.bits.diving = 1;
161 return 0;
162 } else {
163 MemoryManagerCtrl.isValid.bits.diving = 0;
164 return -1;
165 }
166 }
tMemoryManagerDiving::checksum
unsigned char checksum
Definition: MemoryManager.h:91
tMemoryManagerDiving::filterLSB
unsigned char filterLSB
Definition: MemoryManager.h:90
FM25V20WriteData
signed char FM25V20WriteData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Write data to the memory.
Definition: FM25V20.c:199
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_ADDR_DIVING_START
#define MEMORYMANAGER_ADDR_DIVING_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:40
tMemoryManagerDiving::depth
unsigned char depth
Definition: MemoryManager.h:88
MEMORYMANAGER_DIVING_BLOCK_SIZE
#define MEMORYMANAGER_DIVING_BLOCK_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:45
tMemoryManagerDiving::filterMSB
unsigned char filterMSB
Definition: MemoryManager.h:89
tMemoryManagerCtrl::isValid
union tMemoryManagerCtrl::@2 isValid
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tMemoryManagerCtrl::bits
struct tMemoryManagerCtrl::@2::@3 bits
ChecksumByteCompute
unsigned char ChecksumByteCompute(unsigned char *data, unsigned long dataLength)
Compute and return a checksum on the right data type.
Definition: checksum.c:78
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerWriteLog | ( | unsigned long | date,
|  | tMemoryManagerRWOp | opType,
|  | tSRDEeprom * | data
| ) |  |

function used read/write and check the log in the memory.

Definition at line 233 of file MemoryManager.c.

References ChecksumByteOnShortCompute(), tMemoryManagerLog::date, FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20WakeUp(), FM25V20WriteData(), tMemoryManagerLog::logOp, MEMORYMANAGER_ADDR_LOG_START, MEMORYMANAGER_LOG_SIZE, MEMORYMANAGER_MAX_NBR_LOG, tMemoryManagerCtrl::nbrLog, SRD_MEMORY_NBR_BYTE, and WatchdogKick().

Referenced by ButtonManagerDealer().

233 {
234
235 tMemoryManagerLog log;
236 unsigned char i;
237
238 if(MemoryManagerCtrl.nbrLog < MEMORYMANAGER_MAX_NBR_LOG) {
239
240 log.date = date;
241 log.logOp = opType;
242
243 for(i=0 ; i<SRD_MEMORY_NBR_BYTE ; i++) {
244 *( ((unsigned char*)&log) + 8 + i) = *( ( (unsigned char*)data ) + i );
245 }
246
247 unsigned long checksum = ChecksumByteOnShortCompute((unsigned char*)(&log),MEMORYMANAGER_LOG_SIZE);
248 log.logOp |= (checksum<<16);
249
250 signed short result;
251
252 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
253
254 /*=== Wake up device if it's in lpm ===*/
255 if(LPM == FM25V20_LowPowerMode) {
256 FM25V20WakeUp();
257 WatchdogKick();
258 }
259
260 unsigned long memAddr = MEMORYMANAGER_ADDR_LOG_START + (MemoryManagerCtrl.nbrLog * MEMORYMANAGER_LOG_SIZE);
261
262 result = FM25V20WriteData(memAddr, (unsigned char*)(&log), MEMORYMANAGER_LOG_SIZE);
263
264 /*=== restore low power mode ===*/
265 if(LPM == FM25V20_LowPowerMode) {
266 FM25V20LPM();
267 }
268
269 if(result == 0) {
270 MemoryManagerCtrl.nbrLog++;
271 return 0;
272 } else {
273 return -1;
274 }
275 } else {
276 return -1;
277 }
278 }
SRD_MEMORY_NBR_BYTE
#define SRD_MEMORY_NBR_BYTE
Define the number of byte used in the SRD RFID memory.
Definition: SRDMemoryMapping.h:106
FM25V20WriteData
signed char FM25V20WriteData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Write data to the memory.
Definition: FM25V20.c:199
ChecksumByteOnShortCompute
unsigned short ChecksumByteOnShortCompute(unsigned char *data, unsigned long dataLength)
Definition: checksum.c:111
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
tMemoryManagerLog
Define a structure used to store a log in memory.
Definition: MemoryManager.h:140
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_MAX_NBR_LOG
#define MEMORYMANAGER_MAX_NBR_LOG
Define the maximum number of log that we can save in the memory.
Definition: MemoryManager.h:70
tMemoryManagerLog::logOp
unsigned long logOp
Definition: MemoryManager.h:142
tMemoryManagerCtrl::nbrLog
unsigned long nbrLog
Definition: MemoryManager.h:131
MEMORYMANAGER_LOG_SIZE
#define MEMORYMANAGER_LOG_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:61
MEMORYMANAGER_ADDR_LOG_START
#define MEMORYMANAGER_ADDR_LOG_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:60
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tMemoryManagerLog::date
unsigned long date
Definition: MemoryManager.h:141
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189

Here is the call graph for this function:

Here is the caller graph for this function:

signed short MemoryManagerWriteSerial | ( | tMemoryManagerSerial * | serialParameters | ) |

function used read/write and check the serial parameters in the memory.

Definition at line 204 of file MemoryManager.c.

References tMemoryManagerCtrl::bits, tMemoryManagerSerial::checksum, ChecksumByteCompute(), FM25V20_LowPowerMode, FM25V20IsInLowPower(), FM25V20LPM(), FM25V20WakeUp(), FM25V20WriteData(), tMemoryManagerCtrl::isValid, MEMORYMANAGER_ADDR_SERIAL_START, MEMORYMANAGER_SERIAL_BLOCK_SIZE, tMemoryManagerSerial::serial, and WatchdogKick().

Referenced by UsbManagerCmdDealer().

204 {
205 signed short result;
206
207 tFM25V20_LPMState LPM = FM25V20IsInLowPower();
208
209 /*=== Wake up device if it's in lpm ===*/
210 if(LPM == FM25V20_LowPowerMode) {
211 FM25V20WakeUp();
212 WatchdogKick();
213 }
214
215 serialParameters->checksum = ChecksumByteCompute((unsigned char*)serialParameters, MEMORYMANAGER_SERIAL_BLOCK_SIZE-1);
216
217 result = FM25V20WriteData(MEMORYMANAGER_ADDR_SERIAL_START, (unsigned char*)serialParameters, MEMORYMANAGER_SERIAL_BLOCK_SIZE);
218
219 /*=== restore low power mode ===*/
220 if(LPM == FM25V20_LowPowerMode) {
221 FM25V20LPM();
222 }
223
224 if(result == 0 && serialParameters->serial != 0) {
225 MemoryManagerCtrl.isValid.bits.serial = 1;
226 return 0;
227 } else {
228 MemoryManagerCtrl.isValid.bits.serial = 0;
229 return -1;
230 }
231 }
tMemoryManagerSerial::checksum
unsigned char checksum
Definition: MemoryManager.h:102
FM25V20WriteData
signed char FM25V20WriteData(unsigned long addr, unsigned char data[], unsigned long dataLength)
Write data to the memory.
Definition: FM25V20.c:199
WatchdogKick
void WatchdogKick(void)
Kick the watchdog to avoid reset after the watchdog have started.
Definition: watchdog.c:86
MemoryManagerCtrl
tMemoryManagerCtrl MemoryManagerCtrl
Variable used to control the memory manager.
Definition: MemoryManager.c:53
MEMORYMANAGER_ADDR_SERIAL_START
#define MEMORYMANAGER_ADDR_SERIAL_START
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:48
FM25V20LPM
void FM25V20LPM(void)
Put the memory in a low power mode.
Definition: FM25V20.c:178
FM25V20_LowPowerMode
Definition: FM25V20.h:162
MEMORYMANAGER_SERIAL_BLOCK_SIZE
#define MEMORYMANAGER_SERIAL_BLOCK_SIZE
Define memory mapping of the log and control structure.
Definition: MemoryManager.h:58
tMemoryManagerCtrl::isValid
union tMemoryManagerCtrl::@2 isValid
FM25V20IsInLowPower
tFM25V20_LPMState FM25V20IsInLowPower(void)
Get the low power status of the memory.
Definition: FM25V20.c:244
tMemoryManagerCtrl::bits
struct tMemoryManagerCtrl::@2::@3 bits
ChecksumByteCompute
unsigned char ChecksumByteCompute(unsigned char *data, unsigned long dataLength)
Compute and return a checksum on the right data type.
Definition: checksum.c:78
tFM25V20_LPMState
tFM25V20_LPMState
enumeration used to set the memory power mode.
Definition: FM25V20.h:161
FM25V20WakeUp
void FM25V20WakeUp(void)
Wake up the memory from the low power mode.
Definition: FM25V20.c:189
tMemoryManagerSerial::serial
unsigned long long serial
Definition: MemoryManager.h:101

Here is the call graph for this function:

Here is the caller graph for this function:

## Variable Documentation

tMemoryManagerDiving DivingParameters

Variable used to control the diving parameters.

Definition at line 54 of file MemoryManager.c.

Referenced by ButtonManager(), ButtonManagerDealer(), RFIDWriteStateMachine(), and UsbManagerCmdDealer().

tMemoryManagerCtrl MemoryManagerCtrl

Variable used to control the memory manager.

Definition at line 53 of file MemoryManager.c.

Referenced by ButtonManager(), and UsbManagerCmdDealer().

tMemoryManagerSerial SerialParameters

Variable used to control the serial parameters.

Definition at line 55 of file MemoryManager.c.

Referenced by UsbManagerCmdDealer().