========================================================================== This directory contains the device entries for the RC Decoder. HARDWARE The RC Decoder input from the RC radio is on the lowest numbered pin on the connector (pin 2 or pin 10). THE INPUT PIN MUST NOT BE DRIVEN AT HIGHER THAN 3.3 VOLTS. The next pin (4 or 10) is driven high to indicate reception of valid RC data. This pin normally is tied to an LED through a 180 Ohm resistor. The remaining two pins on the connector are general purpose I/O pins. DEVICE NODES The device interfaces for the RC Decoder include the number or RC channels to expect, the output of the RC decoder as well as the direction and current value of the GPIO pins. .../nchan The number of RC channels in the received signal. A read-write value given as as single ASCII digit in the range of two to eight and terminated by a newline. Write this as echo 6 > rcchan .../rcdec This read-only node has the decoded RC signal as string of comma separated channel times given in nanoseconds and terminated by a newline. Normally a new reading is available every 20 milliseconds. There is no output if the input signal does not contain a valid RC frame. .../rcraw This read-only node is the raw output of the RC decoder. It may or may not contain a valid RC receive frame. A frame can start any time after a 3 millisecond period without any transitions. A new frame can start with either a transition from low to high or from high to low. The raw frame is printed as the initial value, that is a 1 or a 0, followed by a comma separated list of times for each of the high and low pulses in the frame. Times are in hundreds of nanoseconds. That is a value of 10455 represents an interval of 1045500 nanoseconds or 1.04 milliseconds. .../gpiodir The direction of the two GPIO pins as a single numeric digit followed by a newline. A value of 0 make both lines an input and a value of 3 makes both lines an output. A value of 2 make the lower numbered GPIO pin (pin 6 or pin 14) an output and a value of 1 makes the higher numbers pin (8 or 16) an output. .../gpioval The value on the GPIO pins. Write to this device node to set an output and read from it to get the current value on the pins. A read requires a round trip over the USB-serial link and may take a few milliseconds. In time critical applications you may want to use select() to wait for the data. The LSB of the return value is the value on the highest numbered pin (pin 8 or pin 16).