blob: ed936067d377f0a3526952e1e9e62bea6a02eb2c [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
Parker Schuh44f86922017-01-03 23:59:50 -08007#include <asm/types.h> /* for videodev2.h */
8#include <linux/videodev2.h>
Austin Schuh60e77942022-05-16 17:48:24 -07009#include <sys/ioctl.h>
Parker Schuh44f86922017-01-03 23:59:50 -080010
11namespace camera {
12
13static inline int xioctl(int fd, int request, void *arg) {
14 int r;
15 do {
16 r = ioctl(fd, request, reinterpret_cast<uintptr_t>(arg));
17 } while (r == -1 && errno == EINTR);
18 return r;
19}
20
21} // namespace camera
22
23#endif