Compare commits

..

No commits in common. "3fc8562a2b33fea259f6d9b378828f3ae15ca435" and "bdef3ff652e250b1735b45a688dc8220219a563c" have entirely different histories.

6 changed files with 108 additions and 278 deletions

View File

@ -33,8 +33,6 @@ QMAKE_CXXFLAGS += -C
QMAKE_CXXFLAGS += -O2 -O
QMAKE_CXXFLAGS += -g
QMAKE_CXXFLAGS += -Wno-deprecated-copy
# QMAKE_CXXFLAGS += -fsanitize=address
# QMAKE_CXXFLAGS += -fno-omit-frame-pointer
QMAKE_LFLAGS += -Wl,-e,main

View File

@ -104,26 +104,11 @@ void DownloadThread::run() {
m_hw->dcDownloadRequestAck();
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DownloadThread::run(): DOWNLOAD THREAD STARTED:";
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< " DownloadThread::run(): Filename:" << m_hw->dcDownloadFileName();
QDateTime const start = QDateTime::currentDateTime();
#if 1
QFile fn(m_hw->dcDownloadFileName());
if (!fn.exists()) {
// output via CONSOLE() etc
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< " DownloadThread::run(): Filename:" << m_hw->dcDownloadFileName() << "DOES NOT EXIST";;
} else {
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): DC-CONTROLLER SW-VERSION BEFORE"
<< m_hw->dc_getSWversion();
// load binary device controller file into memory
QByteArray ba = loadBinaryDCFile(m_hw->dcDownloadFileName());
if (ba.size() > 0) {
@ -133,9 +118,9 @@ void DownloadThread::run() {
// fill last block of data to be sent with 0xFF
ba = ba.leftJustified(totalBlocks*64, (char)(0xFF));
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DownloadThread::run(): TOTAL NUMBER OF BYTES TO SEND TO DC" << ba.size();
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DownloadThread::run(): TOTAL NUMBER OF BLOCKS" << totalBlocks;
m_hw->dc_autoRequest(true); // turn auto-request setting on
@ -144,42 +129,32 @@ void DownloadThread::run() {
m_hw->request_DC2_SWversion();
QThread::sleep(1);
// m_hw->dc_autoRequest(false); // turn auto-request setting on
resetDeviceController();
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DownloadThread::run(): RESET DEVICE-CONTROLLER";
QThread::sleep(1);
if (startBootloader()) {
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DownloadThread::run(): STARTED BOOT-LOADER";
m_hw->dc_autoRequest(false);// turn auto-request setting off for
// download of binary dc
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): TOTAL NUMBER OF FIRMWARE BLOCKS" << totalBlocks;
#if 0
int currentBlock = 0; // download of binary dc
DownloadResult res = DownloadResult::OK;
qCritical() << "64-byte block " << currentBlock;
while (res != DownloadResult::ERROR && currentBlock < totalBlocks) {
if ((res = sendNextAddress(currentBlock)) != DownloadResult::ERROR) {
if ((res = sendNextDataBlock(ba, currentBlock)) != DownloadResult::ERROR) {
m_hw->dcDownloadSetCurrentBlockNumber(currentBlock);
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): currentBlockNumber ..." << currentBlock;
currentBlock += 1;
}
}
}
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< QString("DownloadThread::run(): last 64-byte block %1").arg(currentBlock);
qCritical() << "DownloadThread::run(): last 64-byte block %04d" << currentBlock;
int const rest = ba.size() % 64;
int const offset = ba.size() - rest;
@ -200,87 +175,26 @@ void DownloadThread::run() {
// QThread::msleep(250);
}
qCritical() << "DownloadThread::run(): last result" << (int)sendStatus(m_hw->bl_wasSendingDataOK());
stopBootloader(); // stop bootloader several times: if it
QThread::sleep(1); // is not stopped, then the PSA has to be
}
// restarted manually (!!!)
stopBootloader();
QThread::sleep(1);
}
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): STOPPED BOOT-LOADER";
stopBootloader(); // there is no harm in stopping the bootloader even
// if it was not started at all
m_hw->dc_autoRequest(true);
}
#else // test
// load binary device controller file into memory
QByteArray ba = loadBinaryDCFile(m_hw->dcDownloadFileName());
if (ba.size() > 0) {
uint16_t const totalBlocks = (((ba.size())%64)==0) ? (ba.size()/64) : (ba.size()/64)+1;
m_hw->dcDownloadSetTotalBlockNumber(totalBlocks);
// fill last block of data to be sent with 0xFF
ba = ba.leftJustified(totalBlocks*64, (char)(0xFF));
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): TOTAL NUMBER OF BYTES TO SEND TO DC" << ba.size();
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): TOTAL NUMBER OF BLOCKS" << totalBlocks;
m_hw->dc_autoRequest(true); // turn auto-request setting on
m_hw->request_DC2_HWversion();
m_hw->request_DC2_SWversion();
QThread::sleep(1);
resetDeviceController();
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): RESET DEVICE-CONTROLLER";
QThread::sleep(1);
if (startBootloader()) {
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "DownloadThread::run(): STARTED BOOT-LOADER";
m_hw->dc_autoRequest(false);// turn auto-request setting off for
// download of binary dc
#else
for (uint16_t currentBlock = 0; currentBlock <= totalBlocks; ++currentBlock) {
m_hw->dcDownloadSetCurrentBlockNumber(currentBlock);
qCritical() << "DownloadThread::run(): currentBlockNumber" << currentBlock;
QThread::msleep(250);
}
#endif
m_hw->dc_autoRequest(true); // turn auto-request setting on again
}
stopBootloader(); // there is no harm in stopping the bootloader even
// if it was not started at all
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DownloadThread::run(): STOPPED BOOT-LOADER";
}
#endif
m_hw->dcDownloadSetRunning(false);
m_hw->dcDownloadSetFinished(true);
QDateTime const end = QDateTime::currentDateTime();
quint64 secs = start.secsTo(end);
QString runtime;
if (secs % 60) {
runtime = QString("%1min %2s").arg(secs / 60).arg(secs % 60);
} else {
runtime = QString("%1min").arg((secs / 60) + 1);
}
qCritical() << end.time().toString(Qt::ISODateWithMs)
<< QString("DOWNLOAD THREAD FINISHED (RUNTIME %1)")
.arg(runtime);
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "DOWNLOAD THREAD FINISHED";
// the object deletes itself ! This is the last line in run().
// Never touch the object after this statement
@ -304,6 +218,7 @@ DownloadThread::sendNextAddress(int bNum) const {
int noAnswerCount = 0;
int errorCount = 0;
if ( bNum==0 || bNum==1024 || bNum==2048 || bNum==3072 || bNum==4096 ) {
// qDebug() << "addr-block" << bNum << "...";
while (noAnswerCount <= 250) {
m_hw->bl_sendAddress(bNum);
QThread::msleep(100);
@ -342,6 +257,9 @@ DownloadThread::sendNextDataBlock(QByteArray const &binary, int bNum) const {
memcpy(local, binary.constData() + bAddr, 64);
local[64] = local[65] = 0x00;
// QByteArray b((const char *)(&local[0]), 64);
// qCritical() << "SNDB" << bNum << b.size() << b.toHex();
while (noAnswerCount <= 250) {
m_hw->bl_sendDataBlock(64, local);
QThread::msleep(10);
@ -354,7 +272,9 @@ DownloadThread::sendNextDataBlock(QByteArray const &binary, int bNum) const {
}
} else {
// qInfo() << "data for block" << bNum << "OK";
// TODO: hier ins shared mem schreiben
return res;
}
} else {
@ -366,65 +286,64 @@ DownloadThread::sendNextDataBlock(QByteArray const &binary, int bNum) const {
}
bool DownloadThread::startBootloader() const {
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "starting bootloader...";
int nTry = 5;
while (--nTry >= 0) {
m_hw->bl_startBL();
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bl_startBL() ..." << nTry;
QThread::msleep(500);
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bl_startBL() ..." << nTry;
QThread::msleep(1000);
m_hw->bl_checkBL();
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bl_checkBL() ..." << nTry;
QThread::msleep(500);
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bl_checkBL() ..." << nTry;
QThread::msleep(1000);
if (m_hw->bl_isUp()) {
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bootloader... isUP" << nTry;
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bootloader... isUP" << nTry;
return true;
} else {
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "bootloader not up (" << nTry << ")";
}
}
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "starting bootloader FAILED";
return false;
}
bool DownloadThread::stopBootloader() const {
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "stopping bootloader...";
int nTry = 5;
while (--nTry >= 0) {
m_hw->bl_stopBL();
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "bl_stopBL() ...";
QThread::msleep(500);
m_hw->bl_checkBL();
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bl_checkBL() ..." << nTry;
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bl_checkBL() ..." << nTry;
if (!m_hw->bl_isUp()) {
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "stopping bootloader OK";
return true;
}
}
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "stopping bootloader FAILED";
return false;
}
bool DownloadThread::resetDeviceController() const {
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "resetting device controller...";
m_hw->bl_rebootDC();
// wait maximally 3 seconds, before starting bootloader
QThread::sleep(1);
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< "resetting device controller...OK";
return true;
}
QByteArray DownloadThread::loadBinaryDCFile(QString filename) const {
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
<< "loading dc binary" << filename << "...";
qDebug() << "loading dc binary" << filename << "...";
QFile file(filename); // closed in destructor call
if (!file.exists()) {

View File

@ -2640,23 +2640,12 @@ void hwapi::bl_openBinary(void) const
void hwapi::bl_sendDataBlock(uint8_t length, uint8_t *buffer) const
{
// send 64 byte from bin file
// gh, 09/02/2024: extend sendBuf. Buffer sometimes too small, sendLen=81
uint8_t LL=length, sendBuf[80+32], sendLen;
uint8_t LL=length, sendBuf[80], sendLen;
if (LL>64) LL=64;
memset(sendBuf, 0, sizeof(sendBuf));
tslib_strclr(sendBuf,0,80);
sendLen=dcBL_prepareDC_BLcmd(0x22, LL, buffer, sendBuf); // pack into protocol frame
// qCritical() << "(" __func__ << ":" << __LINE__ << ") sendLen=" << sendLen
// << ":" << QByteArray((const char *)sendBuf, sendLen);
sendWRcmd_setSendBlock160(sendLen, sendBuf); // send 140 bytes
// if (sendLen > 80) {
// qCritical() << "(" << __func__ << ":" << __LINE__ << ")"
// << QByteArray((const char *)&sendBuf[80], 32).toHex(':');
// }
delay(100);
}

View File

@ -8,7 +8,6 @@
#include <QCoreApplication>
#include <cmath>
#include <algorithm>
ReportingThread::ReportingThread(hwapi *hw)
: m_hw(hw)
@ -100,27 +99,14 @@ void ReportingThread::run() {
#endif
uint16_t totalBlocks = m_hw->dcDownloadGetTotalBlockNumber();
cnt = 10;
while(--cnt > 0 && totalBlocks == 0) {
totalBlocks = m_hw->dcDownloadGetTotalBlockNumber();
qCritical() << QDateTime::currentDateTime() << __PRETTY_FUNCTION__
<< QString("line=%1 TOTAL BLOCKS=%2 (%3)")
.arg(__LINE__).arg(totalBlocks).arg(cnt);
QThread::sleep(1);
}
uint16_t const totalBlocks = m_hw->dcDownloadGetTotalBlockNumber();
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << __PRETTY_FUNCTION__
<< QString("line=%1 TOTAL BLOCKS=%2").arg(__LINE__).arg(totalBlocks);
qCritical() << QDateTime::currentDateTime() << "TOTAL BLOCKS" << totalBlocks;
if (totalBlocks) {
QDateTime const start = QDateTime::currentDateTime();
uint16_t currentBlockNumber = 0;
uint16_t prevBlockNumber = ~0;
uint64_t estimatedMinutesLeftMax = ~0ULL;
uint64_t estimatedSecondsLeftMax = ~0ULL;
uint64_t estimatedMinutesLeftPrev = 0;
uint64_t estimatedSecondsLeftPrev = 0;
while (m_hw->dcDownloadGetRunning()) {
currentBlockNumber = m_hw->dcDownloadGetCurrentBlockNumber();
@ -128,21 +114,13 @@ void ReportingThread::run() {
double durationSecs = start.secsTo(QDateTime::currentDateTime());
double const timeAveragePerBlock = (currentBlockNumber > 0) ? (durationSecs / currentBlockNumber) : durationSecs;
uint64_t estimatedSecondsLeft = lround((timeAveragePerBlock * (totalBlocks - currentBlockNumber)));
uint64_t estimatedMinutesLeft =
long estimatedSecondsLeft = lround((timeAveragePerBlock * (totalBlocks - currentBlockNumber)));
long estimatedMinutesLeft =
((estimatedSecondsLeft % 60) == 0) ?
(estimatedSecondsLeft / 60) :
((estimatedSecondsLeft + 60) / 60);
estimatedSecondsLeft = (estimatedSecondsLeft % 60);
if ((estimatedMinutesLeft <= estimatedMinutesLeftMax)
|| (estimatedSecondsLeft <= estimatedSecondsLeftMax)) {
estimatedMinutesLeftMax = estimatedMinutesLeft;
estimatedSecondsLeftMax = estimatedSecondsLeft;
estimatedMinutesLeftPrev = estimatedMinutesLeft;
estimatedSecondsLeftPrev = estimatedSecondsLeft;
double percent = ((double)currentBlockNumber / (double)totalBlocks) * 100.0;
report = QString(": total blocks %1, current block %2 [%3] (est. time left: %4min %5s)")
.arg(totalBlocks)
@ -151,26 +129,10 @@ void ReportingThread::run() {
.arg(estimatedMinutesLeft)
.arg(estimatedSecondsLeft, 2);
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< QString("line=%1: RT report").arg(__LINE__) << report;
qCritical() << m_hw << "RT report" << report;
emit m_hw->hwapi_reportDCDownloadStatus(report);
} else {
double percent = ((double)currentBlockNumber / (double)totalBlocks) * 100.0;
report = QString(": total blocks %1, current block %2 [%3] (est. time left: %4min %5s)")
.arg(totalBlocks)
.arg(currentBlockNumber)
.arg(percent, 0, 'f', 2)
.arg(estimatedMinutesLeftPrev)
.arg(estimatedSecondsLeftPrev, 2);
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
<< QString("line=%1: RT report").arg(__LINE__) << report;
emit m_hw->hwapi_reportDCDownloadStatus(report);
}
prevBlockNumber = currentBlockNumber;
}
QThread::msleep(100);
@ -188,7 +150,7 @@ void ReportingThread::run() {
}
}
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << __PRETTY_FUNCTION__
qCritical() << QDateTime::currentDateTime() << __PRETTY_FUNCTION__
<< QString("line=%1 REPORT THREAD ABOUT TO FINISH").arg(__LINE__);
cnt = 10;

View File

@ -684,7 +684,6 @@ bool T_runProc::bl_isUp(void)
for (nn=0; nn<160; nn++) receivedData[nn]=0;
LL=epi_getRawRecLength();
if (LL>0)
{
epi_getRawReceivedData(receivedData);
@ -697,26 +696,15 @@ bool T_runProc::bl_isUp(void)
//epi_clrRawReceivedString();
return true;
}
// response to "start BL" { 2, 101, 48, 223, 131, 3}
static uint8_t const cmp[6] = {0x02, 0x65, 0x30, 0xdf, 0x83, 0x03};
if (LL >= 6 && LL <= 13) {
// (1) "02:63:34:35:62:33:03:02:65:30:df:83:03"
// (2) "02:65:30:df:83:03"
// qCritical() << "(" << __func__ << ":" << __LINE__
// << ") CHECK" << QByteArray((char const*)receivedData, LL).toHex(':');
for (int i=0; i <= LL-6; ++i) {
if (memcmp(cmp, &receivedData[i], 6) == 0) {
qCritical() << "(" << __func__ << ":" << __LINE__
<< ") BL RESPONSE to bl_start(): BOOTLOADER IS UP";
// response to "start BL"
if (receivedData[0]==2 && receivedData[1]==101 && receivedData[2]==48 &&
receivedData[3]==223 && receivedData[4] ==131 )
{
qDebug() << "hwapi_bl_isUp: got BL response to start";
//epi_clrRawReceivedString();
return true;
}
}
}
}
return false;
}

View File

@ -6,8 +6,6 @@
#include "shared_mem_buffer.h"
#include "datei.h"
#include <QTextCodec>
// gpi: grafical access to PI: access from external devices over device controller FOR GUI
// epi: external access from GUI to PI: FOR external devices (DC)
@ -66,64 +64,40 @@ bool indat_isMdbOn()
void gpi_storeHWver(QString text)
{
QString prev(QByteArray(SharedMem::read()->indat_HWversion, versionBufferLen-1));
prev = prev.trimmed();
QString const textTruncated = text.mid(0, qMin(versionBufferLen-1, text.size())).trimmed();
if (textTruncated.startsWith("DC2C", Qt::CaseInsensitive)
&& textTruncated != prev) {
QTextCodec *codec = QTextCodec::codecForName("Windows-1252");
QString string = codec->toUnicode(textTruncated.toUtf8());
if (!string.isEmpty()) {
QString hwVersion((char const *)SharedMem::read()->indat_HWversion);
if (hwVersion != text) {
char const *p = text.toUtf8().constData();
if (qstrlen(p) > 0) {
memset(SharedMem::write()->indat_HWversion, 0, versionBufferLen);
char *p = (char *)SharedMem::write()->indat_HWversion;
char *q = (char *)string.constData();
for (int i=0; i < qMin(versionBufferLen, string.size()); ++i) {
int const j = (sizeof(QChar) == 2) ? i*2 : i;
if (q[j]) {
*p++ = q[j];
}
}
memcpy(SharedMem::write()->indat_HWversion, p,
qMin((uint)versionBufferLen, qstrlen(p)) - 1);
}
qCritical() << "Changed" << hwVersion << "to" << epi_loadHWver();
}
}
QString epi_loadHWver(void)
{
QString text(SharedMem::read()->indat_HWversion);
return text.mid(0, qMin(versionBufferLen-1, text.size())).trimmed();
return QString((char const*)SharedMem::read()->indat_HWversion);
}
void gpi_storeSWver(QString text)
{
QString prev(QByteArray(SharedMem::read()->indat_SWversion, 12));
prev = prev.trimmed();
QString const textTruncated = text.mid(0, qMin(12, text.size())).trimmed();
if (textTruncated.startsWith("DC2C", Qt::CaseInsensitive)
&& textTruncated != prev) {
QTextCodec *codec = QTextCodec::codecForName("Windows-1252");
QString string = codec->toUnicode(textTruncated.toUtf8());
if (!string.isEmpty()) {
QString swVersion((char const *)SharedMem::read()->indat_SWversion);
if (swVersion != text) {
char const *p = text.toUtf8().constData();
if (qstrlen(p) > 0) {
memset(SharedMem::write()->indat_SWversion, 0, versionBufferLen);
char *p = (char *)SharedMem::write()->indat_SWversion;
char *q = (char *)string.constData();
for (int i=0; i < qMin(versionBufferLen, string.size()); ++i) {
int const j = (sizeof(QChar) == 2) ? i*2 : i;
if (q[j]) {
*p++ = q[j];
}
}
memcpy(SharedMem::write()->indat_SWversion, p,
qMin((uint)versionBufferLen, qstrlen(p)) - 1);
}
qCritical() << "Changed" << swVersion << "to" << epi_loadSWver();
}
}
QString epi_loadSWver(void)
{
QString text(SharedMem::read()->indat_SWversion);
return text.mid(0, qMin(12, text.size())).trimmed();
return QString((char const*)SharedMem::read()->indat_SWversion);
}
void gpi_storeDCstate(QString text)
@ -2203,8 +2177,8 @@ void gpi_storeRawReceivedData(uint8_t RdDlen, uint8_t *receivedData)
SharedMem::write()->Sdata_LengthRawData=lrd;
for (nn=0; nn<lrd; nn++)
SharedMem::write()->Sdata_rawData[nn]=receivedData[nn];
//qDebug()<<"dcBL got data"<< Sdata_LengthRawData << "bytes :)";
}
uint8_t epi_getRawReceivedData(uint8_t *receivedData)