11 #define MODUL_PORT PORTD |
11 #define MODUL_PORT PORTD |
12 #define MODUL_ST4 PD5 |
12 #define MODUL_ST4 PD5 |
13 #define MODUL_ST6 PD6 |
13 #define MODUL_ST6 PD6 |
14 |
14 |
15 #define I2C_PORT PORTC |
15 #define I2C_PORT PORTC |
16 #define I2C_SDA PC0 |
16 #define I2C_SCL PC0 |
17 #define I2C_SCL PC1 |
17 #define I2C_SDA PC1 |
18 |
18 |
19 #define LED1_PORT PORTA |
19 #define LED1_PORT PORTA |
20 #define LED2_PORT PORTA |
20 #define LED2_PORT PORTA |
21 #define LED3_PORT PORTC |
21 #define LED3_PORT PORTC |
22 #define LED4_PORT PORTC |
22 #define LED4_PORT PORTC |
43 #define RAIL_DETECT PA7 // low = short circuit detection |
43 #define RAIL_DETECT PA7 // low = short circuit detection |
44 |
44 |
45 #define CONTROLLER_PORT PORTB |
45 #define CONTROLLER_PORT PORTB |
46 #define CONTROLLER_MAX 360 // full throttle ADC value |
46 #define CONTROLLER_MAX 360 // full throttle ADC value |
47 #define CONTROLLER_DIVISOR (uint8_t)(CONTROLLER_MAX/15) |
47 #define CONTROLLER_DIVISOR (uint8_t)(CONTROLLER_MAX/15) |
48 #define CONTROLLER1_SW 4 |
48 #define CONTROLLER1_SW PB4 |
49 #define CONTROLLER2_SW 5 |
49 #define CONTROLLER2_SW PB5 |
50 #define CONTROLLER3_SW 6 |
50 #define CONTROLLER3_SW PB6 |
51 #define CONTROLLER4_SW 7 |
51 #define CONTROLLER4_SW PB7 |
52 #define CONTROLLER1_SPEED 0 // ADC channel # |
52 #define CONTROLLER1_SPEED 0 // ADC channel # |
53 #define CONTROLLER2_SPEED 1 // ADC channel # |
53 #define CONTROLLER2_SPEED 1 // ADC channel # |
54 #define CONTROLLER3_SPEED 2 // ADC channel # |
54 #define CONTROLLER3_SPEED 2 // ADC channel # |
55 #define CONTROLLER4_SPEED 3 // ADC channel # |
55 #define CONTROLLER4_SPEED 3 // ADC channel # |
56 |
56 |