mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
targets/TARGET_ONSEMI/TARGET_NCS36510/PinNames.h@149:156823d33999, 2016-10-28 (annotated)
- Committer:
- <>
- Date:
- Fri Oct 28 11:17:30 2016 +0100
- Revision:
- 149:156823d33999
- Child:
- 161:2cc1468da177
This updates the lib to the mbed lib v128
NOTE: This release includes a restructuring of the file and directory locations and thus some
include paths in your code may need updating accordingly.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 149:156823d33999 | 1 | /** |
<> | 149:156823d33999 | 2 | ****************************************************************************** |
<> | 149:156823d33999 | 3 | * @file PinNames.h |
<> | 149:156823d33999 | 4 | * @brief Implements common PIN names for peripherals. |
<> | 149:156823d33999 | 5 | * @internal |
<> | 149:156823d33999 | 6 | * @author ON Semiconductor |
<> | 149:156823d33999 | 7 | * $Rev: 0.1 $ |
<> | 149:156823d33999 | 8 | * $Date: 2015-11-06 $ |
<> | 149:156823d33999 | 9 | ****************************************************************************** |
<> | 149:156823d33999 | 10 | * Copyright 2016 Semiconductor Components Industries LLC (d/b/a ON Semiconductor). |
<> | 149:156823d33999 | 11 | * All rights reserved. This software and/or documentation is licensed by ON Semiconductor |
<> | 149:156823d33999 | 12 | * under limited terms and conditions. The terms and conditions pertaining to the software |
<> | 149:156823d33999 | 13 | * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf |
<> | 149:156823d33999 | 14 | * (ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software) and |
<> | 149:156823d33999 | 15 | * if applicable the software license agreement. Do not use this software and/or |
<> | 149:156823d33999 | 16 | * documentation unless you have carefully read and you agree to the limited terms and |
<> | 149:156823d33999 | 17 | * conditions. By using this software and/or documentation, you agree to the limited |
<> | 149:156823d33999 | 18 | * terms and conditions. |
<> | 149:156823d33999 | 19 | * |
<> | 149:156823d33999 | 20 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
<> | 149:156823d33999 | 21 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
<> | 149:156823d33999 | 22 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
<> | 149:156823d33999 | 23 | * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, |
<> | 149:156823d33999 | 24 | * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
<> | 149:156823d33999 | 25 | * @endinternal |
<> | 149:156823d33999 | 26 | * |
<> | 149:156823d33999 | 27 | * @ingroup debug |
<> | 149:156823d33999 | 28 | */ |
<> | 149:156823d33999 | 29 | |
<> | 149:156823d33999 | 30 | |
<> | 149:156823d33999 | 31 | #ifndef PINNAME_H_ |
<> | 149:156823d33999 | 32 | #define PINNAME_H_ |
<> | 149:156823d33999 | 33 | |
<> | 149:156823d33999 | 34 | #include "types.h" |
<> | 149:156823d33999 | 35 | #ifdef __cplusplus |
<> | 149:156823d33999 | 36 | extern "C" { |
<> | 149:156823d33999 | 37 | #endif |
<> | 149:156823d33999 | 38 | |
<> | 149:156823d33999 | 39 | typedef enum { |
<> | 149:156823d33999 | 40 | GPIO0 = 0, |
<> | 149:156823d33999 | 41 | GPIO1, |
<> | 149:156823d33999 | 42 | GPIO2, |
<> | 149:156823d33999 | 43 | GPIO3, |
<> | 149:156823d33999 | 44 | GPIO4, |
<> | 149:156823d33999 | 45 | GPIO5, |
<> | 149:156823d33999 | 46 | GPIO6, |
<> | 149:156823d33999 | 47 | GPIO7, |
<> | 149:156823d33999 | 48 | GPIO8, |
<> | 149:156823d33999 | 49 | GPIO9, |
<> | 149:156823d33999 | 50 | GPIO10, |
<> | 149:156823d33999 | 51 | GPIO11, |
<> | 149:156823d33999 | 52 | GPIO12, |
<> | 149:156823d33999 | 53 | GPIO13, |
<> | 149:156823d33999 | 54 | GPIO14, |
<> | 149:156823d33999 | 55 | GPIO15, |
<> | 149:156823d33999 | 56 | GPIO16, |
<> | 149:156823d33999 | 57 | GPIO17, |
<> | 149:156823d33999 | 58 | A0, |
<> | 149:156823d33999 | 59 | A1, |
<> | 149:156823d33999 | 60 | A2, |
<> | 149:156823d33999 | 61 | A3, |
<> | 149:156823d33999 | 62 | UART1_TX = GPIO0, |
<> | 149:156823d33999 | 63 | UART1_RX = GPIO1, |
<> | 149:156823d33999 | 64 | UART2_TX = GPIO8, |
<> | 149:156823d33999 | 65 | UART2_RX = GPIO9, |
<> | 149:156823d33999 | 66 | |
<> | 149:156823d33999 | 67 | I2C1_SCLK_1 = GPIO2, |
<> | 149:156823d33999 | 68 | I2C1_SDATA_1 = GPIO3, |
<> | 149:156823d33999 | 69 | I2C1_SCLK_2 = GPIO5, |
<> | 149:156823d33999 | 70 | I2C1_SDATA_2 = GPIO4, |
<> | 149:156823d33999 | 71 | I2C1_SCLK = I2C1_SCLK_1, /*Default*/ |
<> | 149:156823d33999 | 72 | I2C1_SDATA = I2C1_SDATA_1, /*Default*/ |
<> | 149:156823d33999 | 73 | |
<> | 149:156823d33999 | 74 | I2C2_SCLK_1 = GPIO14, |
<> | 149:156823d33999 | 75 | I2C2_SDATA_1 = GPIO15, |
<> | 149:156823d33999 | 76 | I2C2_SCLK_2 = GPIO17, |
<> | 149:156823d33999 | 77 | I2C2_SDATA_2 = GPIO16, |
<> | 149:156823d33999 | 78 | I2C2_SCLK = I2C2_SCLK_2, /*Default*/ |
<> | 149:156823d33999 | 79 | I2C2_SDATA = I2C2_SDATA_2, /*Default*/ |
<> | 149:156823d33999 | 80 | I2C_SCL = I2C1_SCLK_1, /*Default*/ |
<> | 149:156823d33999 | 81 | I2C_SDA = I2C1_SDATA_1, /*Default*/ |
<> | 149:156823d33999 | 82 | |
<> | 149:156823d33999 | 83 | /* SPI 1 with 1st set of CROSS BAR */ |
<> | 149:156823d33999 | 84 | SPI1_SSNO0_1 = GPIO0, |
<> | 149:156823d33999 | 85 | SPI1_SSNO1_1 = GPIO1, |
<> | 149:156823d33999 | 86 | SPI1_SSNO2_1 = GPIO2, |
<> | 149:156823d33999 | 87 | SPI1_SSNO3_1 = GPIO3, |
<> | 149:156823d33999 | 88 | |
<> | 149:156823d33999 | 89 | /* SPI 1 with 2st set of CROSS BAR */ |
<> | 149:156823d33999 | 90 | SPI1_SCLK_2 = GPIO4, |
<> | 149:156823d33999 | 91 | SPI1_SDATAO_2 = GPIO5, |
<> | 149:156823d33999 | 92 | SPI1_SDATAI_2 = GPIO6, |
<> | 149:156823d33999 | 93 | SPI1_SSNI_2 = GPIO7, |
<> | 149:156823d33999 | 94 | SPI1_SSNO0_2 = GPIO8, |
<> | 149:156823d33999 | 95 | SPI1_SSNO1_2 = GPIO9, |
<> | 149:156823d33999 | 96 | SPI1_SSNO2_2 = GPIO10, |
<> | 149:156823d33999 | 97 | |
<> | 149:156823d33999 | 98 | SPI1_SCLK = SPI1_SCLK_2, /*Default*/ |
<> | 149:156823d33999 | 99 | SPI1_SDATAO = SPI1_SDATAO_2, /*Default*/ |
<> | 149:156823d33999 | 100 | SPI1_SDATAI = SPI1_SDATAI_2, /*Default*/ |
<> | 149:156823d33999 | 101 | SPI1_SSNI = SPI1_SSNI_2, /*Default*/ |
<> | 149:156823d33999 | 102 | SPI1_SSNO0 = SPI1_SSNO0_2, /*Default*/ |
<> | 149:156823d33999 | 103 | SPI1_SSNO1 = SPI1_SSNO1_2, /*Default*/ |
<> | 149:156823d33999 | 104 | SPI1_SSNO2 = SPI1_SSNO2_2, /*Default*/ |
<> | 149:156823d33999 | 105 | |
<> | 149:156823d33999 | 106 | /* SPI 1 with 3rd set of CROSS BAR */ |
<> | 149:156823d33999 | 107 | SPI1_SCLK_3 = GPIO8, |
<> | 149:156823d33999 | 108 | SPI1_SDATAO_3 = GPIO9, |
<> | 149:156823d33999 | 109 | SPI1_SDATAI_3 = GPIO10, |
<> | 149:156823d33999 | 110 | |
<> | 149:156823d33999 | 111 | /* SPI 2 */ |
<> | 149:156823d33999 | 112 | SPI2_SCLK = GPIO14, |
<> | 149:156823d33999 | 113 | SPI2_SDATAO = GPIO15, |
<> | 149:156823d33999 | 114 | SPI2_SDATAI = GPIO16, |
<> | 149:156823d33999 | 115 | SPI2_SSNI = GPIO17, |
<> | 149:156823d33999 | 116 | SPI2_SSNO0 = GPIO17, |
<> | 149:156823d33999 | 117 | |
<> | 149:156823d33999 | 118 | // Generic signals namings |
<> | 149:156823d33999 | 119 | LED1 = GPIO4, |
<> | 149:156823d33999 | 120 | LED2 = GPIO6, |
<> | 149:156823d33999 | 121 | LED3 = GPIO5, |
<> | 149:156823d33999 | 122 | LED4 = (int)0xFFFFFFFF, |
<> | 149:156823d33999 | 123 | LED5 = (int)0xFFFFFFFF, |
<> | 149:156823d33999 | 124 | LED_GREEN = GPIO4, |
<> | 149:156823d33999 | 125 | LED_YELLOW = GPIO6, |
<> | 149:156823d33999 | 126 | LED_BLUE = GPIO5, |
<> | 149:156823d33999 | 127 | USER_BUTTON = GPIO7, /*NEW connection on NCS36510-RF Rev 1.1 - Alias of SW1 */ |
<> | 149:156823d33999 | 128 | SW1 = GPIO7, /*NEW connection on NCS36510-RF Rev 1.1 */ |
<> | 149:156823d33999 | 129 | SW2 = GPIO10, /*NEW connection on NCS36510-RF Rev 1.1 */ |
<> | 149:156823d33999 | 130 | SERIAL_TX = GPIO0, |
<> | 149:156823d33999 | 131 | SERIAL_RX = GPIO1, |
<> | 149:156823d33999 | 132 | USBTX = GPIO0, |
<> | 149:156823d33999 | 133 | USBRX = GPIO1, |
<> | 149:156823d33999 | 134 | D0 = GPIO9, |
<> | 149:156823d33999 | 135 | D1 = GPIO8, |
<> | 149:156823d33999 | 136 | D2 = GPIO4, |
<> | 149:156823d33999 | 137 | D3 = GPIO6, |
<> | 149:156823d33999 | 138 | D4 = GPIO5, |
<> | 149:156823d33999 | 139 | D5 = GPIO7, |
<> | 149:156823d33999 | 140 | D6 = GPIO10, |
<> | 149:156823d33999 | 141 | D7 = (int)0xFFFFFFFF, |
<> | 149:156823d33999 | 142 | D8 = (int)0xFFFFFFFF, |
<> | 149:156823d33999 | 143 | D9 = (int)0xFFFFFFFF, |
<> | 149:156823d33999 | 144 | D10 = GPIO17, |
<> | 149:156823d33999 | 145 | D11 = GPIO15, |
<> | 149:156823d33999 | 146 | D12 = GPIO16, |
<> | 149:156823d33999 | 147 | D13 = GPIO14, |
<> | 149:156823d33999 | 148 | D14 = GPIO3, |
<> | 149:156823d33999 | 149 | D15 = GPIO2, |
<> | 149:156823d33999 | 150 | NC = (int)0xFFFFFFFF |
<> | 149:156823d33999 | 151 | } PinName; |
<> | 149:156823d33999 | 152 | |
<> | 149:156823d33999 | 153 | typedef enum { |
<> | 149:156823d33999 | 154 | PIN_INPUT, |
<> | 149:156823d33999 | 155 | PIN_OUTPUT, |
<> | 149:156823d33999 | 156 | |
<> | 149:156823d33999 | 157 | } PinDirection; |
<> | 149:156823d33999 | 158 | |
<> | 149:156823d33999 | 159 | typedef enum { |
<> | 149:156823d33999 | 160 | PushPullPullDown = 0, |
<> | 149:156823d33999 | 161 | PushPullNoPull = 1, |
<> | 149:156823d33999 | 162 | PushPullPullUp = 2, |
<> | 149:156823d33999 | 163 | OpenDrainPullDown = 3, |
<> | 149:156823d33999 | 164 | OpenDrainNoPull = 4, |
<> | 149:156823d33999 | 165 | OpenDrainPullUp = 5, |
<> | 149:156823d33999 | 166 | PullNone = PushPullNoPull, |
<> | 149:156823d33999 | 167 | PullUp = PushPullPullUp, |
<> | 149:156823d33999 | 168 | PullDown = PushPullPullDown, |
<> | 149:156823d33999 | 169 | OpenDrain = OpenDrainPullUp, |
<> | 149:156823d33999 | 170 | PullDefault = PullNone |
<> | 149:156823d33999 | 171 | |
<> | 149:156823d33999 | 172 | } PinMode; |
<> | 149:156823d33999 | 173 | |
<> | 149:156823d33999 | 174 | #ifdef __cplusplus |
<> | 149:156823d33999 | 175 | } |
<> | 149:156823d33999 | 176 | #endif |
<> | 149:156823d33999 | 177 | |
<> | 149:156823d33999 | 178 | #endif //PINNAME_H_ |