ikarashiMDCslaveの改良(?)版 スピード制御の分解能が2byte
Dependencies: mbed SoftPWM MotorSMLAP
MDC3_0pinConfig.h@18:a8e9a14dbcfa, 2019-09-03 (annotated)
- Committer:
- skouki
- Date:
- Tue Sep 03 04:31:55 2019 +0000
- Revision:
- 18:a8e9a14dbcfa
- Parent:
- 13:0cd5e8c91941
;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
WAT34 | 5:bcf70ca27a55 | 1 | #ifndef MDC3_0_PIN_CONFIG |
WAT34 | 5:bcf70ca27a55 | 2 | #define MDC3_0_PIN_CONFIG |
WAT34 | 2:de85eb142f32 | 3 | |
WAT34 | 4:2fb782334564 | 4 | namespace pinConfig |
WAT34 | 4:2fb782334564 | 5 | { |
WAT34 | 4:2fb782334564 | 6 | /* Serial for debug etc */ |
WAT34 | 4:2fb782334564 | 7 | static PinName const UART1_TX = PA_9; |
WAT34 | 4:2fb782334564 | 8 | static PinName const UART1_RX = PA_10; |
WAT34 | 2:de85eb142f32 | 9 | |
WAT34 | 4:2fb782334564 | 10 | /* Serial and DigitalOut for RS-485 interface */ |
WAT34 | 4:2fb782334564 | 11 | static PinName const RS485_TX = PB_10; |
WAT34 | 4:2fb782334564 | 12 | static PinName const RS485_RX = PB_11; |
WAT34 | 4:2fb782334564 | 13 | static PinName const RS485_CS = PA_8; |
WAT34 | 2:de85eb142f32 | 14 | |
WAT34 | 4:2fb782334564 | 15 | /* I2C */ |
WAT34 | 4:2fb782334564 | 16 | static PinName const I2C_SDA = PB_8; |
WAT34 | 4:2fb782334564 | 17 | static PinName const I2C_SCL = PB_9; |
WAT34 | 2:de85eb142f32 | 18 | |
WAT34 | 4:2fb782334564 | 19 | /* CAN */ |
WAT34 | 4:2fb782334564 | 20 | static PinName const CAN_TX = PA_12; |
WAT34 | 4:2fb782334564 | 21 | static PinName const CAN_RX = PA_11; |
WAT34 | 2:de85eb142f32 | 22 | |
WAT34 | 4:2fb782334564 | 23 | /* dip switch input */ |
WAT34 | 4:2fb782334564 | 24 | static PinName const DIP_0 = PB_4; |
WAT34 | 4:2fb782334564 | 25 | static PinName const DIP_1 = PB_5; |
WAT34 | 4:2fb782334564 | 26 | static PinName const DIP_2 = PB_6; |
WAT34 | 2:de85eb142f32 | 27 | |
WAT34 | 4:2fb782334564 | 28 | /* Buzer */ |
WAT34 | 4:2fb782334564 | 29 | static PinName const BUZER = PB_7; |
WAT34 | 4:2fb782334564 | 30 | |
WAT34 | 4:2fb782334564 | 31 | /* Indicator LEDs */ |
WAT34 | 13:0cd5e8c91941 | 32 | static PinName const LED_0 = PA_1; |
WAT34 | 13:0cd5e8c91941 | 33 | static PinName const LED_1 = PA_0; |
WAT34 | 4:2fb782334564 | 34 | static PinName const LED_2 = PA_15; |
WAT34 | 4:2fb782334564 | 35 | static PinName const LED_3 = PB_3; |
WAT34 | 2:de85eb142f32 | 36 | |
WAT34 | 4:2fb782334564 | 37 | /* Motor signal */ |
WAT34 | 4:2fb782334564 | 38 | /* ch0 */ |
WAT34 | 5:bcf70ca27a55 | 39 | static PinName const DIR_L_0 = PA_2; |
WAT34 | 5:bcf70ca27a55 | 40 | static PinName const DIR_H_0 = PA_3; |
WAT34 | 4:2fb782334564 | 41 | static PinName const PWM0 = PA_6; |
WAT34 | 4:2fb782334564 | 42 | /* ch1 */ |
WAT34 | 5:bcf70ca27a55 | 43 | static PinName const DIR_L_1 = PA_4; |
WAT34 | 5:bcf70ca27a55 | 44 | static PinName const DIR_H_1 = PA_5; |
WAT34 | 4:2fb782334564 | 45 | static PinName const PWM1 = PA_7; |
WAT34 | 4:2fb782334564 | 46 | /* ch2 */ |
WAT34 | 5:bcf70ca27a55 | 47 | static PinName const DIR_L_2 = PB_12; |
WAT34 | 5:bcf70ca27a55 | 48 | static PinName const DIR_H_2 = PB_13; |
WAT34 | 4:2fb782334564 | 49 | static PinName const PWM2 = PB_0; |
WAT34 | 4:2fb782334564 | 50 | /* ch3 */ |
WAT34 | 5:bcf70ca27a55 | 51 | static PinName const DIR_L_3 = PB_14; |
WAT34 | 5:bcf70ca27a55 | 52 | static PinName const DIR_H_3 = PB_15; |
WAT34 | 4:2fb782334564 | 53 | static PinName const PWM3 = PB_1; |
WAT34 | 4:2fb782334564 | 54 | }; |
WAT34 | 2:de85eb142f32 | 55 | #endif /* MDC3.0_PIN_CONFIG */ |