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
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
unregister_driver
__EXPORT int unregister_driver(const char *path)
Definition:
cdev_platform.cpp:127
register_driver
__EXPORT int register_driver(const char *name, const cdev::px4_file_operations_t *fops, cdev::mode_t mode, void *data)
Definition:
cdev_platform.cpp:100
data
uint8_t * data
Definition:
dataman.cpp:149
f
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
Definition:
integration.cpp:8
cdev
Definition:
CDev.cpp:47
name
const char * name
Definition:
tests_main.c:58
cdev::file_t
Definition:
cdev_platform.hpp:20
cdev::file_operations
Definition:
cdev_platform.hpp:13
cdev::file_t
struct file file_t
Definition:
cdev_platform.hpp:17
cdev::mode_t
uint32_t mode_t
Definition:
cdev_platform.hpp:18
cdev::file_operations::op
void * op
Definition:
cdev_platform.hpp:14
cdev::file_t::file_t
file_t(int f, void *c)
Definition:
cdev_platform.hpp:26
mode
mode
Definition:
vtol_type.h:76
src
lib
cdev
posix
cdev_platform.hpp
Generated by
1.8.13