PX4 Firmware
PX4 Autopilot Software http://px4.io
drv_rc_input.h File Reference

R/C input interface. More...

#include <stdint.h>
#include <sys/ioctl.h>
#include <uORB/topics/input_rc.h>
#include "drv_orb_dev.h"
Include dependency graph for drv_rc_input.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RC_INPUT0_DEVICE_PATH   "/dev/input_rc0"
 Path for the default R/C input device. More...
 
#define RC_INPUT_RSSI_MAX   100
 Maximum RSSI value. More...
 
#define _RC_INPUT_BASE   0x2b00
 
#define RC_INPUT_ENABLE_RSSI_ANALOG   _IOC(_RC_INPUT_BASE, 1)
 Enable RSSI input via ADC. More...
 
#define RC_INPUT_ENABLE_RSSI_PWM   _IOC(_RC_INPUT_BASE, 2)
 Enable RSSI input via PWM signal. More...
 

Typedefs

typedef uint16_t rc_input_t
 Input signal type, value is a control position from zero to 100 percent. More...
 

Detailed Description

R/C input interface.

Definition in file drv_rc_input.h.

Macro Definition Documentation

◆ _RC_INPUT_BASE

#define _RC_INPUT_BASE   0x2b00

Definition at line 72 of file drv_rc_input.h.

◆ RC_INPUT0_DEVICE_PATH

#define RC_INPUT0_DEVICE_PATH   "/dev/input_rc0"

Path for the default R/C input device.

Note that on systems with more than one R/C input path (e.g. PX4FMU with PX4IO connected) there may be other devices that respond to this protocol.

Input data may be obtained by subscribing to the input_rc object, or by poll/reading from the device.

Definition at line 59 of file drv_rc_input.h.

◆ RC_INPUT_ENABLE_RSSI_ANALOG

#define RC_INPUT_ENABLE_RSSI_ANALOG   _IOC(_RC_INPUT_BASE, 1)

Enable RSSI input via ADC.

Definition at line 75 of file drv_rc_input.h.

Referenced by PX4IO::ioctl(), and px4io_main().

◆ RC_INPUT_ENABLE_RSSI_PWM

#define RC_INPUT_ENABLE_RSSI_PWM   _IOC(_RC_INPUT_BASE, 2)

Enable RSSI input via PWM signal.

Definition at line 78 of file drv_rc_input.h.

Referenced by PX4IO::ioctl(), and px4io_main().

◆ RC_INPUT_RSSI_MAX

Typedef Documentation

◆ rc_input_t

typedef uint16_t rc_input_t

Input signal type, value is a control position from zero to 100 percent.

Definition at line 70 of file drv_rc_input.h.