\r
typedef struct {\r
CurrentJobStateType State;\r
- uint16 InStateCounter;\r
uint16 BlockNumber;\r
uint16 Length;\r
const Fee_BlockConfigType *BlockConfigPtr;\r
\r
static CurrentJobType CurrentJob = {\r
.State = FEE_IDLE,\r
- .InStateCounter = 0\r
//lint -e{785} PC-Lint (785) - rest of structure members is initialized when used.\r
};\r
\r
/*\r
* Misc definitions\r
*/\r
-#define STATE_COUNTER_MAX 0xffff\r
-#define GARBAGE_COLLECTION_DELAY 10\r
#define MAX_NOF_FAILED_GC_ATTEMPTS 5\r
/***************************************\r
* Local functions *\r
\r
/* State of device */\r
CurrentJob.State = FEE_STARTUP_REQUESTED;\r
- CurrentJob.InStateCounter = 0;\r
#if (FEE_POLLING_MODE == STD_OFF)\r
FlsJobReady = TRUE;\r
#endif\r
*/\r
void Fee_MainFunction(void)\r
{\r
- static CurrentJobStateType LastState = FEE_UNINITIALIZED;\r
-\r
- if (CurrentJob.State == LastState) {\r
- if (CurrentJob.InStateCounter < STATE_COUNTER_MAX) {\r
- CurrentJob.InStateCounter++;\r
- }\r
- } else {\r
- LastState = CurrentJob.State;\r
- CurrentJob.InStateCounter = 0;\r
- }\r
\r
switch (CurrentJob.State) {\r
case FEE_UNINITIALIZED:\r