blob: 58e5161ad222f93161c768042bf62bce5aa51376 [file] [log] [blame]
Parker Schuh44f86922017-01-03 23:59:50 -08001#ifndef AOS_LINUX_CODE_CAMREA_V4L2_H_
2#define AOS_LINUX_CODE_CAMREA_V4L2_H_
3
4// This file handles including everything needed to use V4L2 and has some
5// utility functions.
6
7#include <sys/ioctl.h>
8
9#include <asm/types.h> /* for videodev2.h */
10#include <linux/videodev2.h>
11
12namespace camera {
13
14static inline int xioctl(int fd, int request, void *arg) {
15 int r;
16 do {
17 r = ioctl(fd, request, reinterpret_cast<uintptr_t>(arg));
18 } while (r == -1 && errno == EINTR);
19 return r;
20}
21
22} // namespace camera
23
24#endif