Improved inclusion of platform.h. Improved initialization in queueClear.
This commit is contained in:
parent
01a19cdc04
commit
c80b8cd718
|
@ -22,12 +22,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef UNIT_TEST
|
#ifdef UNIT_TEST
|
||||||
// cannot include platform.h in UNIT_TEST build, since if included the build #defines (eg MAG, GPS, etc)
|
|
||||||
// are set differently to test code
|
|
||||||
typedef enum {TEST_IRQ = 0 } IRQn_Type;
|
typedef enum {TEST_IRQ = 0 } IRQn_Type;
|
||||||
#else
|
|
||||||
#include "platform.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
@ -61,7 +58,7 @@ static cfTask_t* taskQueueArray[TASK_COUNT + 1]; // extra item for NULL pointer
|
||||||
#endif
|
#endif
|
||||||
STATIC_UNIT_TESTED void queueClear(void)
|
STATIC_UNIT_TESTED void queueClear(void)
|
||||||
{
|
{
|
||||||
memset(taskQueueArray, 0, sizeof(cfTask_t) * (TASK_COUNT + 1));
|
memset(taskQueueArray, 0, sizeof(taskQueueArray));
|
||||||
taskQueuePos = 0;
|
taskQueuePos = 0;
|
||||||
taskQueueSize = 0;
|
taskQueueSize = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue