Rev 207 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 207 | Rev 209 | ||
|---|---|---|---|
| Line 3... | Line 3... | ||
| 3 | 3 | ||
| 4 | /*----------------------------------------------- |
4 | /*----------------------------------------------- |
| 5 | * Includes |
5 | * Includes |
| 6 | * ---------------------------------------------*/ |
6 | * ---------------------------------------------*/ |
| 7 | #include <stdlib.h> |
7 | #include <stdlib.h> |
| - | 8 | #include <stdio.h> |
|
| 8 | #include <inttypes.h> |
9 | #include <inttypes.h> |
| 9 | 10 | ||
| 10 | /*----------------------------------------------- |
11 | /*----------------------------------------------- |
| 11 | * Defines |
12 | * Defines |
| 12 | * --------------------------------------------*/ |
13 | * --------------------------------------------*/ |
| - | 14 | ||
| - | 15 | /* |
|
| - | 16 | * If using both OC1A and OC1B set DOUBLE_PWM |
|
| - | 17 | * On NodeGeneric it's only possible to use OC1A |
|
| - | 18 | */ |
|
| - | 19 | #define DOUBLE_PWM 0 |
|
| 13 | 20 | ||
| 14 | /* |
21 | /* |
| 15 | * For width of the pulse that control the RC servo. |
22 | * For width of the pulse that control the RC servo. |
| 16 | * |
23 | * Clock pulses. |
| - | 24 | * This is adjusted for a 8 MHz clock, to use different speeds recalculate. |
|
| 17 | */ |
25 | */ |
| 18 | #define PWM_MAX_PULSE |
26 | #define PWM_MAX_PULSE 1000 |
| 19 | #define PWM_MIN_PULSE |
27 | #define PWM_MIN_PULSE 2000 |
| - | 28 | #define PWM_CENTER_PULSE ((PWM_MAX_PULSE - PWM_MIN_PULSE)/2 + PWM_MIN_PULSE) |
|
| - | 29 | #define STEP ((PWM_MAX_PULSE - PWM_MIN_PULSE)/256) |
|
| 20 | 30 | ||
| 21 | /*----------------------------------------------- |
31 | /*----------------------------------------------- |
| 22 | * Functions |
32 | * Functions |
| 23 | * ---------------------------------------------*/ |
33 | * ---------------------------------------------*/ |
| 24 | void rcServoInit(); |
34 | void rcServoInit(); |