pierre Rousselin / Mbed 2 deprecated AX12

Dependencies:   mbed

Fork of AX12 by Chris Styles

Revision:
4:a7c95f3012db
Parent:
3:ced71d1b2558
--- a/AX12.h	Sun Apr 10 21:20:44 2011 +0000
+++ b/AX12.h	Wed Oct 18 11:58:25 2017 +0000
@@ -1,36 +1,3 @@
-/* mbed AX-12+ Servo Library
- *
- * Copyright (c) 2010, cstyles (http://mbed.org)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef MBED_AX12_H
-#define MBED_AX12_H
-
-#include "mbed.h"
-
-//#define AX12_WRITE_DEBUG 0
-//#define AX12_READ_DEBUG 0
-//#define AX12_TRIGGER_DEBUG 0
-//#define AX12_DEBUG 0
-
 #define AX12_REG_ID 0x3
 #define AX12_REG_BAUD 0x4
 #define AX12_REG_CW_LIMIT 0x06
@@ -48,26 +15,6 @@
 #define AX12_CW 1
 #define AX12_CCW 0
 
-/** Servo control class, based on a PwmOut
- *
- * Example:
- * @code
- * #include "mbed.h"
- * #include "AX12.h"
- * 
- * int main() {
- * 
- *   AX12 myax12 (p9, p10, 1);
- *
- *   while (1) {
- *       myax12.SetGoal(0);    // go to 0 degrees
- *       wait (2.0);
- *       myax12.SetGoal(300);  // go to 300 degrees
- *       wait (2.0);
- *   }
- * }
- * @endcode
- */
 class AX12 {
 
 public:
@@ -78,7 +25,7 @@
      * @param pin rx pin 
      * @param int ID, the Bus ID of the servo 1-255 
      */
-    AX12(PinName tx, PinName rx, int ID, int baud=1000000);
+    AX12(int tx, int rx, int ID, int baud=1000000);
 
     /** Set the mode of the servo
      * @param mode
@@ -179,12 +126,12 @@
     int write(int ID, int start, int length, char* data, int flag=0);
 
 private :
-
-    SerialHalfDuplex _ax12;
+ 
+   // SerialHalfDuplex _ax12;
     int _ID;
     int _baud;
+ 
+ 
+};
 
 
-};
-
-#endif