blob: e018beaf68cbd6d728de84fc4531e33bd33c49f2 [file] [log] [blame]
Brian Silverman14fd0fb2014-01-14 21:42:01 -08001#ifndef AOS_LINUX_CODE_CAMREA_V4L2_H_
2#define AOS_LINUX_CODE_CAMREA_V4L2_H_
brians343bc112013-02-10 01:53:46 +00003
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 aos {
13namespace camera {
14
15static inline int xioctl(int fd, int request, void *arg) {
16 int r;
17 do {
18 r = ioctl(fd, request, reinterpret_cast<uintptr_t>(arg));
19 } while (r == -1 && errno == EINTR);
20 return r;
21}
22
23} // namespace camera
24} // namespace aos
25
26#endif
27