add lightTask

This commit is contained in:
2024-02-25 00:01:41 +01:00
parent 2384399d97
commit 69a01f167e
7 changed files with 180 additions and 37 deletions

View File

@@ -9,6 +9,7 @@
#include "UsbDataHandler.h"
#include "crc.h"
#include "FirmwareUpdate.h"
#include "stdbool.h"
// static memory only for decoding messages
static FirmwareStart msg_FirmwareStart;
@@ -25,19 +26,6 @@ static FRESULT fresult_open =0;
static uint32_t fwStartTime = 0;
static uint32_t fwPackageCounter =0;
#define ASSERT_SIZE(x) \
{ \
if (!(x)) \
Error_Handler(); \
}
#define DATA_CLBK_SETUP(name) \
{ \
ASSERT_SIZE(length == sizeof(name)); \
memcpy(&msg_##name, msg, sizeof(name)); \
}
/**
* @brief This function builds and sends a FirmwarePackageAck message over USB.
*