dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
op_dfu.h
Go to the documentation of this file.
1 
15 /*
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful, but
22  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  * for more details.
25  *
26  * You should have received a copy of the GNU General Public License along
27  * with this program; if not, see <http://www.gnu.org/licenses/>
28  */
29 
30 /* Define to prevent recursive inclusion -------------------------------------*/
31 #ifndef __OP_DFU_H
32 #define __OP_DFU_H
33 #include "common.h"
34 /* Includes ------------------------------------------------------------------*/
35 /* Exported types ------------------------------------------------------------*/
36 typedef struct {
37  uint8_t programmingType;
38  uint8_t readWriteFlags;
39  uint32_t startOfUserCode;
40  uint32_t sizeOfCode;
42  uint8_t BL_Version;
43  uint16_t devID;
45  uint32_t FW_Crc;
46 } Device;
47 
48 /* Exported constants --------------------------------------------------------*/
49 /* Exported macro ------------------------------------------------------------*/
50 /* Exported define -----------------------------------------------------------*/
51 #define COMMAND 0
52 #define COUNT 1
53 #define DATA 5
54 
55 /* Exported functions ------------------------------------------------------- */
56 void processComand(uint8_t *Receive_Buffer);
57 uint32_t baseOfAdressType(uint8_t type);
58 uint8_t isBiggerThanAvailable(uint8_t type, uint32_t size);
59 void OPDfuIni(uint8_t discover);
61 bool flash_read(uint8_t * buffer, uint32_t adr, DFUProgType type);
62 #endif /* __OP_DFU_H */
63 
void processComand(uint8_t *xReceive_Buffer)
Definition: op_dfu.c:112
uint16_t devID
Definition: op_dfu.h:43
uint8_t BL_Version
Definition: op_dfu.h:42
void OPDfuIni(uint8_t discover)
Definition: op_dfu.c:391
DeviceType devType
Definition: op_dfu.h:44
uint8_t isBiggerThanAvailable(uint8_t type, uint32_t size)
uint32_t FW_Crc
Definition: op_dfu.h:45
uint32_t startOfUserCode
Definition: op_dfu.h:39
DFUProgType
Definition: common.h:100
DeviceType
Definition: common.h:78
Definition: op_dfu.h:36
uint8_t programmingType
Definition: op_dfu.h:37
bool flash_read(uint8_t *buffer, uint32_t adr, DFUProgType type)
Definition: op_dfu.c:454
uint8_t type
uint32_t baseOfAdressType(uint8_t type)
Common definitions across the bootloaders.
uint32_t sizeOfCode
Definition: op_dfu.h:40
uint8_t sizeOfDescription
Definition: op_dfu.h:41
DownloadAction
Definition: common.h:34
uint8_t readWriteFlags
Definition: op_dfu.h:38
void DataDownload(DownloadAction action)
Definition: op_dfu.c:79