blob: d02229aade5a30043bd99429f32cc01b953fbb49 [file] [log] [blame]
John Park398c74a2018-10-20 21:17:39 -07001#ifndef AOS_CAMREA_V4L2_H_
2#define AOS_CAMREA_V4L2_H_
Parker Schuh44f86922017-01-03 23:59:50 -08003
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