/* * 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 * * open9x 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 #define GPIO_BUTTON_MENU pinb #define GPIO_BUTTON_EXIT pinb #define GPIO_BUTTON_RIGHT pinb #define GPIO_BUTTON_LEFT pinb #define GPIO_BUTTON_UP pinb #define GPIO_BUTTON_DOWN pinb #define PIN_BUTTON_MENU (1< 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 #define OUT_B_LIGHT 7 #define INP_B_KEY_LFT 6 #define INP_B_KEY_RGT 5 #define INP_B_KEY_UP 4 #define INP_B_KEY_DWN 3 #define INP_B_KEY_EXT 2 #define INP_B_KEY_MEN 1 #define OUT_B_PPM 0 #define INP_D_TRM_LH_UP 7 #define INP_D_TRM_LH_DWN 6 #define INP_D_TRM_RV_DWN 5 #define INP_D_TRM_RV_UP 4 #define INP_D_TRM_LV_DWN 3 #define INP_D_TRM_LV_UP 2 #define INP_D_TRM_RH_DWN 1 #define INP_D_TRM_RH_UP 0 #define INP_E_PPM_IN 7 #define INP_E_ID2 6 #define INP_E_Trainer 5 #define INP_E_Gear 4 #define OUT_E_BUZZER 3 #define INP_E_ElevDR 2 #if defined(JETI) || defined(FRSKY) || defined(ARDUPILOT) || defined(NMEA) || defined(MAVLINK) #define INP_C_ThrCt 6 #define INP_C_AileDR 7 #else #define INP_E_ThrCt 0 #define INP_E_AileDR 1 #endif #define OUT_G_SIM_CTL 4 //1 : phone-jack=ppm_in #define INP_G_ID1 3 #define OUT_G_HAPTIC 2 #define INP_G_RF_POW 1 #define INP_G_RuddDR 0 // Keys driver #define KEYS_PRESSED() (~PINB) #define DBLKEYS_PRESSED_RGT_LFT(i) ((in & ((1<