| 1 | /* |
| 2 | * Copyright © 2010 Keith Packard <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but |
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along |
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 16 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef _AO_PINS_H_ |
| 20 | #define _AO_PINS_H_cxx . . $ `src/telefireeight-v1.0/ao_pins.h:20:9`! |
| 21 | |
| 22 | #define HAS_RADIOcxx . . $ `src/telefireeight-v1.0/ao_pins.h:22:9`! 1 |
| 23 | #define HAS_RADIO_RATEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:23:9`! 1 |
| 24 | #define HAS_TELEMETRYcxx . . $ `src/telefireeight-v1.0/ao_pins.h:24:9`! 0 |
| 25 | #define HAS_FLIGHTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:25:9`! 0 |
| 26 | #define HAS_USBcxx . . $ `src/telefireeight-v1.0/ao_pins.h:26:9`! 1 |
| 27 | #define HAS_BEEPcxx . . $ `src/telefireeight-v1.0/ao_pins.h:27:9`! 0 |
| 28 | #define BEEPER_TIMERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:28:9`! 3 |
| 29 | #define BEEPER_CHANNELcxx . . $ `src/telefireeight-v1.0/ao_pins.h:29:9`! 1 |
| 30 | #define BEEPER_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:30:9`! (&stm_gpioc) |
| 31 | #define BEEPER_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:31:9`! 6 |
| 32 | #define HAS_GPScxx . . $ `src/telefireeight-v1.0/ao_pins.h:32:9`! 0 |
| 33 | #define HAS_SERIAL_1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:33:9`! 0 |
| 34 | #define HAS_ADCcxx . . $ `src/telefireeight-v1.0/ao_pins.h:34:9`! 1 |
| 35 | #define HAS_DBGcxx . . $ `src/telefireeight-v1.0/ao_pins.h:35:9`! 0 |
| 36 | #define HAS_EEPROMcxx . . $ `src/telefireeight-v1.0/ao_pins.h:36:9`! 1 |
| 37 | #define HAS_LOGcxx . . $ `src/telefireeight-v1.0/ao_pins.h:37:9`! 0 |
| 38 | #define HAS_PADcxx . . $ `src/telefireeight-v1.0/ao_pins.h:38:9`! 1 |
| 39 | #define USE_INTERNAL_FLASHcxx . . $ `src/telefireeight-v1.0/ao_pins.h:39:9`! 1 |
| 40 | #define IGNITE_ON_P0cxx . . $ `src/telefireeight-v1.0/ao_pins.h:40:9`! 0 |
| 41 | #define PACKET_HAS_MASTERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:41:9`! 0 |
| 42 | #define PACKET_HAS_SLAVEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:42:9`! 0 |
| 43 | #define AO_DATA_RINGcxx . . $ `src/telefireeight-v1.0/ao_pins.h:43:9`! 32 |
| 44 | #define USE_EEPROM_CONFIGcxx . . $ `src/telefireeight-v1.0/ao_pins.h:44:9`! 1 |
| 45 | #define USE_STORAGE_CONFIGcxx . . $ `src/telefireeight-v1.0/ao_pins.h:45:9`! 0 |
| 46 | #define HAS_AEScxx . . $ `src/telefireeight-v1.0/ao_pins.h:46:9`! 1 |
| 47 | |
| 48 | /* 8MHz High speed external crystal */ |
| 49 | #define AO_HSEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:49:9`! 8000000 |
| 50 | |
| 51 | /* PLLVCO = 96MHz (so that USB will work) */ |
| 52 | #define AO_PLLMULcxx . . $ `src/telefireeight-v1.0/ao_pins.h:52:9`! 12 |
| 53 | #define AO_RCC_CFGR_PLLMULcxx . . $ `src/telefireeight-v1.0/ao_pins.h:53:9`! (STM_RCC_CFGR_PLLMUL_12) |
| 54 | |
| 55 | #define AO_CC1200_FOSCcxx . . $ `src/telefireeight-v1.0/ao_pins.h:55:9`! 40000000 |
| 56 | |
| 57 | /* SYSCLK = 32MHz (no need to go faster than CPU) */ |
| 58 | #define AO_PLLDIVcxx . . $ `src/telefireeight-v1.0/ao_pins.h:58:9`! 3 |
| 59 | #define AO_RCC_CFGR_PLLDIVcxx . . $ `src/telefireeight-v1.0/ao_pins.h:59:9`! (STM_RCC_CFGR_PLLDIV_3) |
| 60 | |
| 61 | /* HCLK = 32MHz (CPU clock) */ |
| 62 | #define AO_AHB_PRESCALERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:62:9`! 1 |
| 63 | #define AO_RCC_CFGR_HPRE_DIVcxx . . $ `src/telefireeight-v1.0/ao_pins.h:63:9`! STM_RCC_CFGR_HPRE_DIV_1 |
| 64 | |
| 65 | /* Run APB1 at 16MHz (HCLK/2) */ |
| 66 | #define AO_APB1_PRESCALERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:66:9`! 2 |
| 67 | #define AO_RCC_CFGR_PPRE1_DIVcxx . . $ `src/telefireeight-v1.0/ao_pins.h:67:9`! STM_RCC_CFGR_PPRE2_DIV_2 |
| 68 | |
| 69 | /* Run APB2 at 16MHz (HCLK/2) */ |
| 70 | #define AO_APB2_PRESCALERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:70:9`! 2 |
| 71 | #define AO_RCC_CFGR_PPRE2_DIVcxx . . $ `src/telefireeight-v1.0/ao_pins.h:71:9`! STM_RCC_CFGR_PPRE2_DIV_2 |
| 72 | |
| 73 | #define HAS_SPI_1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:73:9`! 1 |
| 74 | #define SPI_1_PA5_PA6_PA7cxx . . $ `src/telefireeight-v1.0/ao_pins.h:74:9`! 0 |
| 75 | #define SPI_1_PB3_PB4_PB5cxx . . $ `src/telefireeight-v1.0/ao_pins.h:75:9`! 0 |
| 76 | #define SPI_1_PE13_PE14_PE15cxx . . $ `src/telefireeight-v1.0/ao_pins.h:76:9`! 1 |
| 77 | #define SPI_1_GPIOcxx . . $ `src/telefireeight-v1.0/ao_pins.h:77:9`! (&stm_gpioe) |
| 78 | #define SPI_1_SCKcxx . . $ `src/telefireeight-v1.0/ao_pins.h:78:9`! 13 |
| 79 | #define SPI_1_MISOcxx . . $ `src/telefireeight-v1.0/ao_pins.h:79:9`! 14 |
| 80 | #define SPI_1_MOSIcxx . . $ `src/telefireeight-v1.0/ao_pins.h:80:9`! 15 |
| 81 | #define SPI_1_OSPEEDRcxx . . $ `src/telefireeight-v1.0/ao_pins.h:81:9`! STM_OSPEEDR_10MHz |
| 82 | |
| 83 | #define HAS_SPI_2cxx . . $ `src/telefireeight-v1.0/ao_pins.h:83:9`! 0 |
| 84 | #define SPI_2_PB13_PB14_PB15cxx . . $ `src/telefireeight-v1.0/ao_pins.h:84:9`! 0 |
| 85 | #define SPI_2_PD1_PD3_PD4cxx . . $ `src/telefireeight-v1.0/ao_pins.h:85:9`! 0 |
| 86 | |
| 87 | #define HAS_I2C_1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:87:9`! 0 |
| 88 | |
| 89 | #define HAS_I2C_2cxx . . $ `src/telefireeight-v1.0/ao_pins.h:89:9`! 0 |
| 90 | |
| 91 | #define PACKET_HAS_SLAVEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:91:9`! 0 |
| 92 | #define PACKET_HAS_MASTERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:92:9`! 0 |
| 93 | |
| 94 | #define FAST_TIMER_FREQcxx . . $ `src/telefireeight-v1.0/ao_pins.h:94:9`! 10000 /* .1ms for debouncing */ |
| 95 | |
| 96 | /* |
| 97 | * Radio is a cc1200 connected via SPI |
| 98 | */ |
| 99 | |
| 100 | #define AO_RADIO_CAL_DEFAULTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:100:9`! 5695733 |
| 101 | |
| 102 | #define AO_CC1200_SPI_CS_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:102:9`! (&stm_gpioe) |
| 103 | #define AO_CC1200_SPI_CS_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:103:9`! 11 |
| 104 | #define AO_CC1200_SPI_BUScxx . . $ `src/telefireeight-v1.0/ao_pins.h:104:9`! AO_SPI_1_PE13_PE14_PE15 |
| 105 | #define AO_CC1200_SPIcxx . . $ `src/telefireeight-v1.0/ao_pins.h:105:9`! stm_spi1 |
| 106 | |
| 107 | #define AO_CC1200_INT_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:107:9`! (&stm_gpioe) |
| 108 | #define AO_CC1200_INT_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:108:9`! (12) |
| 109 | |
| 110 | #define AO_CC1200_INT_GPIOcxx . . $ `src/telefireeight-v1.0/ao_pins.h:110:9`! 2 |
| 111 | #define AO_CC1200_INT_GPIO_IOCFGcxx . . $ `src/telefireeight-v1.0/ao_pins.h:111:9`! CC1200_IOCFG2 |
| 112 | |
| 113 | #define HAS_LEDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:113:9`! 1 |
| 114 | #define LED_TYPEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:114:9`! uint16_t |
| 115 | |
| 116 | /* Continuity leds 1-8 */ |
| 117 | #define LED_0_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:117:9`! (&stm_gpiob) |
| 118 | #define LED_0_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:118:9`! 13 |
| 119 | #define LED_1_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:119:9`! (&stm_gpiob) |
| 120 | #define LED_1_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:120:9`! 12 |
| 121 | #define LED_2_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:121:9`! (&stm_gpiob) |
| 122 | #define LED_2_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:122:9`! 11 |
| 123 | #define LED_3_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:123:9`! (&stm_gpiob) |
| 124 | #define LED_3_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:124:9`! 10 |
| 125 | #define LED_4_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:125:9`! (&stm_gpioc) |
| 126 | #define LED_4_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:126:9`! 9 |
| 127 | #define LED_5_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:127:9`! (&stm_gpioa) |
| 128 | #define LED_5_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:128:9`! 8 |
| 129 | #define LED_6_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:129:9`! (&stm_gpioa) |
| 130 | #define LED_6_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:130:9`! 9 |
| 131 | #define LED_7_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:131:9`! (&stm_gpioa) |
| 132 | #define LED_7_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:132:9`! 10 |
| 133 | |
| 134 | #define AO_LED_CONTINUITYcxx . . $ `src/telefireeight-v1.0/ao_pins.h:134:9`!(c) ((AO_LED_TYPE) (1 << (c))) |
| 135 | #define AO_LED_CONTINUITY_MASKcxx . . $ `src/telefireeight-v1.0/ao_pins.h:135:9`! (0xff) |
| 136 | |
| 137 | /* ARM */ |
| 138 | #define LED_8_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:138:9`! (&stm_gpioe) |
| 139 | #define LED_8_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:139:9`! 3 |
| 140 | |
| 141 | #define LED_PIN_ARMEDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:141:9`! 8 |
| 142 | |
| 143 | /* RF good/marginal/poor */ |
| 144 | #define LED_9_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:144:9`! (&stm_gpioe) |
| 145 | #define LED_9_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:145:9`! 4 |
| 146 | #define LED_10_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:146:9`! (&stm_gpioe) |
| 147 | #define LED_10_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:147:9`! 5 |
| 148 | #define LED_11_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:148:9`! (&stm_gpioe) |
| 149 | #define LED_11_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:149:9`! 6 |
| 150 | |
| 151 | #define AO_LED_ARMEDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:151:9`! AO_LED_8 |
| 152 | #define AO_LED_GREENcxx . . $ `src/telefireeight-v1.0/ao_pins.h:152:9`! AO_LED_9 |
| 153 | #define AO_LED_AMBERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:153:9`! AO_LED_10 |
| 154 | #define AO_LED_REDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:154:9`! AO_LED_11 |
| 155 | |
| 156 | /* Alarm A */ |
| 157 | #define AO_SIRENcxx . . $ `src/telefireeight-v1.0/ao_pins.h:157:9`! |
| 158 | #define AO_SIREN_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:158:9`! (&stm_gpiod) |
| 159 | #define AO_SIREN_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:159:9`! 10 |
| 160 | |
| 161 | /* Alarm B */ |
| 162 | #define AO_STROBEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:162:9`! |
| 163 | #define AO_STROBE_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:163:9`! (&stm_gpiod) |
| 164 | #define AO_STROBE_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:164:9`! 11 |
| 165 | |
| 166 | /* Pad selector is on PD0-7 */ |
| 167 | |
| 168 | #define HAS_FIXED_PAD_BOXcxx . . $ `src/telefireeight-v1.0/ao_pins.h:168:9`! 1 |
| 169 | #define AO_PAD_SELECTOR_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:169:9`! (&stm_gpiod) |
| 170 | #define AO_PAD_SELECTOR_PINScxx . . $ `src/telefireeight-v1.0/ao_pins.h:170:9`! (0xff) |
| 171 | |
| 172 | #define SPI_CONSTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:172:9`! 0x00 |
| 173 | |
| 174 | #define AO_PAD_NUMcxx . . $ `src/telefireeight-v1.0/ao_pins.h:174:9`! 8 |
| 175 | #define AO_PAD_PORT_0cxx . . $ `src/telefireeight-v1.0/ao_pins.h:175:9`! (&stm_gpiod) |
| 176 | #define AO_PAD_PORT_1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:176:9`! (&stm_gpiob) |
| 177 | |
| 178 | #define AO_PAD_PIN_0cxx . . $ `src/telefireeight-v1.0/ao_pins.h:178:9`! 9 |
| 179 | #define AO_PAD_0_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:179:9`! (&stm_gpiod) |
| 180 | #define AO_ADC_SENSE_PAD_0cxx . . $ `src/telefireeight-v1.0/ao_pins.h:180:9`! 3 |
| 181 | #define AO_ADC_SENSE_PAD_0_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:181:9`! (&stm_gpioa) |
| 182 | #define AO_ADC_SENSE_PAD_0_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:182:9`! 3 |
| 183 | |
| 184 | #define AO_PAD_PIN_1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:184:9`! 8 |
| 185 | #define AO_PAD_1_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:185:9`! (&stm_gpiod) |
| 186 | #define AO_ADC_SENSE_PAD_1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:186:9`! 2 |
| 187 | #define AO_ADC_SENSE_PAD_1_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:187:9`! (&stm_gpioa) |
| 188 | #define AO_ADC_SENSE_PAD_1_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:188:9`! 2 |
| 189 | |
| 190 | #define AO_PAD_PIN_2cxx . . $ `src/telefireeight-v1.0/ao_pins.h:190:9`! 15 |
| 191 | #define AO_PAD_2_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:191:9`! (&stm_gpiob) |
| 192 | #define AO_ADC_SENSE_PAD_2cxx . . $ `src/telefireeight-v1.0/ao_pins.h:192:9`! 1 |
| 193 | #define AO_ADC_SENSE_PAD_2_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:193:9`! (&stm_gpioa) |
| 194 | #define AO_ADC_SENSE_PAD_2_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:194:9`! 1 |
| 195 | |
| 196 | #define AO_PAD_PIN_3cxx . . $ `src/telefireeight-v1.0/ao_pins.h:196:9`! 14 |
| 197 | #define AO_PAD_3_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:197:9`! (&stm_gpiob) |
| 198 | #define AO_ADC_SENSE_PAD_3cxx . . $ `src/telefireeight-v1.0/ao_pins.h:198:9`! 0 |
| 199 | #define AO_ADC_SENSE_PAD_3_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:199:9`! (&stm_gpioa) |
| 200 | #define AO_ADC_SENSE_PAD_3_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:200:9`! 0 |
| 201 | |
| 202 | #define AO_PAD_PIN_4cxx . . $ `src/telefireeight-v1.0/ao_pins.h:202:9`! 12 |
| 203 | #define AO_PAD_4_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:203:9`! (&stm_gpiod) |
| 204 | #define AO_ADC_SENSE_PAD_4cxx . . $ `src/telefireeight-v1.0/ao_pins.h:204:9`! 7 |
| 205 | #define AO_ADC_SENSE_PAD_4_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:205:9`! (&stm_gpioa) |
| 206 | #define AO_ADC_SENSE_PAD_4_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:206:9`! 7 |
| 207 | |
| 208 | #define AO_PAD_PIN_5cxx . . $ `src/telefireeight-v1.0/ao_pins.h:208:9`! 13 |
| 209 | #define AO_PAD_5_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:209:9`! (&stm_gpiod) |
| 210 | #define AO_ADC_SENSE_PAD_5cxx . . $ `src/telefireeight-v1.0/ao_pins.h:210:9`! 6 |
| 211 | #define AO_ADC_SENSE_PAD_5_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:211:9`! (&stm_gpioa) |
| 212 | #define AO_ADC_SENSE_PAD_5_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:212:9`! 6 |
| 213 | |
| 214 | #define AO_PAD_PIN_6cxx . . $ `src/telefireeight-v1.0/ao_pins.h:214:9`! 14 |
| 215 | #define AO_PAD_6_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:215:9`! (&stm_gpiod) |
| 216 | #define AO_ADC_SENSE_PAD_6cxx . . $ `src/telefireeight-v1.0/ao_pins.h:216:9`! 5 |
| 217 | #define AO_ADC_SENSE_PAD_6_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:217:9`! (&stm_gpioa) |
| 218 | #define AO_ADC_SENSE_PAD_6_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:218:9`! 5 |
| 219 | |
| 220 | #define AO_PAD_PIN_7cxx . . $ `src/telefireeight-v1.0/ao_pins.h:220:9`! 15 |
| 221 | #define AO_PAD_7_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:221:9`! (&stm_gpiod) |
| 222 | #define AO_ADC_SENSE_PAD_7cxx . . $ `src/telefireeight-v1.0/ao_pins.h:222:9`! 4 |
| 223 | #define AO_ADC_SENSE_PAD_7_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:223:9`! (&stm_gpioa) |
| 224 | #define AO_ADC_SENSE_PAD_7_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:224:9`! 4 |
| 225 | |
| 226 | #define AO_ADC_PYROcxx . . $ `src/telefireeight-v1.0/ao_pins.h:226:9`! 8 |
| 227 | #define AO_ADC_PYRO_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:227:9`! (&stm_gpiob) |
| 228 | #define AO_ADC_PYRO_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:228:9`! 0 |
| 229 | |
| 230 | #define AO_ADC_BATTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:230:9`! 15 |
| 231 | #define AO_ADC_BATT_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:231:9`! (&stm_gpioc) |
| 232 | #define AO_ADC_BATT_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:232:9`! 5 |
| 233 | |
| 234 | #define AO_ADC_PIN0_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:234:9`! AO_ADC_SENSE_PAD_0_PORT |
| 235 | #define AO_ADC_PIN0_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:235:9`! AO_ADC_SENSE_PAD_0_PIN |
| 236 | |
| 237 | #define AO_ADC_PIN1_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:237:9`! AO_ADC_SENSE_PAD_1_PORT |
| 238 | #define AO_ADC_PIN1_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:238:9`! AO_ADC_SENSE_PAD_1_PIN |
| 239 | |
| 240 | #define AO_ADC_PIN2_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:240:9`! AO_ADC_SENSE_PAD_2_PORT |
| 241 | #define AO_ADC_PIN2_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:241:9`! AO_ADC_SENSE_PAD_2_PIN |
| 242 | |
| 243 | #define AO_ADC_PIN3_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:243:9`! AO_ADC_SENSE_PAD_3_PORT |
| 244 | #define AO_ADC_PIN3_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:244:9`! AO_ADC_SENSE_PAD_3_PIN |
| 245 | |
| 246 | #define AO_ADC_PIN4_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:246:9`! AO_ADC_SENSE_PAD_4_PORT |
| 247 | #define AO_ADC_PIN4_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:247:9`! AO_ADC_SENSE_PAD_4_PIN |
| 248 | |
| 249 | #define AO_ADC_PIN5_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:249:9`! AO_ADC_SENSE_PAD_5_PORT |
| 250 | #define AO_ADC_PIN5_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:250:9`! AO_ADC_SENSE_PAD_5_PIN |
| 251 | |
| 252 | #define AO_ADC_PIN6_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:252:9`! AO_ADC_SENSE_PAD_6_PORT |
| 253 | #define AO_ADC_PIN6_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:253:9`! AO_ADC_SENSE_PAD_6_PIN |
| 254 | |
| 255 | #define AO_ADC_PIN7_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:255:9`! AO_ADC_SENSE_PAD_7_PORT |
| 256 | #define AO_ADC_PIN7_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:256:9`! AO_ADC_SENSE_PAD_7_PIN |
| 257 | |
| 258 | #define AO_ADC_PIN8_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:258:9`! AO_ADC_PYRO_PORT |
| 259 | #define AO_ADC_PIN8_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:259:9`! AO_ADC_PYRO_PIN |
| 260 | |
| 261 | #define AO_ADC_PIN9_PORTcxx . . $ `src/telefireeight-v1.0/ao_pins.h:261:9`! AO_ADC_BATT_PORT |
| 262 | #define AO_ADC_PIN9_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:262:9`! AO_ADC_BATT_PIN |
| 263 | |
| 264 | #define AO_PAD_ALL_CHANNELScxx . . $ `src/telefireeight-v1.0/ao_pins.h:264:9`! (0xff) |
| 265 | |
| 266 | /* test these values with real igniters */ |
| 267 | #define AO_PAD_RELAY_CLOSEDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:267:9`! 3524 |
| 268 | #define AO_PAD_NO_IGNITERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:268:9`! 16904 |
| 269 | #define AO_PAD_GOOD_IGNITERcxx . . $ `src/telefireeight-v1.0/ao_pins.h:269:9`! 22514 |
| 270 | |
| 271 | #define AO_ADC_FIRST_PINcxx . . $ `src/telefireeight-v1.0/ao_pins.h:271:9`! 0 |
| 272 | |
| 273 | #define AO_NUM_ADCcxx . . $ `src/telefireeight-v1.0/ao_pins.h:273:9`! 10 |
| 274 | |
| 275 | #define AO_ADC_SQ1cxx . . $ `src/telefireeight-v1.0/ao_pins.h:275:9`! AO_ADC_SENSE_PAD_0 |
| 276 | #define AO_ADC_SQ2cxx . . $ `src/telefireeight-v1.0/ao_pins.h:276:9`! AO_ADC_SENSE_PAD_1 |
| 277 | #define AO_ADC_SQ3cxx . . $ `src/telefireeight-v1.0/ao_pins.h:277:9`! AO_ADC_SENSE_PAD_2 |
| 278 | #define AO_ADC_SQ4cxx . . $ `src/telefireeight-v1.0/ao_pins.h:278:9`! AO_ADC_SENSE_PAD_3 |
| 279 | #define AO_ADC_SQ5cxx . . $ `src/telefireeight-v1.0/ao_pins.h:279:9`! AO_ADC_SENSE_PAD_4 |
| 280 | #define AO_ADC_SQ6cxx . . $ `src/telefireeight-v1.0/ao_pins.h:280:9`! AO_ADC_SENSE_PAD_5 |
| 281 | #define AO_ADC_SQ7cxx . . $ `src/telefireeight-v1.0/ao_pins.h:281:9`! AO_ADC_SENSE_PAD_6 |
| 282 | #define AO_ADC_SQ8cxx . . $ `src/telefireeight-v1.0/ao_pins.h:282:9`! AO_ADC_SENSE_PAD_7 |
| 283 | #define AO_ADC_SQ9cxx . . $ `src/telefireeight-v1.0/ao_pins.h:283:9`! AO_ADC_PYRO |
| 284 | #define AO_ADC_SQ10cxx . . $ `src/telefireeight-v1.0/ao_pins.h:284:9`! AO_ADC_BATT |
| 285 | |
| 286 | #define AO_ADC_REFERENCE_DVcxx . . $ `src/telefireeight-v1.0/ao_pins.h:286:9`! 33 |
| 287 | |
| 288 | #define AO_ADC_RCC_AHBENRcxx . . $ `src/telefireeight-v1.0/ao_pins.h:288:9`! ((1 << STM_RCC_AHBENR_GPIOAEN) | \ |
| 289 | (1 << STM_RCC_AHBENR_GPIOBEN) | \ |
| 290 | (1 << STM_RCC_AHBENR_GPIOCEN)) |
| 291 | |
| 292 | |
| 293 | #define AO_PAD_R_V_BATT_BATT_SENSEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:293:9`! 200 |
| 294 | #define AO_PAD_R_BATT_SENSE_GNDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:294:9`! 22 |
| 295 | |
| 296 | #define AO_PAD_R_V_BATT_V_PYROcxx . . $ `src/telefireeight-v1.0/ao_pins.h:296:9`! 200 |
| 297 | #define AO_PAD_R_V_PYRO_PYRO_SENSEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:297:9`! 200 |
| 298 | #define AO_PAD_R_PYRO_SENSE_GNDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:298:9`! 22 |
| 299 | |
| 300 | #undef AO_PAD_R_V_PYRO_IGNITER |
| 301 | #define AO_PAD_R_IGNITER_IGNITER_SENSEcxx . . $ `src/telefireeight-v1.0/ao_pins.h:301:9`! 200 |
| 302 | #define AO_PAD_R_IGNITER_SENSE_GNDcxx . . $ `src/telefireeight-v1.0/ao_pins.h:302:9`! 22 |
| 303 | |
| 304 | #define HAS_ADC_TEMPcxx . . $ `src/telefireeight-v1.0/ao_pins.h:304:9`! 0 |
| 305 | |
| 306 | struct ao_adccxx . . $ ao_adc# { |
| 307 | int16_tcxx . . $ int16_t# sensecxx . . $ ao_adc#sense.[AO_PAD_NUMcxx . . $ `src/telefireeight-v1.0/ao_pins.h:174:9`!]; |
| 308 | int16_tcxx . . $ int16_t# pyrocxx . . $ ao_adc#pyro.; |
| 309 | int16_tcxx . . $ int16_t# battcxx . . $ ao_adc#batt.; |
| 310 | }; |
| 311 | |
| 312 | #define AO_ADC_DUMPcxx . . $ `src/telefireeight-v1.0/ao_pins.h:312:9`!(p) \ |
| 313 | printf ("tick: %5lu " \ |
| 314 | "0: %5d 1: %5d 2: %5d 3: %5d " \ |
| 315 | "4: %5d 5: %5d 6: %5d 7: %5d " \ |
| 316 | "pyro: %5d batt: %5d\n", \ |
| 317 | (p)->tick, \ |
| 318 | (p)->adc.sense[0], \ |
| 319 | (p)->adc.sense[1], \ |
| 320 | (p)->adc.sense[2], \ |
| 321 | (p)->adc.sense[3], \ |
| 322 | (p)->adc.sense[4], \ |
| 323 | (p)->adc.sense[5], \ |
| 324 | (p)->adc.sense[6], \ |
| 325 | (p)->adc.sense[7], \ |
| 326 | (p)->adc.pyro, \ |
| 327 | (p)->adc.batt) |
| 328 | |
| 329 | #endif /* _AO_PINS_H_ */ |