#define Key1 0x02 //P1.1, Key input 1, Used for model select
#define Key2 0x04 //P1.2, Key input 2, Used for model select
#define Key3 0x08 //P1.3, Key input 3, Used for model select
#define Key4 0x10 //P1.4, Key input 4, Used for model select
//Define for Sherman M4 56001
#define T56001_Throttle_Forward 0x01 //P4.0, Forward throttle of two 380 motors, PWM
#define T56001_Throttle_Forward_EN 0x01 //P2.0, Forward enable of two 380 motors
#define T56001_Throttle_Backward 0x02 //P4.1, Backward throttle of two 380 motors, PWM
#define T56001_Throttle_Backward_EN 0x02 //P2.1, Backward enable of two 380 motors
#define T56001_RUDD 0x40 //P4.6, Turning control of server, PWM
#define T56001_Turret_Left 0x10 //P4.4, Turret rotate left control, PWM
#define T56001_Turret_Left_EN 0x10 //P2.4, Turret rotate left enable
#define T56001_Turret_Right 0x20 //P4.5, Turret rotate right control, PWM
#define T56001_Turret_Right_EN 0x20 //P2.5, Turret rotate right enable
#define T56001_Gun_Up 0x40 //P1.6, Main gun raising control, PWM
#define T56001_Gun_Up_EN 0x40 //P2.6, Main gun rasing enable
#define T56001_Gun_Down 0x80 //P1.7, Main gun lowering control, PWM
#define T50001_Gun_Down_EN 0x80 //P2.7, Main gun lowering enable
#define T56001_Mashine_Gun 0x20 //P1.5, Msshine gun fire control, PWM
#define T56001_Main_Gun 0x10 //P3.4, Main gun fire control
#define T56001_Front_Light 0x20 //P3.5, Front light on/off control
#define T56001_Back_Light 0x30 //P3.6, Back light on/off control作者: bank 时间: 2008-7-9 22:29
//Define for Leopard 1A4 56002
#define T56002_Throttle_Forward 0x01 //P4.0, Forward throttle of 540 motor, PWM
#define T56002_Throttle_Forward_EN 0x01 //P2.0, Forward enable of 540 motor
#define T56002_Throttle_Backward 0x02 //P4.1, Backward throttle of 540 motor, PWM
#define T56002_Throttle_Backward_EN 0x02 //P2.1, Backward enable of 540 motor
#define T56002_RUDD 0x40 //P4.6, Turning control of server, PWM
#define T56002_Turret_Left 0x10 //P4.4, Turret rotate left control, PWM
#define T56002_Turret_Left_EN 0x10 //P2.4, Turret rotate left enable
#define T56002_Turret_Right 0x20 //P4.5, Turret rotate right control, PWM
#define T56002_Turret_Right_EN 0x20 //P2.5, Turret rotate right enable
#define T56002_Gun_Up 0x40 //P1.6, Main gun raising control, PWM
#define T56002_Gun_Up_EN 0x40 //P2.6, Main gun rasing enable
#define T56002_Gun_Down 0x80 //P1.7, Main gun lowering control, PWM
#define T50002_Gun_Down_EN 0x80 //P2.7, Main gun lowering enable
#define T56002_Mashine_Gun 0x20 //P1.5, Msshine gun fire control, PWM
#define T56002_Main_Gun 0x10 //P3.4, Main gun fire control
#define T56002_Front_Light 0x20 //P3.5, Front light on/off control
#define T56002_Back_Light 0x30 //P3.6, Back light on/off control
//Define for Gepard 56003
#define T56003_Throttle_Forward 0x01 //P4.0, Forward throttle of 540 motor, PWM
#define T56003_Throttle_Forward_EN 0x01 //P2.0, Forward enable of 540 motor
#define T56003_Throttle_Backward 0x02 //P4.1, Backward throttle of 540 motor, PWM
#define T56003_Throttle_Backward_EN 0x02 //P2.1, Backward enable of 540 motor
#define T56003_RUDD 0x40 //P4.6, Turning control of server, PWM
#define T56003_Turret_Left 0x10 //P4.4, Turret rotate left control, PWM
#define T56003_Turret_Left_EN 0x10 //P2.4, Turret rotate left enable
#define T56003_Turret_Right 0x20 //P4.5, Turret rotate right control, PWM
#define T56003_Turret_Right_EN 0x20 //P2.5, Turret rotate right enable
#define T56003_Gun_Up 0x40 //P1.6, Main gun raising control, PWM
#define T56003_Gun_Up_EN 0x40 //P2.6, Main gun rasing enable
#define T56003_Gun_Down 0x80 //P1.7, Main gun lowering control, PWM
#define T50003_Gun_Down_EN 0x80 //P2.7, Main gun lowering enable
#define T56003_Double_Mashine_Gun 0x20 //P1.5, Msshine gun fire control, PWM
#define T56003_Front_Light 0x20 //P3.5, Front light on/off control
#define T56003_Back_Light 0x30 //P3.6, Back light on/off control
//Define for King Tiger 56004
#define T56004_Throttle_Forward 0x01 //P4.0, Forward throttle of 540 motor, PWM
#define T56004_Throttle_Forward_EN 0x01 //P2.0, Forward enable of 540 motor
#define T56004_Throttle_Backward 0x02 //P4.1, Backward throttle of 540 motor, PWM
#define T56004_Throttle_Backward_EN 0x02 //P2.1, Backward enable of 540 motor
#define T56004_RUDD 0x40 //P4.6, Turning control of server, PWM
#define T56004_Turret_Left 0x10 //P4.4, Turret rotate left control, PWM
#define T56004_Turret_Left_EN 0x10 //P2.4, Turret rotate left enable
#define T56004_Turret_Right 0x20 //P4.5, Turret rotate right control, PWM
#define T56004_Turret_Right_EN 0x20 //P2.5, Turret rotate right enable
#define T56004_Gun_Up 0x40 //P1.6, Main gun raising control, PWM
#define T56004_Gun_Up_EN 0x40 //P2.6, Main gun rasing enable
#define T56004_Gun_Down 0x80 //P1.7, Main gun lowering control, PWM
#define T50004_Gun_Down_EN 0x80 //P2.7, Main gun lowering enable
#define T56004_Mashine_Gun 0x20 //P1.5, Msshine gun fire control, PWM
#define T56004_Main_Gun 0x10 //P3.4, Main gun fire control
#define T56004_Front_Light 0x20 //P3.5, Front light on/off control
#define T56004_Back_Light 0x30 //P3.6, Back light on/off control作者: bank 时间: 2008-7-9 22:31
//Define for Sherman 56005
#define T56005_Left_Forward 0x01 //P4.0, Forward throttle of left 380 motor, PWM
#define T56005_Left_Forward_EN 0x01 //P2.0, Forward enable of left 380 motor
#define T56005_Left_Backward 0x02 //P4.1, Backward throttle of left 380 motor, PWM
#define T56005_Left_Backward_EN 0x02 //P2.1, Backward enable of left 380 motor
#define T56005_Right_Forward 0x04 //P4.2, Forward throttle of right 380 motor, PWM
#define T56005_Right_Forward_EN 0x04 //P2.2, Forward enable of right 380 motor
#define T56005_Right_Backward 0x08 //P4.3, Backward throttle of right 380 motor, PWM
#define T56005_Right_Backward_EN 0x08 //P2.3, Backward enable of right 380 motor
#define T56005_Turret_Left 0x10 //P4.4, Turret rotate left control, PWM
#define T56005_Turret_Left_EN 0x10 //P2.4, Turret rotate left enable
#define T56005_Turret_Right 0x20 //P4.5, Turret rotate right control, PWM
#define T56005_Turret_Right_EN 0x20 //P2.5, Turret rotate right enable
#define T56005_Gun_Up 0x40 //P1.6, Main gun raising control, PWM
#define T56005_Gun_Up_EN 0x40 //P2.6, Main gun rasing enable
#define T56005_Gun_Down 0x80 //P1.7, Main gun lowering control, PWM
#define T50005_Gun_Down_EN 0x80 //P2.7, Main gun lowering enable
#define T56005_Mashine_Gun 0x20 //P1.5, Msshine gun fire control, PWM
#define T56005_Main_Gun 0x10 //P3.4, Main gun fire control
#define T56005_Front_Light 0x20 //P3.5, Front light on/off control
#define T56005_Back_Light 0x30 //P3.6, Back light on/off control
//Define for King Hauler 56301
#define T56301_Throttle_Forward 0x01 //P4.0, Forward throttle of 540 motor, PWM
#define T56301_Throttle_Forward_EN 0x01 //P2.0, Forward enable of 540 motor
#define T56301_Throttle_Backward 0x02 //P4.1, Backward throttle of 540 motor, PWM
#define T55301_Throttle_Backward_EN 0x02 //P2.1, Backward enable of 540 motor
#define T56301_RUDD 0x40 //P4.6, Turning control of server, PWM