Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1963 → Rev 1964

/branches/dongfang_FC_rewrite/output.h
20,7 → 20,6
 
#define OUTPUT_HIGH(num) {PORTC |= (4 << (num));}
#define OUTPUT_LOW(num) {PORTC &= ~(4 << (num));}
#define OUTPUT_SET(num, state) {if (DIGITAL_DEBUG_INVERT){if(state) OUTPUT_LOW(num) else OUTPUT_HIGH(num)} else {if(state) OUTPUT_HIGH(num) else OUTPUT_LOW(num)}}
#define OUTPUT_TOGGLE(num) ( {PORTC ^= (4 << (num));}
 
/*
58,14 → 57,21
#define DEBUG_LEDTEST_1 1003
 
#define DEBUG_MAINLOOP_TIMER 1
#define DEBUG_HEIGHT_DIFF 2
#define DEBUG_HOVERTHROTTLE 4
#define DEBUG_ACC0THORDER 8
#define DEBUG_COMMANDREPEATED 16
#define DEBUG_HEIGHT_DIFF 2
#define DEBUG_HOVERTHROTTLE 4
#define DEBUG_ACC0THORDER 8
#define DEBUG_SIGNAL 16
#define DEBUG_PRESSURERANGE 32
#define DEBUG_CLIP 64
#define DEBUG_SENSORLIMIT 128
#define DEBUG_CLIP 64
#define DEBUG_SENSORLIMIT 128
 
#define OUTPUTOPTIONS_INVERT_0 1
#define OUTPUTOPTIONS_INVERT_1 2
#define OUTPUTOPTIONS_FLASH_AT_BEEP 4
#define OUTPUTOPTIONS_USE_ONBOARD_LEDS 8
#define OUTPUTOPTIONS_TEST_LO 64
#define OUTPUTOPTIONS_TEST_HI 128
 
/*
* Set to 0 for using outputs as the usual flashing lights.
* Set to one of the DEBUG_... defines h for using the outputs as debug lights.
73,6 → 79,7
#define DIGITAL_DEBUG_MASK 0
 
void output_init(void);
void outputSet(uint8_t num, uint8_t state);
void output_update(void);
void beep(uint16_t millis);
void beepNumber(uint8_t numbeeps);