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