PX4 Firmware
PX4 Autopilot Software http://px4.io
gpio.h
Go to the documentation of this file.
1
/**
2
* @file relay.h
3
*
4
* Interface with cameras via FMU auxiliary pins.
5
*
6
*/
7
#pragma once
8
9
#ifdef __PX4_NUTTX
10
11
#include <board_config.h>
12
13
#include "
camera_interface.h
"
14
15
class
CameraInterfaceGPIO :
public
CameraInterface
16
{
17
public
:
18
CameraInterfaceGPIO();
19
virtual
~CameraInterfaceGPIO() =
default
;
20
21
void
trigger
(
bool
trigger_on_true);
22
23
void
info
();
24
#if defined(GPIO_GPIO5_OUTPUT)
25
static
const
int
ngpios = 6;
26
#else
27
static
const
int
ngpios = 5;
28
#endif
29
30
private
:
31
32
void
setup
();
33
34
param_t
_p_polarity;
35
36
bool
_trigger_invert;
37
38
static
constexpr uint32_t _gpios[ngpios] = {
39
GPIO_GPIO0_OUTPUT,
40
GPIO_GPIO1_OUTPUT,
41
GPIO_GPIO2_OUTPUT,
42
GPIO_GPIO3_OUTPUT,
43
GPIO_GPIO4_OUTPUT,
44
#if defined(GPIO_GPIO5_OUTPUT)
45
GPIO_GPIO5_OUTPUT
46
#endif
47
};
48
49
uint32_t _triggers[
arraySize
(_gpios)];
50
};
51
52
#endif
/* ifdef __PX4_NUTTX */
camera_interface.h
CameraInterface
Definition:
camera_interface.h:12
CameraInterface::info
virtual void info()
Display info.
Definition:
camera_interface.h:47
CameraInterface::trigger
virtual void trigger(bool trigger_on_true)
trigger the camera
Definition:
camera_interface.h:30
arraySize
#define arraySize(a)
Definition:
camera_interface.h:10
CameraInterface::setup
virtual void setup()
setup the interface
Definition:
camera_interface.h:68
param_t
uint32_t param_t
Parameter handle.
Definition:
param.h:98
src
drivers
camera_trigger
interfaces
src
gpio.h
Generated by
1.8.13