dRonin
adbada4
dRonin firmware
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
pios_usb_board_data.h
Go to the documentation of this file.
1
13
/*
14
* This program is free software; you can redistribute it and/or modify
15
* it under the terms of the GNU General Public License as published by
16
* the Free Software Foundation; either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful, but
20
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
* for more details.
23
*
24
* You should have received a copy of the GNU General Public License along
25
* with this program; if not, see <http://www.gnu.org/licenses/>
26
*
27
* Additional note on redistribution: The copyright and license notices above
28
* must be maintained in each individual source file that is a derivative work
29
* of this source file; otherwise redistribution is prohibited.
30
*/
31
32
#ifndef PIOS_USB_BOARD_DATA_H
33
#define PIOS_USB_BOARD_DATA_H
34
35
#include "
pios_usb_defs.h
"
/* USB_* macros */
36
37
#define PIOS_USB_BOARD_CDC_DATA_LENGTH 64
38
#define PIOS_USB_BOARD_CDC_MGMT_LENGTH 32
39
#define PIOS_USB_BOARD_HID_DATA_LENGTH 64
40
41
#if defined(F1_UPGRADER) || defined(BOOTLOADER)
42
43
# define PIOS_USB_BOARD_VENDOR_ID DRONIN_VID_DRONIN_BOOTLOADER
44
# define PIOS_USB_BOARD_PRODUCT_ID DRONIN_PID_DRONIN_BOOTLOADER
45
46
/*
47
* The bootloader uses a simplified report structure
48
* BL: <REPORT_ID><DATA>...<DATA>
49
* FW: <REPORT_ID><LENGTH><DATA>...<DATA>
50
* This define changes the behaviour in pios_usb_hid.c
51
*/
52
# define PIOS_USB_BOARD_BL_HID_HAS_NO_LENGTH_BYTE
53
54
# define PIOS_USB_BOARD_EP_NUM 2
55
56
# if defined(BOOTLOADER)
57
# define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(0, USB_OP_BOARD_MODE_BL)
58
# define PIOS_USB_BOARD_SN_SUFFIX "+BL"
59
# elif defined (F1_UPGRADER)
60
# define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(0, USB_OP_BOARD_MODE_UP)
61
# define PIOS_USB_BOARD_SN_SUFFIX "+UP"
62
# endif
63
64
#else
/* Firmware (...or not bootloader or f1 upgrader) */
65
66
# define PIOS_USB_BOARD_VENDOR_ID DRONIN_VID_DRONIN_FIRMWARE
67
# define PIOS_USB_BOARD_PRODUCT_ID DRONIN_PID_DRONIN_FIRMWARE
68
69
# define PIOS_USB_BOARD_EP_NUM 4
70
# define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(0, USB_OP_BOARD_MODE_FW)
71
# define PIOS_USB_BOARD_SN_SUFFIX "+FW"
72
73
#endif
/* defined(F1_UPGRADER) || defined(BOOTLOADER) */
74
75
#endif
/* PIOS_USB_BOARD_DATA_H */
76
pios_usb_defs.h
flight
PiOS
inc
pios_usb_board_data.h
Generated by
1.8.6