dRonin
adbada4
dRonin firmware
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
dRonin
IMU Orientation Convention
Todo List
Modules
Namespaces
Data Structures
Files
File List
Globals
•
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
{
35
start
,
keepgoing
,
36
}
DownloadAction
;
37
38
/**************************************************/
39
/* OP_DFU states */
40
/**************************************************/
41
42
typedef
enum
{
43
DFUidle
,
//0
44
uploading
,
//1
45
wrong_packet_received
,
//2
46
too_many_packets
,
//3
47
too_few_packets
,
//4
48
Last_operation_Success
,
//5
49
downloading
,
//6
50
BLidle
,
//7
51
Last_operation_failed
,
//8
52
uploadingStarting
,
//9
53
outsideDevCapabilities
,
//10
54
CRC_Fail
,
//11
55
failed_jump
,
56
//12
57
}
DFUStates
;
58
/**************************************************/
59
/* OP_DFU commands */
60
/**************************************************/
61
typedef
enum
{
62
Reserved
,
//0
63
Req_Capabilities
,
//1
64
Rep_Capabilities
,
//2
65
EnterDFU
,
//3
66
JumpFW
,
//4
67
Reset
,
//5
68
Abort_Operation
,
//6
69
Upload
,
//7
70
Op_END
,
//8
71
Download_Req
,
//9
72
Download
,
//10
73
Status_Request
,
//11
74
Status_Rep
75
//12
76
}
DFUCommands
;
77
78
typedef
enum
{
79
High_Density
,
Medium_Density
80
}
DeviceType
;
81
/**************************************************/
82
/* OP_DFU transfer types */
83
/**************************************************/
84
typedef
enum
{
85
FW
,
//0
86
Descript
87
//2
88
}
DFUTransfer
;
89
/**************************************************/
90
/* OP_DFU transfer port */
91
/**************************************************/
92
typedef
enum
{
93
Usb
,
//0
94
Serial
95
//2
96
}
DFUPort
;
97
/**************************************************/
98
/* OP_DFU programable programable HW types */
99
/**************************************************/
100
typedef
enum
{
101
Self_flash
,
//0
102
Remote_flash_via_spi
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
start
Definition:
common.h:35
BLidle
Definition:
common.h:50
keepgoing
Definition:
common.h:35
FW
Definition:
common.h:85
downloading
Definition:
common.h:49
Rep_Capabilities
Definition:
common.h:64
DFUTransfer
DFUTransfer
Definition:
common.h:84
Reserved
Definition:
common.h:62
DFUPort
DFUPort
Definition:
common.h:92
Status_Rep
Definition:
common.h:74
Req_Capabilities
Definition:
common.h:63
outsideDevCapabilities
Definition:
common.h:53
CRC_Fail
Definition:
common.h:54
Reset
Definition:
common.h:67
too_few_packets
Definition:
common.h:47
Download
Definition:
common.h:72
Op_END
Definition:
common.h:70
DFUCommands
DFUCommands
Definition:
common.h:61
JumpFW
Definition:
common.h:66
Usb
Definition:
common.h:93
Last_operation_failed
Definition:
common.h:51
wrong_packet_received
Definition:
common.h:45
uploading
Definition:
common.h:44
DFUProgType
DFUProgType
Definition:
common.h:100
DeviceType
DeviceType
Definition:
common.h:78
Last_operation_Success
Definition:
common.h:48
Serial
Definition:
common.h:94
too_many_packets
Definition:
common.h:46
Abort_Operation
Definition:
common.h:68
Remote_flash_via_spi
Definition:
common.h:102
High_Density
Definition:
common.h:79
DFUStates
DFUStates
Definition:
common.h:42
EnterDFU
Definition:
common.h:65
Self_flash
Definition:
common.h:101
Status_Request
Definition:
common.h:73
DFUidle
Definition:
common.h:43
Upload
Definition:
common.h:69
uploadingStarting
Definition:
common.h:52
Descript
Definition:
common.h:86
Medium_Density
Definition:
common.h:79
DownloadAction
DownloadAction
Definition:
common.h:34
failed_jump
Definition:
common.h:55
Download_Req
Definition:
common.h:71
flight
targets
bl
f1
common.h
Generated by
1.8.6