WPILibC++
unspecified
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
UsbUtil.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) 2016-2017 FIRST. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in the root directory of */
5
/* the project. */
6
/*----------------------------------------------------------------------------*/
7
8
#ifndef CSCORE_USBUTIL_H_
9
#define CSCORE_USBUTIL_H_
10
11
#include <stdint.h>
12
13
#include <llvm/SmallVector.h>
14
#include <llvm/StringRef.h>
15
16
namespace
cs
{
17
18
#ifdef __linux__
19
20
llvm::StringRef
GetUsbNameFromId(
int
vendor,
int
product,
21
llvm::SmallVectorImpl<char>
& buf);
22
23
int
CheckedIoctl(
int
fd,
unsigned
long
req,
void
* data,
// NOLINT(runtime/int)
24
const
char
* name,
const
char
* file,
int
line,
bool
quiet);
25
26
#define DoIoctl(fd, req, data) \
27
CheckedIoctl(fd, req, data, #req, __FILE__, __LINE__, false)
28
#define TryIoctl(fd, req, data) \
29
CheckedIoctl(fd, req, data, #req, __FILE__, __LINE__, true)
30
31
#endif // __linux__
32
33
}
// namespace cs
34
35
#endif // CSCORE_USBUTIL_H_
cs
Definition:
SinkImpl.h:19
llvm::SmallVectorImpl< char >
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:42
build
cppSource
cscore-cpp
sources
UsbUtil.h
Generated on Sat Oct 28 2017 21:17:16 for WPILibC++ by
1.8.11