mbed library sources. Supersedes mbed-src.

Fork of mbed-dev by Umar Naeem

Committer:
<>
Date:
Thu Mar 30 13:45:57 2017 +0100
Revision:
161:2cc1468da177
Parent:
149:156823d33999
Child:
164:289d4deac6e4
This updates the lib to the mbed lib v139

Who changed what in which revision?

UserRevisionLine numberNew 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 {
<> 161:2cc1468da177 40 NC = (int)0xFFFFFFFF,
<> 149:156823d33999 41 GPIO0 = 0,
<> 149:156823d33999 42 GPIO1,
<> 149:156823d33999 43 GPIO2,
<> 149:156823d33999 44 GPIO3,
<> 149:156823d33999 45 GPIO4,
<> 149:156823d33999 46 GPIO5,
<> 149:156823d33999 47 GPIO6,
<> 149:156823d33999 48 GPIO7,
<> 149:156823d33999 49 GPIO8,
<> 149:156823d33999 50 GPIO9,
<> 149:156823d33999 51 GPIO10,
<> 149:156823d33999 52 GPIO11,
<> 149:156823d33999 53 GPIO12,
<> 149:156823d33999 54 GPIO13,
<> 149:156823d33999 55 GPIO14,
<> 149:156823d33999 56 GPIO15,
<> 149:156823d33999 57 GPIO16,
<> 149:156823d33999 58 GPIO17,
<> 149:156823d33999 59 A0,
<> 149:156823d33999 60 A1,
<> 149:156823d33999 61 A2,
<> 149:156823d33999 62 A3,
<> 161:2cc1468da177 63 A4 = NC,
<> 161:2cc1468da177 64 A5 = NC,
<> 149:156823d33999 65 UART1_TX = GPIO0,
<> 149:156823d33999 66 UART1_RX = GPIO1,
<> 149:156823d33999 67 UART2_TX = GPIO8,
<> 149:156823d33999 68 UART2_RX = GPIO9,
<> 149:156823d33999 69
<> 149:156823d33999 70 I2C1_SCLK_1 = GPIO2,
<> 149:156823d33999 71 I2C1_SDATA_1 = GPIO3,
<> 149:156823d33999 72 I2C1_SCLK_2 = GPIO5,
<> 149:156823d33999 73 I2C1_SDATA_2 = GPIO4,
<> 149:156823d33999 74 I2C1_SCLK = I2C1_SCLK_1, /*Default*/
<> 149:156823d33999 75 I2C1_SDATA = I2C1_SDATA_1, /*Default*/
<> 149:156823d33999 76
<> 149:156823d33999 77 I2C2_SCLK_1 = GPIO14,
<> 149:156823d33999 78 I2C2_SDATA_1 = GPIO15,
<> 149:156823d33999 79 I2C2_SCLK_2 = GPIO17,
<> 149:156823d33999 80 I2C2_SDATA_2 = GPIO16,
<> 149:156823d33999 81 I2C2_SCLK = I2C2_SCLK_2, /*Default*/
<> 149:156823d33999 82 I2C2_SDATA = I2C2_SDATA_2, /*Default*/
<> 149:156823d33999 83 I2C_SCL = I2C1_SCLK_1, /*Default*/
<> 149:156823d33999 84 I2C_SDA = I2C1_SDATA_1, /*Default*/
<> 149:156823d33999 85
<> 149:156823d33999 86 /* SPI 1 with 1st set of CROSS BAR */
<> 149:156823d33999 87 SPI1_SSNO0_1 = GPIO0,
<> 149:156823d33999 88 SPI1_SSNO1_1 = GPIO1,
<> 149:156823d33999 89 SPI1_SSNO2_1 = GPIO2,
<> 149:156823d33999 90 SPI1_SSNO3_1 = GPIO3,
<> 149:156823d33999 91
<> 149:156823d33999 92 /* SPI 1 with 2st set of CROSS BAR */
<> 149:156823d33999 93 SPI1_SCLK_2 = GPIO4,
<> 149:156823d33999 94 SPI1_SDATAO_2 = GPIO5,
<> 149:156823d33999 95 SPI1_SDATAI_2 = GPIO6,
<> 149:156823d33999 96 SPI1_SSNI_2 = GPIO7,
<> 149:156823d33999 97 SPI1_SSNO0_2 = GPIO8,
<> 149:156823d33999 98 SPI1_SSNO1_2 = GPIO9,
<> 149:156823d33999 99 SPI1_SSNO2_2 = GPIO10,
<> 149:156823d33999 100
<> 149:156823d33999 101 SPI1_SCLK = SPI1_SCLK_2, /*Default*/
<> 149:156823d33999 102 SPI1_SDATAO = SPI1_SDATAO_2, /*Default*/
<> 149:156823d33999 103 SPI1_SDATAI = SPI1_SDATAI_2, /*Default*/
<> 149:156823d33999 104 SPI1_SSNI = SPI1_SSNI_2, /*Default*/
<> 149:156823d33999 105 SPI1_SSNO0 = SPI1_SSNO0_2, /*Default*/
<> 149:156823d33999 106 SPI1_SSNO1 = SPI1_SSNO1_2, /*Default*/
<> 149:156823d33999 107 SPI1_SSNO2 = SPI1_SSNO2_2, /*Default*/
<> 149:156823d33999 108
<> 149:156823d33999 109 /* SPI 1 with 3rd set of CROSS BAR */
<> 149:156823d33999 110 SPI1_SCLK_3 = GPIO8,
<> 149:156823d33999 111 SPI1_SDATAO_3 = GPIO9,
<> 149:156823d33999 112 SPI1_SDATAI_3 = GPIO10,
<> 149:156823d33999 113
<> 149:156823d33999 114 /* SPI 2 */
<> 149:156823d33999 115 SPI2_SCLK = GPIO14,
<> 149:156823d33999 116 SPI2_SDATAO = GPIO15,
<> 149:156823d33999 117 SPI2_SDATAI = GPIO16,
<> 149:156823d33999 118 SPI2_SSNI = GPIO17,
<> 149:156823d33999 119 SPI2_SSNO0 = GPIO17,
<> 149:156823d33999 120
<> 149:156823d33999 121 // Generic signals namings
<> 149:156823d33999 122 LED1 = GPIO4,
<> 149:156823d33999 123 LED2 = GPIO6,
<> 149:156823d33999 124 LED3 = GPIO5,
<> 149:156823d33999 125 LED4 = (int)0xFFFFFFFF,
<> 149:156823d33999 126 LED5 = (int)0xFFFFFFFF,
<> 149:156823d33999 127 LED_GREEN = GPIO4,
<> 149:156823d33999 128 LED_YELLOW = GPIO6,
<> 149:156823d33999 129 LED_BLUE = GPIO5,
<> 149:156823d33999 130 USER_BUTTON = GPIO7, /*NEW connection on NCS36510-RF Rev 1.1 - Alias of SW1 */
<> 149:156823d33999 131 SW1 = GPIO7, /*NEW connection on NCS36510-RF Rev 1.1 */
<> 149:156823d33999 132 SW2 = GPIO10, /*NEW connection on NCS36510-RF Rev 1.1 */
<> 149:156823d33999 133 SERIAL_TX = GPIO0,
<> 149:156823d33999 134 SERIAL_RX = GPIO1,
<> 149:156823d33999 135 USBTX = GPIO0,
<> 149:156823d33999 136 USBRX = GPIO1,
<> 149:156823d33999 137 D0 = GPIO9,
<> 149:156823d33999 138 D1 = GPIO8,
<> 149:156823d33999 139 D2 = GPIO4,
<> 149:156823d33999 140 D3 = GPIO6,
<> 149:156823d33999 141 D4 = GPIO5,
<> 149:156823d33999 142 D5 = GPIO7,
<> 149:156823d33999 143 D6 = GPIO10,
<> 149:156823d33999 144 D7 = (int)0xFFFFFFFF,
<> 149:156823d33999 145 D8 = (int)0xFFFFFFFF,
<> 149:156823d33999 146 D9 = (int)0xFFFFFFFF,
<> 149:156823d33999 147 D10 = GPIO17,
<> 149:156823d33999 148 D11 = GPIO15,
<> 149:156823d33999 149 D12 = GPIO16,
<> 149:156823d33999 150 D13 = GPIO14,
<> 149:156823d33999 151 D14 = GPIO3,
<> 161:2cc1468da177 152 D15 = GPIO2
<> 149:156823d33999 153 } PinName;
<> 149:156823d33999 154
<> 149:156823d33999 155 typedef enum {
<> 149:156823d33999 156 PIN_INPUT,
<> 149:156823d33999 157 PIN_OUTPUT,
<> 149:156823d33999 158
<> 149:156823d33999 159 } PinDirection;
<> 149:156823d33999 160
<> 149:156823d33999 161 typedef enum {
<> 149:156823d33999 162 PushPullPullDown = 0,
<> 149:156823d33999 163 PushPullNoPull = 1,
<> 149:156823d33999 164 PushPullPullUp = 2,
<> 149:156823d33999 165 OpenDrainPullDown = 3,
<> 149:156823d33999 166 OpenDrainNoPull = 4,
<> 149:156823d33999 167 OpenDrainPullUp = 5,
<> 149:156823d33999 168 PullNone = PushPullNoPull,
<> 149:156823d33999 169 PullUp = PushPullPullUp,
<> 149:156823d33999 170 PullDown = PushPullPullDown,
<> 149:156823d33999 171 OpenDrain = OpenDrainPullUp,
<> 149:156823d33999 172 PullDefault = PullNone
<> 149:156823d33999 173
<> 149:156823d33999 174 } PinMode;
<> 149:156823d33999 175
<> 149:156823d33999 176 #ifdef __cplusplus
<> 149:156823d33999 177 }
<> 149:156823d33999 178 #endif
<> 149:156823d33999 179
<> 149:156823d33999 180 #endif //PINNAME_H_