diff options
| author | JF <jf@codingfield.com> | 2020-05-20 16:39:25 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-05-20 16:39:25 (GMT) |
| commit | ce328636935dbc580aad1245fdaff54d6ba947a3 (patch) | |
| tree | 9c71b697cb3f1c18a6d16014b0996af2eede92f0 /src/Components/Ble/DfuService.h | |
| parent | ee05577dd62c64d0e6a2e497b75710c7a1351557 (diff) | |
Fix offset issues in OTA procedure.
CRC verification : work in progress (not fully working for now).
Diffstat (limited to 'src/Components/Ble/DfuService.h')
| -rw-r--r-- | src/Components/Ble/DfuService.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Components/Ble/DfuService.h b/src/Components/Ble/DfuService.h index 1406d6a..e22e09f 100644 --- a/src/Components/Ble/DfuService.h +++ b/src/Components/Ble/DfuService.h @@ -89,15 +89,23 @@ namespace Pinetime { uint8_t nbPacketsToNotify = 0; uint32_t nbPacketReceived = 0; uint32_t bytesReceived = 0; + uint32_t writeOffset = 0; //0x40000; uint32_t softdeviceSize = 0; uint32_t bootloaderSize = 0; - uint32_t applicationSize = 0; + uint32_t applicationSize = 115200; int SendDfuRevision(os_mbuf *om) const; void SendNotification(uint16_t connectionHandle, const uint8_t *data, const size_t size); int WritePacketHandler(uint16_t connectionHandle, os_mbuf *om); int ControlPointHandler(uint16_t connectionHandle, os_mbuf *om); + + uint8_t tempBuffer[200]; + uint16_t ComputeCrc(uint8_t const * p_data, uint32_t size, uint16_t const * p_crc); + + void Validate(); + bool firstCrc = true; + uint16_t tempCrc = 0; }; } }
\ No newline at end of file |
