Publishing 2019 R3 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / movidius / XLink / pc / usb_boot.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 extern int usb_loglevel;
10
11 #define AUTO_VID                    0
12 #define AUTO_PID                    0
13 #define AUTO_UNBOOTED_PID           -1
14
15 #define DEFAULT_OPENVID             0x03E7
16 #define DEFAULT_OPENPID             0xf63b      // Once opened in VSC mode, VID/PID change
17
18 #define DEFAULT_UNBOOTVID           0x03E7
19 #define DEFAULT_UNBOOTPID_2485      0x2485
20 #define DEFAULT_UNBOOTPID_2150      0x2150
21 #define DEFAULT_CHUNKSZ             1024*1024
22
23
24 typedef enum usbBootError {
25     USB_BOOT_SUCCESS = 0,
26     USB_BOOT_ERROR,
27     USB_BOOT_DEVICE_NOT_FOUND,
28     USB_BOOT_TIMEOUT
29 } usbBootError_t;
30
31 #if (!defined(_WIN32) && !defined(_WIN64))
32 usbBootError_t usb_find_device_with_bcd(unsigned idx, char *input_addr,
33                                         unsigned addrsize, void **device, int vid, int pid,unsigned short* bcdusb);
34 #else
35 usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize,
36    void **device, int vid, int pid);
37 #endif
38 int usb_boot(const char *addr, const void *mvcmd, unsigned size);
39 int get_pid_by_name(const char* name);
40
41
42 #ifdef __cplusplus
43 }
44 #endif