Rev 2052 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1612 | dongfang | 1 | #ifndef _OUTPUT_H |
2 | #define _OUTPUT_H |
||
3 | |||
4 | #include <avr/io.h> |
||
2189 | - | 5 | #include "configuration.h" |
1612 | dongfang | 6 | |
1805 | - | 7 | #define OUTPUT_HIGH(num) {PORTC |= (4 << (num));} |
8 | #define OUTPUT_LOW(num) {PORTC &= ~(4 << (num));} |
||
1775 | - | 9 | #define OUTPUT_TOGGLE(num) ( {PORTC ^= (4 << (num));} |
1612 | dongfang | 10 | |
2189 | - | 11 | // Control terms (multicopter) |
12 | // TODO: Multicopter stuff separate? |
||
13 | extern int16_t throttleTerm; |
||
14 | extern int32_t yawTerm, term[2]; |
||
1869 | - | 15 | |
2189 | - | 16 | // I2C and PWM motor and servo outputs. |
17 | // extern int16_t outputs[NUM_OUTPUTS]; |
||
1612 | dongfang | 18 | |
1964 | - | 19 | |
1854 | - | 20 | /* |
21 | * Set to 0 for using outputs as the usual flashing lights. |
||
22 | * Set to one of the DEBUG_... defines h for using the outputs as debug lights. |
||
23 | */ |
||
1960 | - | 24 | #define DIGITAL_DEBUG_MASK 0 |
1854 | - | 25 | |
1612 | dongfang | 26 | void output_init(void); |
2189 | - | 27 | void output_setLED(uint8_t num, uint8_t state); |
1612 | dongfang | 28 | void output_update(void); |
2189 | - | 29 | void output_applyMulticopterMixer(void); |
30 | void output_setParameters(void); |
||
1612 | dongfang | 31 | |
32 | #endif //_output_H |