The Code Repository for the REV0 Steering Wheel.
Dependencies: CANBuffer KS0108_fork mbed-rtos mbed CAN Addresses
Fork of REVO_Updated_Steering by
Diff: Steering.h
- Revision:
- 16:d2953809fb31
- Parent:
- 15:da14227cdd1d
- Child:
- 17:e97c889873e2
- Child:
- 30:f0095515f6cb
diff -r da14227cdd1d -r d2953809fb31 Steering.h --- a/Steering.h Sat Oct 18 17:19:43 2014 +0000 +++ b/Steering.h Sat Oct 18 18:26:44 2014 +0000 @@ -3,13 +3,13 @@ #include "mbed.h" #include "rtos.h" -#include "Digital_InOut.h" #include "KS0108.h" #include "Arial12.h" #include "Arial14.h" #include "Comic24.h" #include "vivaldi16.h" +#include "CANBuffer.h" #define SWITCH_ID 410 @@ -29,41 +29,40 @@ #define AMS_BATTERY_STATE 0x30E // AIRS 7 and 6 // Precharge 3 Serial pc(USBTX,USBRX); -CAN CAN_Steering(p9,p10); -Digital_InOut CAN_Silent(p3_26, 0, output); +CANBuffer CAN_Steering_Buffer(CAN1,MEDIUM); +LPCDigitalOut CAN_Silent(p3_26, 0); + +extern "C" void mbed_reset(); KS0108 display(p26, p21, p22, p23, p25, p24, p8, p7, p6, p5, p13, p14, p12, p11); Ticker call_ledstream; -Digital_InOut l1(p1_28,1,output);// SW2 -Digital_InOut l2(p1_26,1,output);// SW4 +LPCDigitalOut l1(p1_28,1);// SW2 +LPCDigitalOut l2(p1_26,1);// SW4 -Digital_InOut l3(p1_24,1,output);// SW6 -Digital_InOut l4(p0_24,1,output);// SW8 +LPCDigitalOut l3(p1_24,1);// SW6 +LPCDigitalOut l4(p0_24,1);// SW8 -Digital_InOut u1(p1_14,0,output);// SW9 -Digital_InOut u2(p1_9,0,output);// SW11 +LPCDigitalOut u1(p1_14,0);// SW9 +LPCDigitalOut u2(p1_9,0);// SW11 -Digital_InOut u3(p1_4,0,output);// SW13 -Digital_InOut u4(p1_0,0,output);// SW15 +LPCDigitalOut u3(p1_4,0);// SW13 +LPCDigitalOut u4(p1_0,0);// SW15 AnalogOut ledstream(p18); //SW1 - SW3 -Digital_InOut boSW1(p1_29,1,output); -Digital_InOut biSWBR(p1_27,pull_down,input); //BRight +LPCDigitalOut boSW1(p1_29,1); +LPCDigitalOut biSWBR(p1_27,1); //BRight -Digital_InOut boSW5(p1_25,1,output); -Digital_InOut biSWBL(p1_22,pull_down,input); //BLeft +LPCDigitalOut boSW5(p1_25,1); +LPCDigitalOut biSWBL(p1_22,1); //BLeft -//Digital_InOut boSW5(P1_25,1,output); -//Digital_InOut biSW7(P1_22,pull_down,input); +LPCDigitalOut boSW10(p1_10,1); +LPCDigitalOut biSWTR(p1_8,1); //TRight -Digital_InOut boSW10(p1_10,1,output); -Digital_InOut biSWTR(p1_8,pull_down,input); //TRight - -Digital_InOut boSW14(p1_1,1,output); -Digital_InOut biSWTL(p0_25,pull_down,input); //TLeft +LPCDigitalOut boSW14(p1_1,1); +LPCDigitalOut biSWTL(p0_25,1); //TLeft typedef union convert{ float FLOAT;