2018.07.26

Dependencies:   QEI mbed-rtos mbed

Revision:
0:b1136bf48c38
Child:
1:86705c6e0ab7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common.h	Tue Feb 16 16:35:29 2016 +0000
@@ -0,0 +1,72 @@
+/*
+ * mbed LPC824-Max header
+ *
+ */
+
+#define __DEBUG__
+#ifdef __DEBUG__
+#define DEBUG_PRINT(...)  pc.printf(__VA_ARGS__)
+#else
+#define DEBUG_PRINT(...)  ;
+//#define DEBUG_PRINT(...)  1 ? (void)0 : pc.printf(__VA_ARGS__)
+#endif
+/* Information */
+#define LatestUpDate "2015.12.21"
+#define ProgramRevision "RC2015.12.21" 
+#define Author "Sayzyas"
+#define Company "Revast Co.,Ltd"
+
+
+/* Debug macro */
+#define __DEBUG_L0__
+#define __DEBUG_L1__
+#define __DEBUG_L2__
+#define __DEBUG_L3__
+#define __DEBUG_L4__
+
+#ifdef __DEBUG_L0__
+    #define DEBUG_PRINT_L0(...)  pc.printf(__VA_ARGS__)
+#else
+    #define DEBUG_PRINT_L0(...) 
+#endif
+#ifdef __DEBUG_L1__
+    #define DEBUG_PRINT_L1(...)  pc.printf(__VA_ARGS__)
+#else
+    #define DEBUG_PRINT_L1(...) 
+#endif
+#ifdef __DEBUG_L2__
+    #define DEBUG_PRINT_L2(...)  pc.printf(__VA_ARGS__)
+#else
+    #define DEBUG_PRINT_L2(...) 
+#endif
+#ifdef __DEBUG_L3__
+    #define DEBUG_PRINT_L3(...)  pc.printf(__VA_ARGS__)
+#else
+    #define DEBUG_PRINT_L3(...) 
+#endif
+#ifdef __DEBUG_L4__
+    #define DEBUG_PRINT_L4(...)  pc.printf(__VA_ARGS__)
+#else
+    #define DEBUG_PRINT_L4(...) 
+#endif
+
+#define NumberOfI2CCommand 10
+
+#define ROTATE_PER_RESOLUTION       24
+#define REAL_THREAD_DIAMETER        63          // 60+3
+//#define ROTATION_DISTANCE           197.82f     // (60+3)*3.14
+#define ROTATION_PULSE_PER_1ROUND   16384       // 2^12(bit) * 4
+#define PAI                         3.1415
+
+/* ***************** */
+/* Target definition */
+/* ***************** */
+#define Target_IIC_ADDR 0x10 // For Resolver count controller 
+
+
+/* Command Packet */
+#define CLEAR_RESOLVER_POSITION       'X'
+#define HELLO_PACKET        'A'
+
+#define LED_ON  0
+#define LED_OFF 1
\ No newline at end of file