PX4 Firmware
PX4 Autopilot Software http://px4.io
cdev_platform.hpp
Go to the documentation of this file.
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 
14  void *op;
15 };
16 
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);
Definition: I2C.hpp:51
__EXPORT int unregister_driver(const char *path)
__EXPORT int register_driver(const char *name, const cdev::px4_file_operations_t *fops, cdev::mode_t mode, void *data)
uint8_t * data
Definition: dataman.cpp:149
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
Definition: integration.cpp:8
Definition: CDev.cpp:47
const char * name
Definition: tests_main.c:58
struct file file_t
uint32_t mode_t
file_t(int f, void *c)
mode
Definition: vtol_type.h:76