Firmware
src
lib
cdev
posix
cdev_platform.hpp
1
2
#pragma once
3
4
#include <inttypes.h>
5
#include <string.h>
6
7
#define ATOMIC_ENTER lock()
8
#define ATOMIC_LEAVE unlock()
9
10
namespace
cdev
11
{
12
13
struct
file_operations
{
14
void
*op;
15
};
16
17
using
px4_file_operations_t
=
struct
file_operations
;
18
using
mode_t = uint32_t;
19
20
struct
file_t
{
21
int
f_oflags{0};
22
void
*f_priv{
nullptr
};
23
void
*vdev{
nullptr
};
24
25
file_t
() =
default
;
26
file_t
(
int
f,
void
*c) : f_oflags(f), vdev(c) {}
27
};
28
29
}
// namespace cdev
30
31
extern
"C"
__EXPORT
int
register_driver(
const
char
*name,
const
cdev::px4_file_operations_t
*fops,
32
cdev::mode_t mode,
void
*data);
33
extern
"C"
__EXPORT
int
unregister_driver(
const
char
*path);
__EXPORT
Definition:
I2C.hpp:51
cdev
Definition:
CDev.cpp:47
cdev::file_t
Definition:
cdev_platform.hpp:20
cdev::file_operations
Definition:
cdev_platform.hpp:13
Generated by
1.8.12