mbed-os
Fork of mbed-os by
targets/TARGET_ONSEMI/TARGET_NCS36510/PeripheralPins.c@0:f269e3021894, 2016-10-23 (annotated)
- Committer:
- elessair
- Date:
- Sun Oct 23 15:10:02 2016 +0000
- Revision:
- 0:f269e3021894
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
elessair | 0:f269e3021894 | 1 | /* mbed Microcontroller Library |
elessair | 0:f269e3021894 | 2 | * Copyright (c) 2006-2013 ARM Limited |
elessair | 0:f269e3021894 | 3 | * |
elessair | 0:f269e3021894 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
elessair | 0:f269e3021894 | 5 | * you may not use this file except in compliance with the License. |
elessair | 0:f269e3021894 | 6 | * You may obtain a copy of the License at |
elessair | 0:f269e3021894 | 7 | * |
elessair | 0:f269e3021894 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
elessair | 0:f269e3021894 | 9 | * |
elessair | 0:f269e3021894 | 10 | * Unless required by applicable law or agreed to in writing, software |
elessair | 0:f269e3021894 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
elessair | 0:f269e3021894 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
elessair | 0:f269e3021894 | 13 | * See the License for the specific language governing permissions and |
elessair | 0:f269e3021894 | 14 | * limitations under the License. |
elessair | 0:f269e3021894 | 15 | */ |
elessair | 0:f269e3021894 | 16 | |
elessair | 0:f269e3021894 | 17 | /*todo: determine how function argument is used */ |
elessair | 0:f269e3021894 | 18 | |
elessair | 0:f269e3021894 | 19 | #include "PeripheralPins.h" |
elessair | 0:f269e3021894 | 20 | |
elessair | 0:f269e3021894 | 21 | /************ADC***************/ |
elessair | 0:f269e3021894 | 22 | const PinMap PinMap_ADC[] = { |
elessair | 0:f269e3021894 | 23 | {A0, ADC_0, 0}, |
elessair | 0:f269e3021894 | 24 | {A1, ADC_0, 0}, |
elessair | 0:f269e3021894 | 25 | {A2, ADC_0, 0}, |
elessair | 0:f269e3021894 | 26 | {A3, ADC_0, 0}, |
elessair | 0:f269e3021894 | 27 | {NC , NC , 0} |
elessair | 0:f269e3021894 | 28 | }; |
elessair | 0:f269e3021894 | 29 | |
elessair | 0:f269e3021894 | 30 | /************I2C***************/ |
elessair | 0:f269e3021894 | 31 | const PinMap PinMap_I2C_SDA[] = { |
elessair | 0:f269e3021894 | 32 | {GPIO3, I2C_0, 5}, |
elessair | 0:f269e3021894 | 33 | {GPIO4, I2C_0, 5}, |
elessair | 0:f269e3021894 | 34 | {GPIO10, I2C_0, 5}, |
elessair | 0:f269e3021894 | 35 | {GPIO12, I2C_0, 5}, |
elessair | 0:f269e3021894 | 36 | {GPIO15, I2C_1, 5}, |
elessair | 0:f269e3021894 | 37 | {GPIO16, I2C_1, 5}, |
elessair | 0:f269e3021894 | 38 | {NC , NC , 0} |
elessair | 0:f269e3021894 | 39 | }; |
elessair | 0:f269e3021894 | 40 | |
elessair | 0:f269e3021894 | 41 | const PinMap PinMap_I2C_SCL[] = { |
elessair | 0:f269e3021894 | 42 | {GPIO2, I2C_0, 5}, |
elessair | 0:f269e3021894 | 43 | {GPIO5, I2C_0, 5}, |
elessair | 0:f269e3021894 | 44 | {GPIO11, I2C_0, 5}, |
elessair | 0:f269e3021894 | 45 | {GPIO13, I2C_0, 5}, |
elessair | 0:f269e3021894 | 46 | {GPIO14, I2C_1, 5}, |
elessair | 0:f269e3021894 | 47 | {GPIO17, I2C_1, 5}, |
elessair | 0:f269e3021894 | 48 | {NC , NC , 0} |
elessair | 0:f269e3021894 | 49 | }; |
elessair | 0:f269e3021894 | 50 | |
elessair | 0:f269e3021894 | 51 | /************UART***************/ |
elessair | 0:f269e3021894 | 52 | const PinMap PinMap_UART_TX[] = { |
elessair | 0:f269e3021894 | 53 | {GPIO0, UART_0, 7}, |
elessair | 0:f269e3021894 | 54 | {GPIO8, UART_1, 7}, |
elessair | 0:f269e3021894 | 55 | {NC , NC , 0} |
elessair | 0:f269e3021894 | 56 | }; |
elessair | 0:f269e3021894 | 57 | |
elessair | 0:f269e3021894 | 58 | const PinMap PinMap_UART_RX[] = { |
elessair | 0:f269e3021894 | 59 | {GPIO1, UART_0, 7}, |
elessair | 0:f269e3021894 | 60 | {GPIO9, UART_1, 7}, |
elessair | 0:f269e3021894 | 61 | {NC , NC , 0} |
elessair | 0:f269e3021894 | 62 | }; |
elessair | 0:f269e3021894 | 63 | |
elessair | 0:f269e3021894 | 64 | /************SPI***************/ |
elessair | 0:f269e3021894 | 65 | const PinMap PinMap_SPI_SCLK[] = { |
elessair | 0:f269e3021894 | 66 | /*todo: other pins are possible, need to add */ |
elessair | 0:f269e3021894 | 67 | {SPI1_SCLK_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 68 | {SPI1_SCLK_3, SPI_0, 6}, |
elessair | 0:f269e3021894 | 69 | {SPI2_SCLK, SPI_1, 6}, |
elessair | 0:f269e3021894 | 70 | {NC, NC, 0} |
elessair | 0:f269e3021894 | 71 | }; |
elessair | 0:f269e3021894 | 72 | |
elessair | 0:f269e3021894 | 73 | const PinMap PinMap_SPI_MOSI[] = { |
elessair | 0:f269e3021894 | 74 | /*todo: other pins are possible, need to add */ |
elessair | 0:f269e3021894 | 75 | {SPI1_SDATAO_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 76 | {SPI1_SDATAO_3, SPI_0, 6}, |
elessair | 0:f269e3021894 | 77 | {SPI2_SDATAO, SPI_1, 6}, |
elessair | 0:f269e3021894 | 78 | {NC, NC, 0} |
elessair | 0:f269e3021894 | 79 | }; |
elessair | 0:f269e3021894 | 80 | |
elessair | 0:f269e3021894 | 81 | const PinMap PinMap_SPI_MISO[] = { |
elessair | 0:f269e3021894 | 82 | /*todo: other pins are possible, need to add */ |
elessair | 0:f269e3021894 | 83 | {SPI1_SDATAI_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 84 | {SPI1_SDATAI_3, SPI_0, 6}, |
elessair | 0:f269e3021894 | 85 | {SPI2_SDATAI, SPI_1, 6}, |
elessair | 0:f269e3021894 | 86 | {NC, NC, 0} |
elessair | 0:f269e3021894 | 87 | }; |
elessair | 0:f269e3021894 | 88 | |
elessair | 0:f269e3021894 | 89 | const PinMap PinMap_SPI_SSEL[] = { |
elessair | 0:f269e3021894 | 90 | /*todo: other pins are possible, need to add */ |
elessair | 0:f269e3021894 | 91 | /* TODO what about SSNO */ |
elessair | 0:f269e3021894 | 92 | {SPI1_SSNO0_1, SPI_0, 6}, |
elessair | 0:f269e3021894 | 93 | {SPI1_SSNO1_1, SPI_0, 6}, |
elessair | 0:f269e3021894 | 94 | {SPI1_SSNO2_1, SPI_0, 6}, |
elessair | 0:f269e3021894 | 95 | {SPI1_SSNO3_1, SPI_0, 6}, |
elessair | 0:f269e3021894 | 96 | {SPI1_SSNI_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 97 | {SPI1_SSNO0_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 98 | {SPI1_SSNO1_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 99 | {SPI1_SSNO2_2, SPI_0, 6}, |
elessair | 0:f269e3021894 | 100 | {SPI2_SSNI, SPI_1, 6}, |
elessair | 0:f269e3021894 | 101 | {SPI2_SSNO0, SPI_1, 6}, |
elessair | 0:f269e3021894 | 102 | {NC, NC, 0} |
elessair | 0:f269e3021894 | 103 | }; |
elessair | 0:f269e3021894 | 104 | |
elessair | 0:f269e3021894 | 105 | |
elessair | 0:f269e3021894 | 106 | const PinMap PinMap_PWM[] = { |
elessair | 0:f269e3021894 | 107 | |
elessair | 0:f269e3021894 | 108 | {GPIO6 , PWM_0 , 4}, |
elessair | 0:f269e3021894 | 109 | {GPIO7 , PWM_0 , 4}, |
elessair | 0:f269e3021894 | 110 | {GPIO9 , PWM_0 , 4}, |
elessair | 0:f269e3021894 | 111 | {GPIO12 , PWM_0 , 4}, |
elessair | 0:f269e3021894 | 112 | {GPIO13 , PWM_0 , 4}, |
elessair | 0:f269e3021894 | 113 | {NC , NC , 0} |
elessair | 0:f269e3021894 | 114 | }; |