Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1455 | acid | 1 | |
1459 | acid | 2 | |
1477 | acid | 3 | #define VERSION "0.45" |
4 | #define DEBUG_SIGNAL 0 |
||
1459 | acid | 5 | |
1475 | acid | 6 | extern volatile uint8_t pwm_position[6]; |
7 | extern volatile uint8_t pwm_neutral_position[6]; |
||
8 | extern volatile uint16_t pwm_limit[6]; |
||
9 | #if DEBUG_SIGNAL |
||
10 | extern volatile uint8_t display_values; |
||
11 | #endif |
||
1455 | acid | 12 | |
13 | void set_pwm(); |
||
14 | void set_pwm_neutral(); |
||
1477 | acid | 15 | void set_pwm_active(); |
1455 | acid | 16 | |
1461 | acid | 17 | |
1459 | acid | 18 | void eeprom_init(); |
19 | void eeprom_write(); |
||
20 | |||
1464 | acid | 21 | #define I2C_ADDRESS 0x82 |
1459 | acid | 22 | |
23 | #define SERVODDR DDRB |
||
24 | #define SERVOPORT PORTB |
||
25 | #define SERVO1 PB0 |
||
26 | #define SERVO2 PB1 |
||
27 | #define SERVO3 PB2 |
||
28 | #define SERVO4 PB3 |
||
29 | #define SERVO5 PB4 |
||
30 | #define SERVO6 PB5 |
||
31 | |||
1475 | acid | 32 | |
1462 | acid | 33 | //#define STK500 |
34 | |||
35 | #ifdef STK500 |
||
1475 | acid | 36 | #define LED_OFF PORTD |= (1<<PD7); |
37 | #define LED_ON PORTD &= ~(1<<PD7) |
||
38 | #define LED_IS_ON !(PORTD & (1<<PD7)) |
||
1462 | acid | 39 | #else |
1475 | acid | 40 | #define LED_ON PORTD |= (1<<PD7); |
41 | #define LED_OFF PORTD &= ~(1<<PD7) |
||
42 | #define LED_IS_ON (PORTD & (1<<PD7)) |
||
1462 | acid | 43 | #endif |