Library for XBus servo (under construction)

Dependents:   mbed_XBus_Test mbed_XBus_MotionTest XBusServoTest ControlYokutan2017_2 ... more

It's pre-opened page. it's still a little bit unstable to use command packet but mostly work. Tested only on KL25Z

暫定版ページです。 まだコマンドパケット使用時に時々不安定になりますが、概ね動作しています。 KL25Z上でのみ、動作確認しています

Revision:
5:7246a46379f7
Parent:
4:d88f498d259b
Child:
6:62bf0f21b8d6
--- a/XBusServo.h	Wed Oct 08 03:47:41 2014 +0000
+++ b/XBusServo.h	Wed Oct 08 05:36:29 2014 +0000
@@ -6,23 +6,24 @@
  *  @note   Copyright (c) 2014-2014 JR PROPO
  *  @note   Released under the MIT License: http://mbed.org/license/mit
  */
+ 
 #ifndef XBusServo_h
 #define XBusServo_h
 
 #include "mbed.h"
 
-// standard interval time for XBus servo
+/// standard interval time for XBus servo
 #define kXBusStandardInterval       14              // mSec
 
-// angle data for XBus servo
+/// angle data for XBus servo
 #define kXbusServoMinimum           0x1249          // 900uSec      -60 or -90 degree
 #define kXbusServoNeutral           0x7FFF          // 1500uSec     0 degree
 #define kXbusServoMaximum           0xEDB6          // 2100uSec     60 or 90 degree
 
-// maximum number of XBus servo
+/// maximum number of XBus servo
 #define kXBusMaxServoNum            50
 
-// XBus Get/Set/Status command order
+/// XBus Get/Set/Status command order
 typedef enum {
     kXBusOrder_1_Mode =             0x01,
     kXBusOrder_1_ID =               0x03,
@@ -55,7 +56,7 @@
 } XBusOrder;
 
 
-// XBus parameter index
+/// XBus parameter index
 typedef enum {
     kParamIdx_Unused0 =             0x0000,
     kParamIdx_AllData_wID =         0x0001,
@@ -82,7 +83,7 @@
 } XBusParamIdx;
 
 
-// XBus error code
+/// XBus error code
 typedef enum {
     kXBusError_NoError =            0x0000,
     kXBusError_CRCError,
@@ -98,11 +99,14 @@
 } XBusError;
 
 
-
+/** XBusServo
+    @bref               Library class for XBus servo
+    @note               2014/09/02 : move from Arduino lib by Sawa
+*/
 class XBusServo // : private RawSerial
 {
 public:
-/** XBusServo::XBusServo
+    /** XBusServo::XBusServo
     @param tx           pin name for tx
     @param rx           pin name for rx
     @param maxServoNum  max number of servo that you want to connect.
@@ -113,7 +117,7 @@
     @bref               Constructor
 
     @note               2014/09/02 : move from Arduino lib by Sawa
-*/
+    */
     XBusServo(PinName tx, PinName rx, uint8_t maxServoNum);
 
 public: