/* * Authors (alphabetical order) * - Andre Bernet * - Andreas Weitl * - Bertrand Songis * - Bryan J. Rentoul (Gruvin) * - Cameron Weeks * - Erez Raviv * - Gabriel Birkus * - Jean-Pierre Parisy * - Karl Szmutny * - Michael Blandford * - Michal Hlavinka * - Pat Mackenzie * - Philip Moss * - Rob Thomson * - Romolo Manfredini * - Thomas Husterer * * opentx is based on code named * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, * er9x by Erez Raviv: http://code.google.com/p/er9x/, * and the original (and ongoing) project by * Thomas Husterer, th9x: http://code.google.com/p/th9x/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifndef board_stock_h #define board_stock_h #include "../common_avr/board_avr.h" // // elev thr // LV RV // 2 ^ 4 ^ // 1 2 // | rudd | aile // <----X--3-> LH <----X--0-> RH // 6 | 7 1 | 0 // | | // 3 v 5 v // //PORTA 7 6 5 4 3 2 1 0 // O O O O O O O O // ------------------------ LCD_DAT ----------------------- // //PORTB 7 6 5 4 3 2 1 0 // O i i i i i i O // light KEY_LFT KEY_RGT KEY_UP KEY_DWN KEY_EXT KEY_MEN PPM // //PORTC 7 6 5 4 3 2 1 0 // - - O O O O O - // NC NC LCD_E LCD_RNW LCD_A0 LCD_RES LCD_CS1 NC // //PORTD 7 6 5 4 3 2 1 0 // i i i i i i i i // TRM_D_DWN _UP TRM_C_DWN _UP TRM_B_DWN _UP TRM_A_DWN _UP // //PORTE 7 6 5 4 3 2 1 0 // i i i i O i i i // PPM_IN ID2 Trainer Gear Buzzer ElevDR AileDR THRCT // //PORTF 7 6 5 4 3 2 1 0 // ai ai ai ai ai ai ai ai // ANA_ BAT PITT_TRM HOV_THR HOV_PIT STCK_LH STCK_RV STCK_LV STCK_RH // rud thro elev aile //PORTG 7 6 5 4 3 2 1 0 // - - - O i i i // SIM_CTL ID1 Haptic RF_POW RuddDR // Keys #define KEYS_GPIO_REG_MENU pinb #define KEYS_GPIO_PIN_MENU (1<<1) #define KEYS_GPIO_REG_EXIT pinb #define KEYS_GPIO_PIN_EXIT (1<<2) #define KEYS_GPIO_REG_RIGHT pinb #define KEYS_GPIO_PIN_RIGHT (1<<5) #define KEYS_GPIO_REG_LEFT pinb #define KEYS_GPIO_PIN_LEFT (1<<6) #define KEYS_GPIO_REG_UP pinb #define KEYS_GPIO_PIN_UP (1<<4) #define KEYS_GPIO_REG_DOWN pinb #define KEYS_GPIO_PIN_DOWN (1<<3) // Trims #define TRIMS_GPIO_REG_LHL pind #define TRIMS_GPIO_PIN_LHL (1<<6) #define TRIMS_GPIO_REG_LVD pind #define TRIMS_GPIO_PIN_LVD (1<<3) #define TRIMS_GPIO_REG_RVU pind #define TRIMS_GPIO_PIN_RVU (1<<4) #define TRIMS_GPIO_REG_RHL pind #define TRIMS_GPIO_PIN_RHL (1<<1) #define TRIMS_GPIO_REG_LHR pind #define TRIMS_GPIO_PIN_LHR (1<<7) #define TRIMS_GPIO_REG_LVU pind #define TRIMS_GPIO_PIN_LVU (1<<2) #define TRIMS_GPIO_REG_RVD pind #define TRIMS_GPIO_PIN_RVD (1<<5) #define TRIMS_GPIO_REG_RHR pind #define TRIMS_GPIO_PIN_RHR (1<<0) #if defined(CPUM2561) #define TIMER_16KHZ_VECT TIMER2_OVF_vect #define COUNTER_16KHZ TCNT2 #define TIMER_10MS_VECT TIMER2_COMPA_vect #define TIMER_10MS_COMPVAL OCR2A #define PAUSE_10MS_INTERRUPT() TIMSK2 &= ~(1<