dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
common.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 #ifndef COMMON_H_
30 #define COMMON_H_
31 
32 //#include "board.h"
33 
34 typedef enum {
37 
38 /**************************************************/
39 /* OP_DFU states */
40 /**************************************************/
41 
42 typedef enum {
43  DFUidle, //0
44  uploading, //1
50  BLidle, //7
54  CRC_Fail,//11
56 //12
57 } DFUStates;
58 /**************************************************/
59 /* OP_DFU commands */
60 /**************************************************/
61 typedef enum {
62  Reserved, //0
65  EnterDFU, //3
66  JumpFW, //4
67  Reset, //5
69  Upload, //7
70  Op_END, //8
72  Download, //10
75 //12
76 } DFUCommands;
77 
78 typedef enum {
80 } DeviceType;
81 /**************************************************/
82 /* OP_DFU transfer types */
83 /**************************************************/
84 typedef enum {
85  FW, //0
87 //2
88 } DFUTransfer;
89 /**************************************************/
90 /* OP_DFU transfer port */
91 /**************************************************/
92 typedef enum {
93  Usb, //0
95 //2
96 } DFUPort;
97 /**************************************************/
98 /* OP_DFU programable programable HW types */
99 /**************************************************/
100 typedef enum {
103 //1
104 } DFUProgType;
105 /**************************************************/
106 /* OP_DFU programable sources */
107 /**************************************************/
108 #define USB 0
109 #define SPI 1
110 
111 #define DownloadDelay 100000
112 
113 #define MAX_DEL_RETRYS 3
114 #define MAX_WRI_RETRYS 3
115 
116 #endif /* COMMON_H_ */
117 
Definition: common.h:35
Definition: common.h:50
Definition: common.h:85
DFUTransfer
Definition: common.h:84
DFUPort
Definition: common.h:92
Definition: common.h:67
Definition: common.h:70
DFUCommands
Definition: common.h:61
Definition: common.h:66
Definition: common.h:93
DFUProgType
Definition: common.h:100
DeviceType
Definition: common.h:78
Definition: common.h:94
DFUStates
Definition: common.h:42
Definition: common.h:43
Definition: common.h:69
DownloadAction
Definition: common.h:34