Mouse code for the MacroRat
mbed-dev/targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/PeripheralPins.c@46:b156ef445742, 2017-06-03 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sat Jun 03 00:22:44 2017 +0000
- Revision:
- 46:b156ef445742
- Parent:
- 18:6a4db94011d3
Final code for internal battlebot competition.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /***************************************************************************//** |
sahilmgandhi | 18:6a4db94011d3 | 2 | * @file PeripheralPins.c |
sahilmgandhi | 18:6a4db94011d3 | 3 | ******************************************************************************* |
sahilmgandhi | 18:6a4db94011d3 | 4 | * @section License |
sahilmgandhi | 18:6a4db94011d3 | 5 | * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b> |
sahilmgandhi | 18:6a4db94011d3 | 6 | ******************************************************************************* |
sahilmgandhi | 18:6a4db94011d3 | 7 | * |
sahilmgandhi | 18:6a4db94011d3 | 8 | * SPDX-License-Identifier: Apache-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 9 | * |
sahilmgandhi | 18:6a4db94011d3 | 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
sahilmgandhi | 18:6a4db94011d3 | 11 | * not use this file except in compliance with the License. |
sahilmgandhi | 18:6a4db94011d3 | 12 | * You may obtain a copy of the License at |
sahilmgandhi | 18:6a4db94011d3 | 13 | * |
sahilmgandhi | 18:6a4db94011d3 | 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 15 | * |
sahilmgandhi | 18:6a4db94011d3 | 16 | * Unless required by applicable law or agreed to in writing, software |
sahilmgandhi | 18:6a4db94011d3 | 17 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
sahilmgandhi | 18:6a4db94011d3 | 18 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sahilmgandhi | 18:6a4db94011d3 | 19 | * See the License for the specific language governing permissions and |
sahilmgandhi | 18:6a4db94011d3 | 20 | * limitations under the License. |
sahilmgandhi | 18:6a4db94011d3 | 21 | * |
sahilmgandhi | 18:6a4db94011d3 | 22 | ******************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 23 | |
sahilmgandhi | 18:6a4db94011d3 | 24 | #include "PeripheralPins.h" |
sahilmgandhi | 18:6a4db94011d3 | 25 | |
sahilmgandhi | 18:6a4db94011d3 | 26 | /************ADC***************/ |
sahilmgandhi | 18:6a4db94011d3 | 27 | /* The third "function" value is used to select the correct ADC channel */ |
sahilmgandhi | 18:6a4db94011d3 | 28 | const PinMap PinMap_ADC[] = { |
sahilmgandhi | 18:6a4db94011d3 | 29 | {PA0, ADC_0, adcPosSelAPORT3XCH8}, |
sahilmgandhi | 18:6a4db94011d3 | 30 | {PA1, ADC_0, adcPosSelAPORT4XCH9}, |
sahilmgandhi | 18:6a4db94011d3 | 31 | {PA2, ADC_0, adcPosSelAPORT3XCH10}, |
sahilmgandhi | 18:6a4db94011d3 | 32 | {PA3, ADC_0, adcPosSelAPORT4XCH11}, |
sahilmgandhi | 18:6a4db94011d3 | 33 | {PA4, ADC_0, adcPosSelAPORT3XCH12}, |
sahilmgandhi | 18:6a4db94011d3 | 34 | {PA5, ADC_0, adcPosSelAPORT4XCH13}, |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | {PB11, ADC_0, adcPosSelAPORT4XCH27}, |
sahilmgandhi | 18:6a4db94011d3 | 37 | {PB12, ADC_0, adcPosSelAPORT3XCH28}, |
sahilmgandhi | 18:6a4db94011d3 | 38 | {PB14, ADC_0, adcPosSelAPORT3XCH30}, |
sahilmgandhi | 18:6a4db94011d3 | 39 | {PB15, ADC_0, adcPosSelAPORT4XCH31}, |
sahilmgandhi | 18:6a4db94011d3 | 40 | |
sahilmgandhi | 18:6a4db94011d3 | 41 | {PC6, ADC_0, adcPosSelAPORT1XCH6}, |
sahilmgandhi | 18:6a4db94011d3 | 42 | {PC7, ADC_0, adcPosSelAPORT2XCH7}, |
sahilmgandhi | 18:6a4db94011d3 | 43 | {PC8, ADC_0, adcPosSelAPORT1XCH8}, |
sahilmgandhi | 18:6a4db94011d3 | 44 | {PC9, ADC_0, adcPosSelAPORT2XCH9}, |
sahilmgandhi | 18:6a4db94011d3 | 45 | {PC10, ADC_0, adcPosSelAPORT1XCH10}, |
sahilmgandhi | 18:6a4db94011d3 | 46 | {PC11, ADC_0, adcPosSelAPORT2XCH11}, |
sahilmgandhi | 18:6a4db94011d3 | 47 | |
sahilmgandhi | 18:6a4db94011d3 | 48 | {PD9, ADC_0, adcPosSelAPORT4XCH1}, |
sahilmgandhi | 18:6a4db94011d3 | 49 | {PD10, ADC_0, adcPosSelAPORT3XCH2}, |
sahilmgandhi | 18:6a4db94011d3 | 50 | {PD11, ADC_0, adcPosSelAPORT3YCH3}, |
sahilmgandhi | 18:6a4db94011d3 | 51 | {PD12, ADC_0, adcPosSelAPORT3XCH4}, |
sahilmgandhi | 18:6a4db94011d3 | 52 | {PD13, ADC_0, adcPosSelAPORT3YCH5}, |
sahilmgandhi | 18:6a4db94011d3 | 53 | {PD14, ADC_0, adcPosSelAPORT3XCH6}, |
sahilmgandhi | 18:6a4db94011d3 | 54 | {PD15, ADC_0, adcPosSelAPORT4XCH7}, |
sahilmgandhi | 18:6a4db94011d3 | 55 | |
sahilmgandhi | 18:6a4db94011d3 | 56 | {PF0, ADC_0, adcPosSelAPORT1XCH16}, |
sahilmgandhi | 18:6a4db94011d3 | 57 | {PF1, ADC_0, adcPosSelAPORT2XCH17}, |
sahilmgandhi | 18:6a4db94011d3 | 58 | {PF2, ADC_0, adcPosSelAPORT1XCH18}, |
sahilmgandhi | 18:6a4db94011d3 | 59 | {PF3, ADC_0, adcPosSelAPORT2XCH19}, |
sahilmgandhi | 18:6a4db94011d3 | 60 | {PF4, ADC_0, adcPosSelAPORT1XCH20}, |
sahilmgandhi | 18:6a4db94011d3 | 61 | {PF5, ADC_0, adcPosSelAPORT2XCH21}, |
sahilmgandhi | 18:6a4db94011d3 | 62 | {PF6, ADC_0, adcPosSelAPORT1XCH22}, |
sahilmgandhi | 18:6a4db94011d3 | 63 | {PF7, ADC_0, adcPosSelAPORT2XCH23}, |
sahilmgandhi | 18:6a4db94011d3 | 64 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 65 | }; |
sahilmgandhi | 18:6a4db94011d3 | 66 | |
sahilmgandhi | 18:6a4db94011d3 | 67 | /************I2C SCL***********/ |
sahilmgandhi | 18:6a4db94011d3 | 68 | const PinMap PinMap_I2C_SCL[] = { |
sahilmgandhi | 18:6a4db94011d3 | 69 | /* I2C0 */ |
sahilmgandhi | 18:6a4db94011d3 | 70 | {PA1, I2C_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 71 | {PA2, I2C_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 72 | {PA3, I2C_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 73 | {PA4, I2C_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 74 | {PA5, I2C_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 75 | {PB11, I2C_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 76 | {PB12, I2C_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 77 | {PB13, I2C_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 78 | {PB14, I2C_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 79 | {PB15, I2C_0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 80 | {PC6, I2C_0, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 81 | {PC7, I2C_0, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 82 | {PC8, I2C_0, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 83 | {PC9, I2C_0, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 84 | {PC10, I2C_0, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 85 | {PC11, I2C_0, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 86 | {PD9, I2C_0, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 87 | {PD10, I2C_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 88 | {PD11, I2C_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 89 | {PD12, I2C_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 90 | {PD13, I2C_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 91 | {PD14, I2C_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 92 | {PD15, I2C_0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 93 | {PF0, I2C_0, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 94 | {PF1, I2C_0, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 95 | {PF2, I2C_0, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 96 | {PF3, I2C_0, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 97 | {PF4, I2C_0, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 98 | {PF5, I2C_0, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 99 | {PF6, I2C_0, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 100 | {PF7, I2C_0, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 101 | {PA0, I2C_0, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 102 | |
sahilmgandhi | 18:6a4db94011d3 | 103 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 104 | }; |
sahilmgandhi | 18:6a4db94011d3 | 105 | |
sahilmgandhi | 18:6a4db94011d3 | 106 | /************I2C SDA***********/ |
sahilmgandhi | 18:6a4db94011d3 | 107 | const PinMap PinMap_I2C_SDA[] = { |
sahilmgandhi | 18:6a4db94011d3 | 108 | /* I2C0 */ |
sahilmgandhi | 18:6a4db94011d3 | 109 | {PA0, I2C_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 110 | {PA1, I2C_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 111 | {PA2, I2C_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 112 | {PA3, I2C_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 113 | {PA4, I2C_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 114 | {PA5, I2C_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 115 | {PB11, I2C_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 116 | {PB12, I2C_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 117 | {PB13, I2C_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 118 | {PB14, I2C_0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 119 | {PB15, I2C_0, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 120 | {PC6, I2C_0, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 121 | {PC7, I2C_0, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 122 | {PC8, I2C_0, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 123 | {PC9, I2C_0, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 124 | {PC10, I2C_0, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 125 | {PC11, I2C_0, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 126 | {PD9, I2C_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 127 | {PD10, I2C_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 128 | {PD11, I2C_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 129 | {PD12, I2C_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 130 | {PD13, I2C_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 131 | {PD14, I2C_0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 132 | {PD15, I2C_0, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 133 | {PF0, I2C_0, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 134 | {PF1, I2C_0, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 135 | {PF2, I2C_0, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 136 | {PF3, I2C_0, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 137 | {PF4, I2C_0, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 138 | {PF5, I2C_0, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 139 | {PF6, I2C_0, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 140 | {PF7, I2C_0, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 141 | |
sahilmgandhi | 18:6a4db94011d3 | 142 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 143 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 144 | }; |
sahilmgandhi | 18:6a4db94011d3 | 145 | |
sahilmgandhi | 18:6a4db94011d3 | 146 | /************PWM***************/ |
sahilmgandhi | 18:6a4db94011d3 | 147 | const PinMap PinMap_PWM[] = { |
sahilmgandhi | 18:6a4db94011d3 | 148 | {PA0, PWM_CH0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 149 | {PA1, PWM_CH1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 150 | {PA2, PWM_CH2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 151 | {PA3, PWM_CH3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 152 | {PA4, PWM_CH2, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 153 | {PA5, PWM_CH3, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 154 | {PB11, PWM_CH1, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 155 | {PB12, PWM_CH2, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 156 | {PB13, PWM_CH3, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 157 | {PB14, PWM_CH0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 158 | {PB15, PWM_CH0, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 159 | {PC6, PWM_CH0, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 160 | {PC7, PWM_CH1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 161 | {PC8, PWM_CH2, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 162 | {PC9, PWM_CH3, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 163 | {PC10, PWM_CH2, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 164 | {PC11, PWM_CH3, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 165 | {PD9, PWM_CH3, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 166 | {PD10, PWM_CH0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 167 | {PD11, PWM_CH1, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 168 | {PD12, PWM_CH2, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 169 | {PD13, PWM_CH3, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 170 | {PD14, PWM_CH0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 171 | {PD15, PWM_CH1, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 172 | {PF0, PWM_CH0, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 173 | {PF1, PWM_CH1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 174 | {PF2, PWM_CH2, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 175 | {PF3, PWM_CH3, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 176 | {PF4, PWM_CH0, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 177 | {PF5, PWM_CH1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 178 | {PF6, PWM_CH2, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 179 | {PF7, PWM_CH3, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 180 | |
sahilmgandhi | 18:6a4db94011d3 | 181 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 182 | }; |
sahilmgandhi | 18:6a4db94011d3 | 183 | |
sahilmgandhi | 18:6a4db94011d3 | 184 | /*************SPI**************/ |
sahilmgandhi | 18:6a4db94011d3 | 185 | const PinMap PinMap_SPI_MOSI[] = { |
sahilmgandhi | 18:6a4db94011d3 | 186 | |
sahilmgandhi | 18:6a4db94011d3 | 187 | /* USART0 */ |
sahilmgandhi | 18:6a4db94011d3 | 188 | {PA0, SPI_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 189 | {PA1, SPI_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 190 | {PA2, SPI_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 191 | {PA3, SPI_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 192 | {PA4, SPI_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 193 | {PA5, SPI_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 194 | {PB11, SPI_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 195 | {PB12, SPI_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 196 | {PB13, SPI_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 197 | {PB14, SPI_0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 198 | {PB15, SPI_0, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 199 | {PD9, SPI_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 200 | {PD10, SPI_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 201 | {PD11, SPI_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 202 | {PD12, SPI_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 203 | {PD13, SPI_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 204 | {PD14, SPI_0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 205 | {PD15, SPI_0, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 206 | |
sahilmgandhi | 18:6a4db94011d3 | 207 | /* USART1 */ |
sahilmgandhi | 18:6a4db94011d3 | 208 | {PC6, SPI_1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 209 | {PC7, SPI_1, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 210 | {PC8, SPI_1, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 211 | {PC9, SPI_1, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 212 | {PC10, SPI_1, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 213 | {PC11, SPI_1, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 214 | {PF0, SPI_1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 215 | {PF1, SPI_1, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 216 | {PF2, SPI_1, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 217 | {PF3, SPI_1, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 218 | {PF4, SPI_1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 219 | {PF5, SPI_1, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 220 | {PF6, SPI_1, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 221 | {PF7, SPI_1, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 222 | |
sahilmgandhi | 18:6a4db94011d3 | 223 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 224 | }; |
sahilmgandhi | 18:6a4db94011d3 | 225 | |
sahilmgandhi | 18:6a4db94011d3 | 226 | const PinMap PinMap_SPI_MISO[] = { |
sahilmgandhi | 18:6a4db94011d3 | 227 | |
sahilmgandhi | 18:6a4db94011d3 | 228 | /* USART0 */ |
sahilmgandhi | 18:6a4db94011d3 | 229 | {PA0, SPI_0, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 230 | {PA1, SPI_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 231 | {PA2, SPI_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 232 | {PA3, SPI_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 233 | {PA4, SPI_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 234 | {PA5, SPI_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 235 | {PB11, SPI_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 236 | {PB12, SPI_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 237 | {PB13, SPI_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 238 | {PB14, SPI_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 239 | {PB15, SPI_0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 240 | {PD9, SPI_0, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 241 | {PD10, SPI_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 242 | {PD11, SPI_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 243 | {PD12, SPI_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 244 | {PD13, SPI_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 245 | {PD14, SPI_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 246 | {PD15, SPI_0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 247 | |
sahilmgandhi | 18:6a4db94011d3 | 248 | /* USART1 */ |
sahilmgandhi | 18:6a4db94011d3 | 249 | {PC6, SPI_1, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 250 | {PC7, SPI_1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 251 | {PC8, SPI_1, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 252 | {PC9, SPI_1, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 253 | {PC10, SPI_1, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 254 | {PC11, SPI_1, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 255 | {PF0, SPI_1, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 256 | {PF1, SPI_1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 257 | {PF2, SPI_1, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 258 | {PF3, SPI_1, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 259 | {PF4, SPI_1, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 260 | {PF5, SPI_1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 261 | {PF6, SPI_1, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 262 | {PF7, SPI_1, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 263 | {PA0, SPI_1, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 264 | |
sahilmgandhi | 18:6a4db94011d3 | 265 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 266 | }; |
sahilmgandhi | 18:6a4db94011d3 | 267 | |
sahilmgandhi | 18:6a4db94011d3 | 268 | const PinMap PinMap_SPI_CLK[] = { |
sahilmgandhi | 18:6a4db94011d3 | 269 | |
sahilmgandhi | 18:6a4db94011d3 | 270 | /* USART0 */ |
sahilmgandhi | 18:6a4db94011d3 | 271 | {PA0, SPI_0, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 272 | {PA1, SPI_0, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 273 | {PA2, SPI_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 274 | {PA3, SPI_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 275 | {PA4, SPI_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 276 | {PA5, SPI_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 277 | {PB11, SPI_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 278 | {PB12, SPI_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 279 | {PB13, SPI_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 280 | {PB14, SPI_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 281 | {PB15, SPI_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 282 | {PD9, SPI_0, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 283 | {PD10, SPI_0, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 284 | {PD11, SPI_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 285 | {PD12, SPI_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 286 | {PD13, SPI_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 287 | {PD14, SPI_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 288 | {PD15, SPI_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 289 | |
sahilmgandhi | 18:6a4db94011d3 | 290 | /* USART1 */ |
sahilmgandhi | 18:6a4db94011d3 | 291 | {PC6, SPI_1, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 292 | {PC7, SPI_1, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 293 | {PC8, SPI_1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 294 | {PC9, SPI_1, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 295 | {PC10, SPI_1, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 296 | {PC11, SPI_1, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 297 | {PF0, SPI_1, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 298 | {PF1, SPI_1, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 299 | {PF2, SPI_1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 300 | {PF3, SPI_1, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 301 | {PF4, SPI_1, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 302 | {PF5, SPI_1, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 303 | {PF6, SPI_1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 304 | {PF7, SPI_1, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 305 | {PA0, SPI_1, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 306 | {PA1, SPI_1, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 307 | |
sahilmgandhi | 18:6a4db94011d3 | 308 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 309 | }; |
sahilmgandhi | 18:6a4db94011d3 | 310 | |
sahilmgandhi | 18:6a4db94011d3 | 311 | const PinMap PinMap_SPI_CS[] = { |
sahilmgandhi | 18:6a4db94011d3 | 312 | |
sahilmgandhi | 18:6a4db94011d3 | 313 | /* USART0 */ |
sahilmgandhi | 18:6a4db94011d3 | 314 | {PA0, SPI_0, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 315 | {PA1, SPI_0, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 316 | {PA2, SPI_0, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 317 | {PA3, SPI_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 318 | {PA4, SPI_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 319 | {PA5, SPI_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 320 | {PB11, SPI_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 321 | {PB12, SPI_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 322 | {PB13, SPI_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 323 | {PB14, SPI_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 324 | {PB15, SPI_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 325 | {PD9, SPI_0, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 326 | {PD10, SPI_0, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 327 | {PD11, SPI_0, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 328 | {PD12, SPI_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 329 | {PD13, SPI_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 330 | {PD14, SPI_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 331 | {PD15, SPI_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 332 | |
sahilmgandhi | 18:6a4db94011d3 | 333 | /* USART1 */ |
sahilmgandhi | 18:6a4db94011d3 | 334 | {PC6, SPI_1, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 335 | {PC7, SPI_1, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 336 | {PC8, SPI_1, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 337 | {PC9, SPI_1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 338 | {PC10, SPI_1, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 339 | {PC11, SPI_1, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 340 | {PF0, SPI_1, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 341 | {PF1, SPI_1, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 342 | {PF2, SPI_1, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 343 | {PF3, SPI_1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 344 | {PF4, SPI_1, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 345 | {PF5, SPI_1, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 346 | {PF6, SPI_1, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 347 | {PF7, SPI_1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 348 | |
sahilmgandhi | 18:6a4db94011d3 | 349 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 350 | }; |
sahilmgandhi | 18:6a4db94011d3 | 351 | |
sahilmgandhi | 18:6a4db94011d3 | 352 | /************UART**************/ |
sahilmgandhi | 18:6a4db94011d3 | 353 | const PinMap PinMap_UART_TX[] = { |
sahilmgandhi | 18:6a4db94011d3 | 354 | {PA0, USART_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 355 | {PA1, USART_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 356 | {PA2, USART_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 357 | {PA3, USART_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 358 | {PA4, USART_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 359 | {PA5, USART_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 360 | {PB11, USART_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 361 | {PB12, USART_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 362 | {PB13, USART_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 363 | {PB14, USART_0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 364 | {PB15, USART_0, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 365 | {PD9, LEUART_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 366 | {PD10, LEUART_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 367 | {PD11, LEUART_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 368 | {PD12, LEUART_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 369 | {PD13, LEUART_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 370 | {PD14, LEUART_0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 371 | {PD15, LEUART_0, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 372 | |
sahilmgandhi | 18:6a4db94011d3 | 373 | {PC6, USART_1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 374 | {PC7, USART_1, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 375 | {PC8, USART_1, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 376 | {PC9, USART_1, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 377 | {PC10, USART_1, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 378 | {PC11, USART_1, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 379 | {PF0, USART_1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 380 | {PF1, USART_1, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 381 | {PF2, USART_1, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 382 | {PF3, USART_1, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 383 | {PF4, USART_1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 384 | {PF5, USART_1, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 385 | {PF6, USART_1, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 386 | {PF7, USART_1, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 387 | |
sahilmgandhi | 18:6a4db94011d3 | 388 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 389 | }; |
sahilmgandhi | 18:6a4db94011d3 | 390 | |
sahilmgandhi | 18:6a4db94011d3 | 391 | const PinMap PinMap_UART_RX[] = { |
sahilmgandhi | 18:6a4db94011d3 | 392 | {PA0, USART_0, 31}, |
sahilmgandhi | 18:6a4db94011d3 | 393 | {PA1, USART_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 394 | {PA2, USART_0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 395 | {PA3, USART_0, 2}, |
sahilmgandhi | 18:6a4db94011d3 | 396 | {PA4, USART_0, 3}, |
sahilmgandhi | 18:6a4db94011d3 | 397 | {PA5, USART_0, 4}, |
sahilmgandhi | 18:6a4db94011d3 | 398 | {PB11, USART_0, 5}, |
sahilmgandhi | 18:6a4db94011d3 | 399 | {PB12, USART_0, 6}, |
sahilmgandhi | 18:6a4db94011d3 | 400 | {PB13, USART_0, 7}, |
sahilmgandhi | 18:6a4db94011d3 | 401 | {PB14, USART_0, 8}, |
sahilmgandhi | 18:6a4db94011d3 | 402 | {PB15, USART_0, 9}, |
sahilmgandhi | 18:6a4db94011d3 | 403 | {PD9, LEUART_0, 16}, |
sahilmgandhi | 18:6a4db94011d3 | 404 | {PD10, LEUART_0, 17}, |
sahilmgandhi | 18:6a4db94011d3 | 405 | {PD11, LEUART_0, 18}, |
sahilmgandhi | 18:6a4db94011d3 | 406 | {PD12, LEUART_0, 19}, |
sahilmgandhi | 18:6a4db94011d3 | 407 | {PD13, LEUART_0, 20}, |
sahilmgandhi | 18:6a4db94011d3 | 408 | {PD14, LEUART_0, 21}, |
sahilmgandhi | 18:6a4db94011d3 | 409 | {PD15, LEUART_0, 22}, |
sahilmgandhi | 18:6a4db94011d3 | 410 | |
sahilmgandhi | 18:6a4db94011d3 | 411 | {PC6, USART_1, 10}, |
sahilmgandhi | 18:6a4db94011d3 | 412 | {PC7, USART_1, 11}, |
sahilmgandhi | 18:6a4db94011d3 | 413 | {PC8, USART_1, 12}, |
sahilmgandhi | 18:6a4db94011d3 | 414 | {PC9, USART_1, 13}, |
sahilmgandhi | 18:6a4db94011d3 | 415 | {PC10, USART_1, 14}, |
sahilmgandhi | 18:6a4db94011d3 | 416 | {PC11, USART_1, 15}, |
sahilmgandhi | 18:6a4db94011d3 | 417 | {PF0, USART_1, 23}, |
sahilmgandhi | 18:6a4db94011d3 | 418 | {PF1, USART_1, 24}, |
sahilmgandhi | 18:6a4db94011d3 | 419 | {PF2, USART_1, 25}, |
sahilmgandhi | 18:6a4db94011d3 | 420 | {PF3, USART_1, 26}, |
sahilmgandhi | 18:6a4db94011d3 | 421 | {PF4, USART_1, 27}, |
sahilmgandhi | 18:6a4db94011d3 | 422 | {PF5, USART_1, 28}, |
sahilmgandhi | 18:6a4db94011d3 | 423 | {PF6, USART_1, 29}, |
sahilmgandhi | 18:6a4db94011d3 | 424 | {PF7, USART_1, 30}, |
sahilmgandhi | 18:6a4db94011d3 | 425 | |
sahilmgandhi | 18:6a4db94011d3 | 426 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 427 | }; |