Firmware
Macros | Typedefs
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"

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.
 
#define RC_INPUT_LOWEST_MIN_US   500
 Minimum value.
 
#define RC_INPUT_HIGHEST_MAX_US   2500
 Maximum value.
 
#define RC_INPUT_MAX_DEADZONE_US   500
 Maximum deadzone value.
 
#define _RC_INPUT_BASE   0x2b00
 
#define RC_INPUT_ENABLE_RSSI_ANALOG   _IOC(_RC_INPUT_BASE, 1)
 Enable RSSI input via ADC.
 
#define RC_INPUT_ENABLE_RSSI_PWM   _IOC(_RC_INPUT_BASE, 2)
 Enable RSSI input via PWM signal.
 

Typedefs

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

Detailed Description

R/C input interface.

Macro Definition Documentation

§ 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.