33 #include "pios_bl_helper.h"
76 void sendData(uint8_t * buf, uint16_t size);
96 for (uint8_t x = 0; x < packetSize; ++x) {
129 Data += xReceive_Buffer[
DATA + 1] << 16;
130 Data += xReceive_Buffer[
DATA + 2] << 8;
152 currentDevice = devicesTable[
Data0];
214 uint8_t numberOfWords = 14;
222 for (uint8_t x = 0; x < numberOfWords; ++x) {
229 Count * 14 * 4 + x * 4);
233 result = (FLASH_ProgramWord(
aux,
Data)
234 == FLASH_COMPLETE) ? 1 : 0;
273 uint16_t WRFlags = 0;
299 if ((
Data & 0xFFFF) == 0x5AFE) {
405 devicesTable[0] = dev;
426 return (size > currentDevice.
sizeOfCode) ? 1 : 0;
460 for (uint8_t x = 0; x < 4; ++x) {
void sendData(uint8_t *buf, uint16_t size)
uint8_t * PIOS_BL_HELPER_FLASH_If_Read(uint32_t SectorAddress)
uint8_t currentDeviceCanWrite
int32_t PIOS_COM_SendString(uintptr_t com_id, const char *str)
uint32_t baseOfAdressType(DFUTransfer type)
int32_t PIOS_COM_MSG_Send(uintptr_t com_id, const uint8_t *msg, uint16_t msg_len)
Main PiOS header to include all the compiled in PiOS options.
uint32_t PIOS_BL_HELPER_CRC_Memory_Calc()
int sprintf(char *out, const char *format,...)
void processComand(uint8_t *xReceive_Buffer)
void OPDfuIni(uint8_t discover)
#define PIOS_COM_TELEM_USB
const struct pios_board_info pios_board_info_blob
uint8_t isBiggerThanAvailable(DFUTransfer type, uint32_t size)
uint32_t downPacketCurrent
uint32_t downSizeOfLastPacket
DFUProgType currentProgrammingDestination
COM MSG layer functions header.
This file contains the DFU commands handling code.
int32_t PIOS_SYS_Reset(void)
uint8_t currentDeviceCanRead
bool flash_read(uint8_t *buffer, uint32_t adr, DFUProgType type)
uint32_t CalcFirmCRC(void)
void PIOS_IAP_WriteBootCount(uint16_t)
uint8_t sizeOfDescription
uint8_t PIOS_BL_HELPER_FLASH_Ini()
uint8_t PIOS_BL_HELPER_FLASH_Start()
void DataDownload(DownloadAction action)