LP-89 - Port OP_15.05.01 fixes. Release notes:
[librepilot.git] / flight / libraries / inc / op_dfu.h
blob386609ae4d4472cc52d4a11b46521bdfee8815de
1 /**
2 ******************************************************************************
4 * @file op_dfu.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @brief
7 * @see The GNU Public License (GPL) Version 3
9 *****************************************************************************/
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 * for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 /* Define to prevent recursive inclusion -------------------------------------*/
27 #ifndef __OP_DFU_H
28 #define __OP_DFU_H
29 #include "common.h"
30 /* Includes ------------------------------------------------------------------*/
31 /* Exported types ------------------------------------------------------------*/
32 typedef struct {
33 uint8_t programmingType;
34 uint8_t readWriteFlags;
35 uint32_t startOfUserCode;
36 uint32_t sizeOfCode;
37 uint8_t sizeOfDescription;
38 uint8_t BL_Version;
39 uint16_t devID;
40 DeviceType devType;
41 uint32_t FW_Crc;
42 } Device;
44 /* Exported constants --------------------------------------------------------*/
45 /* Exported macro ------------------------------------------------------------*/
46 /* Exported define -----------------------------------------------------------*/
47 #define COMMAND 0
48 #define COUNT 1
49 #define DATA 5
51 /* Exported functions ------------------------------------------------------- */
52 void processComand(uint8_t *Receive_Buffer);
53 void DataDownload(DownloadAction);
55 #endif /* __OP_DFU_H */
57 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/