copia12092018

Dependencies:   mbed

io_definitions.h

Committer:
viaromassimo
Date:
2018-06-29
Revision:
5:72bdc69d610d
Parent:
4:1643fea75703
Child:
6:3263fc9d7423

File content as of revision 5:72bdc69d610d:

//#Serial pc(SERIAL_TX, SERIAL_RX);
#if defined(logActive)
    Serial pc(D1, D0, 115200);
#endif

InterruptIn WheelSensorPin(D5);  //pin at which the wheel sensor is attached
InterruptIn MotorSensorPin(D4);  //pin connected to motor sensor pin
DigitalIn OnOffPin(D12);  //pin connected to on/off switch
PwmOut MotorPwmPin(PA_1);  //pin connected to motor - this must be a digital PWM pin
DigitalIn PlusPercentPin(D3);  //pin connected to +XX% switch
DigitalIn MinusPercentPin(D6);  //pin connected to -XX% switch

DigitalOut SDmotorInB(PA_7);                   // sd motor half bridge direction selector
DigitalOut SDmotorInA(PA_2);                   // SD motor half bridge direction selector
DigitalIn enDiag_A(PA_4);                       // SD motor fault condition input A
DigitalIn enDiag_B(PA_3);                       // SD motor fault condition input A
AnalogIn SDcurrent(PA_0);                       // SD power current feedback
DigitalOut led(LED1);
#if defined(canbusActive)
    CAN can1(D10,D2,100000);           // CAN BUS channel for communication with other slave and master consolle
#endif
CANMessage txMsg;
CANMessage rxMsg;