2018.07.26

Dependencies:   TextLCD USBDevice mbed-rtos mbed

common.h

Committer:
sayzyas
Date:
2016-03-28
Revision:
1:368ba89c2e6b
Parent:
0:f4e2a62331ef
Child:
2:d0a5ee4e7bb8

File content as of revision 1:368ba89c2e6b:


/* Information */
#define LatestUpDate    "2016.02.17"
#define ProgramRevision "Rev. 0.95" 
#define Author          "Y.Saito"
#define Company         "Revast Co.,Ltd."
#define Targetmbed      "mbed LPC1768"

/* 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

/* ***************** */
/* Target definition */
/* ***************** */
#define i2c_addr_handy          (0x50);    // Handy Controller
#define i2c_addr_winch          (0x40);    // Ctrl Board1 : Winch
#define i2c_addr_tfansform      (0x30);    // Ctrl Board2 : Transform
#define i2c_addr_crawler        (0x20);    // Ctrl Board3 : Crawler

#define Target_IIC_ADDR     i2c_addr_handy // For Winch motor controller 
//#define Target_IIC_ADDR   i2c_addr_tfansform // For Transform controller 
//#define Target_IIC_ADDR   i2c_addr_crawler // For Crawler motor controller 

#define NumberOfI2CCommand 10

#define DEAD_ZONE_BAND_WIDTH 5
#define CALIBRATION_COUNT 300

#define MOTOR_FWD_ROTATION 0
#define MOTOR_RVS_ROTATION 1