Library decoding Futaba SBUS data and control SBUS Servos. Hint! The TTL signal from the Futaba SBUS receiver / the TTL signal to the SBUS servos must be inverted. Use some 3.3V compatibel TTL logic chip such as 74LVT04 etc.

Revision:
1:e3c92fba87f2
Parent:
0:6618cf21c95c
--- a/FutabaSBUS.h	Wed Dec 14 20:46:10 2011 +0000
+++ b/FutabaSBUS.h	Thu Feb 09 21:50:00 2012 +0000
@@ -59,13 +59,52 @@
 
 class FutabaSBUS {
 public:
+    /** create a FutabaSBUS object connected to the specified serial pins
+    *
+    * &param pin serial tx,rx to connect to
+    */
     FutabaSBUS(PinName tx, PinName rx);
+    
+    /** Read channel(1..16), digital raw data
+    *
+    * &param raw data from receiver range from 0 to 4096, normal from 352 1696
+    */
     int16_t channel(uint8_t ch);
+    
+    /** Read digital channel(1..2), range 0..1
+    *
+    * &param range 0..1
+    */
     uint8_t digichannel(uint8_t ch);
+
+    /** Set servo position, raw data, range 200..2000?
+    *
+    * &param raw data 0..2048
+    */
     void servo(uint8_t ch, int16_t position);
+
+    /** Set digital channel, 0..1
+    *
+    * &param range 0..1
+    */
     void digiservo(uint8_t ch, uint8_t position);
+
+    /** Read failsafe condition
+    *
+    * &param 0=no failsafe 1=lost signal 3=failsafe
+    */
     uint8_t failsafe(void);
+
+    /** Set logical data passtrough - servo values are ignored, using received data
+    *
+    * &param bool
+    */
     void passthrough(bool mode);
+
+    /** Read logical data passtrough
+    *
+    * &param bool
+    */
     bool passthrough(void);
 
 private: