Mouse code for the MacroRat
mbed-dev/targets/TARGET_Atmel/TARGET_SAM_CortexM4/TARGET_SAMG55J19/PeripheralPins.c@18:6a4db94011d3, 2017-05-14 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sun May 14 23:18:57 2017 +0000
- Revision:
- 18:6a4db94011d3
Publishing again
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /* mbed Microcontroller Library |
sahilmgandhi | 18:6a4db94011d3 | 2 | * Copyright (c) 2006-2013 ARM Limited |
sahilmgandhi | 18:6a4db94011d3 | 3 | * |
sahilmgandhi | 18:6a4db94011d3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
sahilmgandhi | 18:6a4db94011d3 | 5 | * you may not use this file except in compliance with the License. |
sahilmgandhi | 18:6a4db94011d3 | 6 | * You may obtain a copy of the License at |
sahilmgandhi | 18:6a4db94011d3 | 7 | * |
sahilmgandhi | 18:6a4db94011d3 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 9 | * |
sahilmgandhi | 18:6a4db94011d3 | 10 | * Unless required by applicable law or agreed to in writing, software |
sahilmgandhi | 18:6a4db94011d3 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
sahilmgandhi | 18:6a4db94011d3 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sahilmgandhi | 18:6a4db94011d3 | 13 | * See the License for the specific language governing permissions and |
sahilmgandhi | 18:6a4db94011d3 | 14 | * limitations under the License. |
sahilmgandhi | 18:6a4db94011d3 | 15 | */ |
sahilmgandhi | 18:6a4db94011d3 | 16 | |
sahilmgandhi | 18:6a4db94011d3 | 17 | #include "PeripheralPins.h" |
sahilmgandhi | 18:6a4db94011d3 | 18 | |
sahilmgandhi | 18:6a4db94011d3 | 19 | /************ADC***************/ |
sahilmgandhi | 18:6a4db94011d3 | 20 | const PinMap PinMap_ADC[] = { |
sahilmgandhi | 18:6a4db94011d3 | 21 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 22 | {PA17, ADC_0, NC}, /*NC in mux posiotn since it is a extra function and doesnt have a name*/ |
sahilmgandhi | 18:6a4db94011d3 | 23 | {PA18, ADC_1, NC}, /*Pin is multiplexed to the extra function once the corresponding ADC channel is enabled*/ |
sahilmgandhi | 18:6a4db94011d3 | 24 | {PA19, ADC_2, NC}, |
sahilmgandhi | 18:6a4db94011d3 | 25 | {PA20, ADC_3, NC}, |
sahilmgandhi | 18:6a4db94011d3 | 26 | {PB00, ADC_4, NC}, |
sahilmgandhi | 18:6a4db94011d3 | 27 | {PB01, ADC_5, NC}, |
sahilmgandhi | 18:6a4db94011d3 | 28 | {PB02, ADC_6, NC}, |
sahilmgandhi | 18:6a4db94011d3 | 29 | {PB03, ADC_7, NC}, |
sahilmgandhi | 18:6a4db94011d3 | 30 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 31 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 32 | }; |
sahilmgandhi | 18:6a4db94011d3 | 33 | |
sahilmgandhi | 18:6a4db94011d3 | 34 | /************UART***************/ |
sahilmgandhi | 18:6a4db94011d3 | 35 | const PinMap PinMap_UART_TX[] = { |
sahilmgandhi | 18:6a4db94011d3 | 36 | {PA03, UART_3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 37 | {PA06, UART_2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 38 | {PA10, UART_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 39 | {PA13, UART_5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 40 | {PA28, UART_7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 41 | {PB00, UART_6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 42 | {PB03, UART_1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 43 | {PB08, UART_4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 44 | {PB10, UART_4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 45 | {PB10, UART_6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 46 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 47 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 48 | }; |
sahilmgandhi | 18:6a4db94011d3 | 49 | |
sahilmgandhi | 18:6a4db94011d3 | 50 | const PinMap PinMap_UART_RX[] = { |
sahilmgandhi | 18:6a4db94011d3 | 51 | {PA04, UART_3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 52 | {PA05, UART_2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 53 | {PA09, UART_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 54 | {PA12, UART_5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 55 | {PA27, UART_7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 56 | {PB01, UART_6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 57 | {PB02, UART_1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 58 | {PB09, UART_4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 59 | {PB11, UART_4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 60 | {PB11, UART_6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 61 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 62 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 63 | }; |
sahilmgandhi | 18:6a4db94011d3 | 64 | |
sahilmgandhi | 18:6a4db94011d3 | 65 | const PinMap PinMap_UART_CTS[] = { |
sahilmgandhi | 18:6a4db94011d3 | 66 | {PA11, UART_5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 67 | {PA16, UART_2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 68 | {PA25, UART_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 69 | {PA28, UART_1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 70 | {PA30, UART_7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 71 | {PB08, UART_4, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 72 | {PB14, UART_3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 73 | {PB14, UART_6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 74 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 75 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 76 | }; |
sahilmgandhi | 18:6a4db94011d3 | 77 | |
sahilmgandhi | 18:6a4db94011d3 | 78 | const PinMap PinMap_UART_RTS[] = { |
sahilmgandhi | 18:6a4db94011d3 | 79 | {PA15, UART_2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 80 | {PA26, UART_0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 81 | {PA29, UART_1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 82 | {PA31, UART_7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 83 | {PB02, UART_5, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 84 | {PB09, UART_4, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 85 | {PB15, UART_3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 86 | {PB15, UART_6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 87 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 88 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 89 | }; |
sahilmgandhi | 18:6a4db94011d3 | 90 | |
sahilmgandhi | 18:6a4db94011d3 | 91 | /************SPI***************/ |
sahilmgandhi | 18:6a4db94011d3 | 92 | const PinMap PinMap_SPI_SCLK[] = { |
sahilmgandhi | 18:6a4db94011d3 | 93 | {PB00, (int)SPI0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 94 | {PA27, (int)SPI1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 95 | {PA15, (int)SPI2, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 96 | {PA24, (int)SPI2, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 97 | {PB13, (int)SPI3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 98 | {PB01, (int)SPI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 99 | {PA14, (int)SPI5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 100 | {PB13, (int)SPI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 101 | {PA29, (int)SPI7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 102 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 103 | {NC , (int)NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 104 | }; |
sahilmgandhi | 18:6a4db94011d3 | 105 | |
sahilmgandhi | 18:6a4db94011d3 | 106 | const PinMap PinMap_SPI_MOSI[] = { |
sahilmgandhi | 18:6a4db94011d3 | 107 | {PA10, (int)SPI0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 108 | {PB03, (int)SPI1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 109 | {PA06, (int)SPI2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 110 | {PA03, (int)SPI3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 111 | {PB08, (int)SPI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 112 | {PB10, (int)SPI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 113 | {PA13, (int)SPI5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 114 | {PB00, (int)SPI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 115 | {PB10, (int)SPI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 116 | {PA28, (int)SPI7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 117 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 118 | {NC , (int)NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 119 | }; |
sahilmgandhi | 18:6a4db94011d3 | 120 | |
sahilmgandhi | 18:6a4db94011d3 | 121 | const PinMap PinMap_SPI_MISO[] = { |
sahilmgandhi | 18:6a4db94011d3 | 122 | {PA09, (int)SPI0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 123 | {PB02, (int)SPI1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 124 | {PA05, (int)SPI2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 125 | {PA04, (int)SPI3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 126 | {PB09, (int)SPI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 127 | {PB11, (int)SPI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 128 | {PA12, (int)SPI5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 129 | {PB01, (int)SPI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 130 | {PB11, (int)SPI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 131 | {PA27, (int)SPI7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 132 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 133 | {NC , (int)NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 134 | }; |
sahilmgandhi | 18:6a4db94011d3 | 135 | |
sahilmgandhi | 18:6a4db94011d3 | 136 | /************I2C***************/ |
sahilmgandhi | 18:6a4db94011d3 | 137 | const PinMap PinMap_I2C_SDA[] = { |
sahilmgandhi | 18:6a4db94011d3 | 138 | {PA10, (int)TWI0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 139 | {PB03, (int)TWI1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 140 | {PA06, (int)TWI2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 141 | {PA03, (int)TWI3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 142 | {PB08, (int)TWI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 143 | {PB10, (int)TWI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 144 | {PB10, (int)TWI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 145 | {PA13, (int)TWI5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 146 | {PB00, (int)TWI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 147 | {PB10, (int)TWI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 148 | {PA28, (int)TWI7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 149 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 150 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 151 | }; |
sahilmgandhi | 18:6a4db94011d3 | 152 | |
sahilmgandhi | 18:6a4db94011d3 | 153 | const PinMap PinMap_I2C_SCL[] = { |
sahilmgandhi | 18:6a4db94011d3 | 154 | {PA09, (int)TWI0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 155 | {PB02, (int)TWI1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 156 | {PA05, (int)TWI2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 157 | {PA04, (int)TWI3, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 158 | {PB09, (int)TWI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 159 | {PB11, (int)TWI4, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 160 | {PA12, (int)TWI5, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 161 | {PB01, (int)TWI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 162 | {PB11, (int)TWI6, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 163 | {PA27, (int)TWI7, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 164 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 165 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 166 | }; |
sahilmgandhi | 18:6a4db94011d3 | 167 | |
sahilmgandhi | 18:6a4db94011d3 | 168 | /************PWM***************/ |
sahilmgandhi | 18:6a4db94011d3 | 169 | const PinMap PinMap_PWM[] = { |
sahilmgandhi | 18:6a4db94011d3 | 170 | {PA00, (int)TC0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 171 | {PA23, (int)TC0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 172 | {PA21, (int)TC0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 173 | {PA01, (int)TC0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 174 | {PA16, (int)TC0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 175 | {PA22, (int)TC0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 176 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 177 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 178 | }; |
sahilmgandhi | 18:6a4db94011d3 | 179 | |
sahilmgandhi | 18:6a4db94011d3 | 180 | /************PWM***************/ |
sahilmgandhi | 18:6a4db94011d3 | 181 | const PinMap PinMap_PWM_IO_Line[] = { |
sahilmgandhi | 18:6a4db94011d3 | 182 | {PA00, 0, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 183 | {PA23, 1, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 184 | {PA21, 2, 0}, |
sahilmgandhi | 18:6a4db94011d3 | 185 | {PA01, 0, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 186 | {PA16, 1, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 187 | {PA22, 2, 1}, |
sahilmgandhi | 18:6a4db94011d3 | 188 | /* Not connected */ |
sahilmgandhi | 18:6a4db94011d3 | 189 | {NC , NC , NC} |
sahilmgandhi | 18:6a4db94011d3 | 190 | }; |
sahilmgandhi | 18:6a4db94011d3 | 191 | |
sahilmgandhi | 18:6a4db94011d3 | 192 | |
sahilmgandhi | 18:6a4db94011d3 | 193 | |
sahilmgandhi | 18:6a4db94011d3 | 194 | |
sahilmgandhi | 18:6a4db94011d3 | 195 |