File: dfu_util.h

package info (click to toggle)
libdfu-ahp 1.0~git20221215.dd2df39-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 236 kB
  • sloc: ansic: 2,488; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef DFU_UTIL_H
#define DFU_UTIL_H

/* USB string descriptor should contain max 126 UTF-16 characters
 * but 254 would even accommodate a UTF-8 encoding + NUL terminator */
#define MAX_DESC_STR_LEN 254

typedef struct dfu_if_t dfu_if;
typedef struct libusb_context libusb_context;

enum mode {
	MODE_NONE,
	MODE_VERSION,
	MODE_LIST,
	MODE_DETACH,
	MODE_UPLOAD,
	MODE_DOWNLOAD
};

void probe_devices(libusb_context *);
void disconnect_devices(void);
void print_dfu_if(dfu_if *);
void list_dfu_interfaces(void);

#endif /* DFU_UTIL_H */