30 #include <rawhid/hidapi/hidapi.h>
40 #define BL_CAP_EXTENSION_MAGIC 0x3456
80 typedef struct messagePackets
87 typedef struct statusReport
94 static quint32 CRCFromQBArray(QByteArray array, quint32 Size);
100 int ResetDevice(
void);
102 void CloseBootloaderComs();
105 bool UploadPartitionThreaded(QByteArray &sourceArray,
dfu_partition_label partition,
int size);
109 QByteArray DownloadDescriptionAsByteArray(
int const &numberOfChars);
112 device findCapabilities();
116 void downloadFinished(
bool);
118 void operationProgress(QString status,
int progress);
121 bool DownloadPartition(QByteArray *fw, qint32
const &numberOfBytes,
127 static quint32 CRC32WideFast(quint32 Crc, quint32 Size, quint32 *Buffer);
128 void CopyWords(
char *source,
char *destination,
int count);
129 messagePackets CalculatePadding(quint32 numberOfBytes);
133 statusReport StatusRequest();
135 int AbortOperation(
void);
138 int SendData(bl_messages);
139 int ReceiveData(bl_messages &
data,
int timeoutMS = 10000);
140 hid_device *m_hidHandle;
143 bool UploadData(qint32
const &numberOfPackets, QByteArray &
data);
145 typedef struct ThreadJobStruc
154 ThreadJobStruc threadJob;
dfu_partition_label requestTransferType
QByteArray * requestStorage
Actions requestedOperation
QVector< quint32 > PartitionSizes
Q_DECLARE_METATYPE(Core::Internal::MenuActionContainer *) using namespace Core