diff options
| author | Kaleb Elwert <belak@coded.io> | 2018-04-03 19:43:40 -0700 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2018-04-03 23:06:14 -0400 |
| commit | f6b3c67678d346b57c965142ca4a2b6ba588bbb7 (patch) | |
| tree | 790d468e542af478c22365c283456046269adf45 /drivers | |
| parent | 67053712f885641d3a8332239416ff8163a68647 (diff) | |
| download | qmk_firmware-f6b3c67678d346b57c965142ca4a2b6ba588bbb7.tar.gz qmk_firmware-f6b3c67678d346b57c965142ca4a2b6ba588bbb7.zip | |
Update whitefox to use the K-Type teensy workaround
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/boards/IC_TEENSY_3_1/board.c | 191 | ||||
| -rw-r--r-- | drivers/boards/IC_TEENSY_3_1/board.h | 295 | ||||
| -rw-r--r-- | drivers/boards/IC_TEENSY_3_1/board.mk | 5 |
3 files changed, 491 insertions, 0 deletions
diff --git a/drivers/boards/IC_TEENSY_3_1/board.c b/drivers/boards/IC_TEENSY_3_1/board.c new file mode 100644 index 000000000..1e952883d --- /dev/null +++ b/drivers/boards/IC_TEENSY_3_1/board.c | |||
| @@ -0,0 +1,191 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | #include "hal.h" | ||
| 17 | |||
| 18 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
| 19 | /** | ||
| 20 | * @brief PAL setup. | ||
| 21 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
| 22 | * This variable is used by the HAL when initializing the PAL driver. | ||
| 23 | */ | ||
| 24 | const PALConfig pal_default_config = | ||
| 25 | { | ||
| 26 | .ports = { | ||
| 27 | { | ||
| 28 | /* | ||
| 29 | * PORTA setup. | ||
| 30 | * | ||
| 31 | * PTA4 - PIN33 | ||
| 32 | * PTA5 - PIN24 | ||
| 33 | * PTA12 - PIN3 | ||
| 34 | * PTA13 - PIN4 | ||
| 35 | * | ||
| 36 | * PTA18/19 crystal | ||
| 37 | * PTA0/3 SWD | ||
| 38 | */ | ||
| 39 | .port = IOPORT1, | ||
| 40 | .pads = { | ||
| 41 | PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 42 | PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 43 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 44 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 45 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, | ||
| 46 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 47 | PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, | ||
| 48 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 49 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 50 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 51 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 52 | }, | ||
| 53 | }, | ||
| 54 | { | ||
| 55 | /* | ||
| 56 | * PORTB setup. | ||
| 57 | * | ||
| 58 | * PTB0 - PIN16 | ||
| 59 | * PTB1 - PIN17 | ||
| 60 | * PTB2 - PIN19 | ||
| 61 | * PTB3 - PIN18 | ||
| 62 | * PTB16 - PIN0 - UART0_TX | ||
| 63 | * PTB17 - PIN1 - UART0_RX | ||
| 64 | * PTB18 - PIN32 | ||
| 65 | * PTB19 - PIN25 | ||
| 66 | */ | ||
| 67 | .port = IOPORT2, | ||
| 68 | .pads = { | ||
| 69 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 70 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 71 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 72 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 73 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 74 | PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, | ||
| 75 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, | ||
| 76 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 77 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 78 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 79 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 80 | }, | ||
| 81 | }, | ||
| 82 | { | ||
| 83 | /* | ||
| 84 | * PORTC setup. | ||
| 85 | * | ||
| 86 | * PTC0 - PIN15 | ||
| 87 | * PTC1 - PIN22 | ||
| 88 | * PTC2 - PIN23 | ||
| 89 | * PTC3 - PIN9 | ||
| 90 | * PTC4 - PIN10 | ||
| 91 | * PTC5 - PIN13 | ||
| 92 | * PTC6 - PIN11 | ||
| 93 | * PTC7 - PIN12 | ||
| 94 | * PTC8 - PIN28 | ||
| 95 | * PTC9 - PIN27 | ||
| 96 | * PTC10 - PIN29 | ||
| 97 | * PTC11 - PIN30 | ||
| 98 | */ | ||
| 99 | .port = IOPORT3, | ||
| 100 | .pads = { | ||
| 101 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 102 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 103 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 104 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 105 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 106 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 107 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 108 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 109 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 110 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 111 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 112 | }, | ||
| 113 | }, | ||
| 114 | { | ||
| 115 | /* | ||
| 116 | * PORTD setup. | ||
| 117 | * | ||
| 118 | * PTD0 - PIN2 | ||
| 119 | * PTD1 - PIN14 | ||
| 120 | * PTD2 - PIN7 | ||
| 121 | * PTD3 - PIN8 | ||
| 122 | * PTD4 - PIN6 | ||
| 123 | * PTD5 - PIN20 | ||
| 124 | * PTD6 - PIN21 | ||
| 125 | * PTD7 - PIN5 | ||
| 126 | */ | ||
| 127 | .port = IOPORT4, | ||
| 128 | .pads = { | ||
| 129 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 130 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
| 131 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, | ||
| 132 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 133 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 134 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 135 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 136 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 137 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 138 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 139 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 140 | }, | ||
| 141 | }, | ||
| 142 | { | ||
| 143 | /* | ||
| 144 | * PORTE setup. | ||
| 145 | * | ||
| 146 | * PTE0 - PIN31 | ||
| 147 | * PTE1 - PIN26 | ||
| 148 | */ | ||
| 149 | .port = IOPORT5, | ||
| 150 | .pads = { | ||
| 151 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, | ||
| 152 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 153 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 154 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 155 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 156 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 157 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 158 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 159 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 160 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 161 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 162 | }, | ||
| 163 | }, | ||
| 164 | }, | ||
| 165 | }; | ||
| 166 | #endif | ||
| 167 | |||
| 168 | // NOTE: This value comes from kiibohd/controller and is the location of a value | ||
| 169 | // which needs to be checked before disabling the watchdog (which happens in | ||
| 170 | // k20x_clock_init) | ||
| 171 | #define WDOG_TMROUTL *(volatile uint16_t *)0x40052012 | ||
| 172 | |||
| 173 | /** | ||
| 174 | * @brief Early initialization code. | ||
| 175 | * @details This initialization must be performed just after stack setup | ||
| 176 | * and before any other initialization. | ||
| 177 | */ | ||
| 178 | void __early_init(void) { | ||
| 179 | // This is a dirty hack and should only be used as a temporary fix until this | ||
| 180 | // is upstreamed. | ||
| 181 | while (WDOG_TMROUTL < 2); // Must wait for WDOG timer if already running, before jumping | ||
| 182 | |||
| 183 | k20x_clock_init(); | ||
| 184 | } | ||
| 185 | |||
| 186 | /** | ||
| 187 | * @brief Board-specific initialization code. | ||
| 188 | * @todo Add your board-specific code, if any. | ||
| 189 | */ | ||
| 190 | void boardInit(void) { | ||
| 191 | } | ||
diff --git a/drivers/boards/IC_TEENSY_3_1/board.h b/drivers/boards/IC_TEENSY_3_1/board.h new file mode 100644 index 000000000..8853395ef --- /dev/null +++ b/drivers/boards/IC_TEENSY_3_1/board.h | |||
| @@ -0,0 +1,295 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _BOARD_H_ | ||
| 18 | #define _BOARD_H_ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Setup for the PJRC Teensy 3.1 board. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Board identifier. | ||
| 26 | */ | ||
| 27 | #define BOARD_PJRC_TEENSY_3_1 | ||
| 28 | #define BOARD_NAME "PJRC Teensy 3.1" | ||
| 29 | |||
| 30 | /* External 16 MHz crystal */ | ||
| 31 | #define KINETIS_XTAL_FREQUENCY 16000000UL | ||
| 32 | |||
| 33 | /* Use internal capacitors for the crystal */ | ||
| 34 | #define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P|OSC_CR_SC2P | ||
| 35 | |||
| 36 | /* | ||
| 37 | * MCU type | ||
| 38 | */ | ||
| 39 | #define K20x7 | ||
| 40 | |||
| 41 | /* | ||
| 42 | * IO pins assignments. | ||
| 43 | */ | ||
| 44 | #define PORTA_PIN0 0 | ||
| 45 | #define PORTA_PIN1 1 | ||
| 46 | #define PORTA_PIN2 2 | ||
| 47 | #define PORTA_PIN3 3 | ||
| 48 | #define TEENSY_PIN33 4 | ||
| 49 | #define TEENSY_PIN24 5 | ||
| 50 | #define PORTA_PIN6 6 | ||
| 51 | #define PORTA_PIN7 7 | ||
| 52 | #define PORTA_PIN8 8 | ||
| 53 | #define PORTA_PIN9 9 | ||
| 54 | #define PORTA_PIN10 10 | ||
| 55 | #define PORTA_PIN11 11 | ||
| 56 | #define TEENSY_PIN3 12 | ||
| 57 | #define TEENSY_PIN4 13 | ||
| 58 | #define PORTA_PIN14 14 | ||
| 59 | #define PORTA_PIN15 15 | ||
| 60 | #define PORTA_PIN16 16 | ||
| 61 | #define PORTA_PIN17 17 | ||
| 62 | #define PORTA_PIN18 18 | ||
| 63 | #define PORTA_PIN19 19 | ||
| 64 | #define PORTA_PIN20 20 | ||
| 65 | #define PORTA_PIN21 21 | ||
| 66 | #define PORTA_PIN22 22 | ||
| 67 | #define PORTA_PIN23 23 | ||
| 68 | #define PORTA_PIN24 24 | ||
| 69 | #define PORTA_PIN25 25 | ||
| 70 | #define PORTA_PIN26 26 | ||
| 71 | #define PORTA_PIN27 27 | ||
| 72 | #define PORTA_PIN28 28 | ||
| 73 | #define PORTA_PIN29 29 | ||
| 74 | #define PORTA_PIN30 30 | ||
| 75 | #define PORTA_PIN31 31 | ||
| 76 | |||
| 77 | #define TEENSY_PIN3_IOPORT IOPORT1 | ||
| 78 | #define TEENSY_PIN4_IOPORT IOPORT1 | ||
| 79 | #define TEENSY_PIN24_IOPORT IOPORT1 | ||
| 80 | #define TEENSY_PIN33_IOPORT IOPORT1 | ||
| 81 | |||
| 82 | #define TEENSY_PIN16 0 | ||
| 83 | #define TEENSY_PIN17 1 | ||
| 84 | #define TEENSY_PIN19 2 | ||
| 85 | #define TEENSY_PIN18 3 | ||
| 86 | #define PORTB_PIN4 4 | ||
| 87 | #define PORTB_PIN5 5 | ||
| 88 | #define PORTB_PIN6 6 | ||
| 89 | #define PORTB_PIN7 7 | ||
| 90 | #define PORTB_PIN8 8 | ||
| 91 | #define PORTB_PIN9 9 | ||
| 92 | #define PORTB_PIN10 10 | ||
| 93 | #define PORTB_PIN11 11 | ||
| 94 | #define PORTB_PIN12 12 | ||
| 95 | #define PORTB_PIN13 13 | ||
| 96 | #define PORTB_PIN14 14 | ||
| 97 | #define PORTB_PIN15 15 | ||
| 98 | #define TEENSY_PIN0 16 | ||
| 99 | #define TEENSY_PIN1 17 | ||
| 100 | #define TEENSY_PIN32 18 | ||
| 101 | #define TEENSY_PIN25 19 | ||
| 102 | #define PORTB_PIN20 20 | ||
| 103 | #define PORTB_PIN21 21 | ||
| 104 | #define PORTB_PIN22 22 | ||
| 105 | #define PORTB_PIN23 23 | ||
| 106 | #define PORTB_PIN24 24 | ||
| 107 | #define PORTB_PIN25 25 | ||
| 108 | #define PORTB_PIN26 26 | ||
| 109 | #define PORTB_PIN27 27 | ||
| 110 | #define PORTB_PIN28 28 | ||
| 111 | #define PORTB_PIN29 29 | ||
| 112 | #define PORTB_PIN30 30 | ||
| 113 | #define PORTB_PIN31 31 | ||
| 114 | |||
| 115 | #define TEENSY_PIN0_IOPORT IOPORT2 | ||
| 116 | #define TEENSY_PIN1_IOPORT IOPORT2 | ||
| 117 | #define TEENSY_PIN16_IOPORT IOPORT2 | ||
| 118 | #define TEENSY_PIN17_IOPORT IOPORT2 | ||
| 119 | #define TEENSY_PIN18_IOPORT IOPORT2 | ||
| 120 | #define TEENSY_PIN19_IOPORT IOPORT2 | ||
| 121 | #define TEENSY_PIN25_IOPORT IOPORT2 | ||
| 122 | #define TEENSY_PIN32_IOPORT IOPORT2 | ||
| 123 | |||
| 124 | #define TEENSY_PIN15 0 | ||
| 125 | #define TEENSY_PIN22 1 | ||
| 126 | #define TEENSY_PIN23 2 | ||
| 127 | #define TEENSY_PIN9 3 | ||
| 128 | #define TEENSY_PIN10 4 | ||
| 129 | #define TEENSY_PIN13 5 | ||
| 130 | #define TEENSY_PIN11 6 | ||
| 131 | #define TEENSY_PIN12 7 | ||
| 132 | #define TEENSY_PIN28 8 | ||
| 133 | #define TEENSY_PIN27 9 | ||
| 134 | #define TEENSY_PIN29 10 | ||
| 135 | #define TEENSY_PIN30 11 | ||
| 136 | #define PORTC_PIN12 12 | ||
| 137 | #define PORTC_PIN13 13 | ||
| 138 | #define PORTC_PIN14 14 | ||
| 139 | #define PORTC_PIN15 15 | ||
| 140 | #define PORTC_PIN16 16 | ||
| 141 | #define PORTC_PIN17 17 | ||
| 142 | #define PORTC_PIN18 18 | ||
| 143 | #define PORTC_PIN19 19 | ||
| 144 | #define PORTC_PIN20 20 | ||
| 145 | #define PORTC_PIN21 21 | ||
| 146 | #define PORTC_PIN22 22 | ||
| 147 | #define PORTC_PIN23 23 | ||
| 148 | #define PORTC_PIN24 24 | ||
| 149 | #define PORTC_PIN25 25 | ||
| 150 | #define PORTC_PIN26 26 | ||
| 151 | #define PORTC_PIN27 27 | ||
| 152 | #define PORTC_PIN28 28 | ||
| 153 | #define PORTC_PIN29 29 | ||
| 154 | #define PORTC_PIN30 30 | ||
| 155 | #define PORTC_PIN31 31 | ||
| 156 | |||
| 157 | #define TEENSY_PIN9_IOPORT IOPORT3 | ||
| 158 | #define TEENSY_PIN10_IOPORT IOPORT3 | ||
| 159 | #define TEENSY_PIN11_IOPORT IOPORT3 | ||
| 160 | #define TEENSY_PIN12_IOPORT IOPORT3 | ||
| 161 | #define TEENSY_PIN13_IOPORT IOPORT3 | ||
| 162 | #define TEENSY_PIN15_IOPORT IOPORT3 | ||
| 163 | #define TEENSY_PIN22_IOPORT IOPORT3 | ||
| 164 | #define TEENSY_PIN23_IOPORT IOPORT3 | ||
| 165 | #define TEENSY_PIN27_IOPORT IOPORT3 | ||
| 166 | #define TEENSY_PIN28_IOPORT IOPORT3 | ||
| 167 | #define TEENSY_PIN29_IOPORT IOPORT3 | ||
| 168 | #define TEENSY_PIN30_IOPORT IOPORT3 | ||
| 169 | |||
| 170 | #define TEENSY_PIN2 0 | ||
| 171 | #define TEENSY_PIN14 1 | ||
| 172 | #define TEENSY_PIN7 2 | ||
| 173 | #define TEENSY_PIN8 3 | ||
| 174 | #define TEENSY_PIN6 4 | ||
| 175 | #define TEENSY_PIN20 5 | ||
| 176 | #define TEENSY_PIN21 6 | ||
| 177 | #define TEENSY_PIN5 7 | ||
| 178 | #define PORTD_PIN8 8 | ||
| 179 | #define PORTD_PIN9 9 | ||
| 180 | #define PORTD_PIN10 10 | ||
| 181 | #define PORTD_PIN11 11 | ||
| 182 | #define PORTD_PIN12 12 | ||
| 183 | #define PORTD_PIN13 13 | ||
| 184 | #define PORTD_PIN14 14 | ||
| 185 | #define PORTD_PIN15 15 | ||
| 186 | #define PORTD_PIN16 16 | ||
| 187 | #define PORTD_PIN17 17 | ||
| 188 | #define PORTD_PIN18 18 | ||
| 189 | #define PORTD_PIN19 19 | ||
| 190 | #define PORTD_PIN20 20 | ||
| 191 | #define PORTD_PIN21 21 | ||
| 192 | #define PORTD_PIN22 22 | ||
| 193 | #define PORTD_PIN23 23 | ||
| 194 | #define PORTD_PIN24 24 | ||
| 195 | #define PORTD_PIN25 25 | ||
| 196 | #define PORTD_PIN26 26 | ||
| 197 | #define PORTD_PIN27 27 | ||
| 198 | #define PORTD_PIN28 28 | ||
| 199 | #define PORTD_PIN29 29 | ||
| 200 | #define PORTD_PIN30 30 | ||
| 201 | #define PORTD_PIN31 31 | ||
| 202 | |||
| 203 | #define TEENSY_PIN2_IOPORT IOPORT4 | ||
| 204 | #define TEENSY_PIN5_IOPORT IOPORT4 | ||
| 205 | #define TEENSY_PIN6_IOPORT IOPORT4 | ||
| 206 | #define TEENSY_PIN7_IOPORT IOPORT4 | ||
| 207 | #define TEENSY_PIN8_IOPORT IOPORT4 | ||
| 208 | #define TEENSY_PIN14_IOPORT IOPORT4 | ||
| 209 | #define TEENSY_PIN20_IOPORT IOPORT4 | ||
| 210 | #define TEENSY_PIN21_IOPORT IOPORT4 | ||
| 211 | |||
| 212 | #define TEENSY_PIN31 0 | ||
| 213 | #define TEENSY_PIN26 1 | ||
| 214 | #define PORTE_PIN2 2 | ||
| 215 | #define PORTE_PIN3 3 | ||
| 216 | #define PORTE_PIN4 4 | ||
| 217 | #define PORTE_PIN5 5 | ||
| 218 | #define PORTE_PIN6 6 | ||
| 219 | #define PORTE_PIN7 7 | ||
| 220 | #define PORTE_PIN8 8 | ||
| 221 | #define PORTE_PIN9 9 | ||
| 222 | #define PORTE_PIN10 10 | ||
| 223 | #define PORTE_PIN11 11 | ||
| 224 | #define PORTE_PIN12 12 | ||
| 225 | #define PORTE_PIN13 13 | ||
| 226 | #define PORTE_PIN14 14 | ||
| 227 | #define PORTE_PIN15 15 | ||
| 228 | #define PORTE_PIN16 16 | ||
| 229 | #define PORTE_PIN17 17 | ||
| 230 | #define PORTE_PIN18 18 | ||
| 231 | #define PORTE_PIN19 19 | ||
| 232 | #define PORTE_PIN20 20 | ||
| 233 | #define PORTE_PIN21 21 | ||
| 234 | #define PORTE_PIN22 22 | ||
| 235 | #define PORTE_PIN23 23 | ||
| 236 | #define PORTE_PIN24 24 | ||
| 237 | #define PORTE_PIN25 25 | ||
| 238 | #define PORTE_PIN26 26 | ||
| 239 | #define PORTE_PIN27 27 | ||
| 240 | #define PORTE_PIN28 28 | ||
| 241 | #define PORTE_PIN29 29 | ||
| 242 | #define PORTE_PIN30 30 | ||
| 243 | #define PORTE_PIN31 31 | ||
| 244 | |||
| 245 | #define TEENSY_PIN26_IOPORT IOPORT5 | ||
| 246 | #define TEENSY_PIN31_IOPORT IOPORT5 | ||
| 247 | |||
| 248 | #define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1) | ||
| 249 | #define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2) | ||
| 250 | #define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3) | ||
| 251 | #define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4) | ||
| 252 | #define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5) | ||
| 253 | #define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6) | ||
| 254 | #define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7) | ||
| 255 | #define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8) | ||
| 256 | #define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9) | ||
| 257 | #define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10) | ||
| 258 | #define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11) | ||
| 259 | #define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12) | ||
| 260 | #define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13) | ||
| 261 | #define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14) | ||
| 262 | #define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15) | ||
| 263 | #define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16) | ||
| 264 | #define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17) | ||
| 265 | #define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18) | ||
| 266 | #define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19) | ||
| 267 | #define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20) | ||
| 268 | #define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21) | ||
| 269 | #define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22) | ||
| 270 | #define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23) | ||
| 271 | #define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24) | ||
| 272 | #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) | ||
| 273 | #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) | ||
| 274 | #define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26) | ||
| 275 | #define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27) | ||
| 276 | #define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28) | ||
| 277 | #define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29) | ||
| 278 | #define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30) | ||
| 279 | #define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31) | ||
| 280 | #define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32) | ||
| 281 | #define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33) | ||
| 282 | |||
| 283 | #define LINE_LED LINE_PIN13 | ||
| 284 | |||
| 285 | #if !defined(_FROM_ASM_) | ||
| 286 | #ifdef __cplusplus | ||
| 287 | extern "C" { | ||
| 288 | #endif | ||
| 289 | void boardInit(void); | ||
| 290 | #ifdef __cplusplus | ||
| 291 | } | ||
| 292 | #endif | ||
| 293 | #endif /* _FROM_ASM_ */ | ||
| 294 | |||
| 295 | #endif /* _BOARD_H_ */ | ||
diff --git a/drivers/boards/IC_TEENSY_3_1/board.mk b/drivers/boards/IC_TEENSY_3_1/board.mk new file mode 100644 index 000000000..62f5b751c --- /dev/null +++ b/drivers/boards/IC_TEENSY_3_1/board.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/IC_TEENSY_3_1/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/IC_TEENSY_3_1 | ||
