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_KL05Z/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 | /* mbed Microcontroller Library |
AnnaBridge | 171:3a7713b1edbc | 2 | * Copyright (c) 2006-2013 ARM Limited |
AnnaBridge | 171:3a7713b1edbc | 3 | * |
AnnaBridge | 171:3a7713b1edbc | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 171:3a7713b1edbc | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 171:3a7713b1edbc | 6 | * You may obtain a copy of the License at |
AnnaBridge | 171:3a7713b1edbc | 7 | * |
AnnaBridge | 171:3a7713b1edbc | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 171:3a7713b1edbc | 9 | * |
AnnaBridge | 171:3a7713b1edbc | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 171:3a7713b1edbc | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 171:3a7713b1edbc | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 171:3a7713b1edbc | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 171:3a7713b1edbc | 14 | * limitations under the License. |
AnnaBridge | 171:3a7713b1edbc | 15 | */ |
AnnaBridge | 171:3a7713b1edbc | 16 | #ifndef MBED_PINNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 17 | #define MBED_PINNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 18 | |
AnnaBridge | 171:3a7713b1edbc | 19 | #include "cmsis.h" |
AnnaBridge | 171:3a7713b1edbc | 20 | |
AnnaBridge | 171:3a7713b1edbc | 21 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 22 | extern "C" { |
AnnaBridge | 171:3a7713b1edbc | 23 | #endif |
AnnaBridge | 171:3a7713b1edbc | 24 | |
AnnaBridge | 171:3a7713b1edbc | 25 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 26 | PIN_INPUT, |
AnnaBridge | 171:3a7713b1edbc | 27 | PIN_OUTPUT |
AnnaBridge | 171:3a7713b1edbc | 28 | } PinDirection; |
AnnaBridge | 171:3a7713b1edbc | 29 | |
AnnaBridge | 171:3a7713b1edbc | 30 | /* PCR - 0x1000 */ |
AnnaBridge | 171:3a7713b1edbc | 31 | #define PORT_SHIFT 12 |
AnnaBridge | 171:3a7713b1edbc | 32 | |
AnnaBridge | 171:3a7713b1edbc | 33 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 34 | PTA0 = 0x0, |
AnnaBridge | 171:3a7713b1edbc | 35 | PTA1 = 0x4, |
AnnaBridge | 171:3a7713b1edbc | 36 | PTA2 = 0x8, |
AnnaBridge | 171:3a7713b1edbc | 37 | PTA3 = 0xc, |
AnnaBridge | 171:3a7713b1edbc | 38 | PTA4 = 0x10, |
AnnaBridge | 171:3a7713b1edbc | 39 | PTA5 = 0x14, |
AnnaBridge | 171:3a7713b1edbc | 40 | PTA6 = 0x18, |
AnnaBridge | 171:3a7713b1edbc | 41 | PTA7 = 0x1c, |
AnnaBridge | 171:3a7713b1edbc | 42 | PTA8 = 0x20, |
AnnaBridge | 171:3a7713b1edbc | 43 | PTA9 = 0x24, |
AnnaBridge | 171:3a7713b1edbc | 44 | PTA10 = 0x28, |
AnnaBridge | 171:3a7713b1edbc | 45 | PTA11 = 0x2c, |
AnnaBridge | 171:3a7713b1edbc | 46 | PTA12 = 0x30, |
AnnaBridge | 171:3a7713b1edbc | 47 | PTA13 = 0x34, |
AnnaBridge | 171:3a7713b1edbc | 48 | PTA14 = 0x38, |
AnnaBridge | 171:3a7713b1edbc | 49 | PTA15 = 0x3c, |
AnnaBridge | 171:3a7713b1edbc | 50 | PTA16 = 0x40, |
AnnaBridge | 171:3a7713b1edbc | 51 | PTA17 = 0x44, |
AnnaBridge | 171:3a7713b1edbc | 52 | PTA18 = 0x48, |
AnnaBridge | 171:3a7713b1edbc | 53 | PTA19 = 0x4c, |
AnnaBridge | 171:3a7713b1edbc | 54 | PTB0 = 0x1000, |
AnnaBridge | 171:3a7713b1edbc | 55 | PTB1 = 0x1004, |
AnnaBridge | 171:3a7713b1edbc | 56 | PTB2 = 0x1008, |
AnnaBridge | 171:3a7713b1edbc | 57 | PTB3 = 0x100c, |
AnnaBridge | 171:3a7713b1edbc | 58 | PTB4 = 0x1010, |
AnnaBridge | 171:3a7713b1edbc | 59 | PTB5 = 0x1014, |
AnnaBridge | 171:3a7713b1edbc | 60 | PTB6 = 0x1018, |
AnnaBridge | 171:3a7713b1edbc | 61 | PTB7 = 0x101c, |
AnnaBridge | 171:3a7713b1edbc | 62 | PTB8 = 0x1020, |
AnnaBridge | 171:3a7713b1edbc | 63 | PTB9 = 0x1024, |
AnnaBridge | 171:3a7713b1edbc | 64 | PTB10 = 0x1028, |
AnnaBridge | 171:3a7713b1edbc | 65 | PTB11 = 0x102c, |
AnnaBridge | 171:3a7713b1edbc | 66 | PTB12 = 0x1030, |
AnnaBridge | 171:3a7713b1edbc | 67 | PTB13 = 0x1034, |
AnnaBridge | 171:3a7713b1edbc | 68 | PTB14 = 0x1038, |
AnnaBridge | 171:3a7713b1edbc | 69 | PTB15 = 0x103c, |
AnnaBridge | 171:3a7713b1edbc | 70 | PTB16 = 0x1040, |
AnnaBridge | 171:3a7713b1edbc | 71 | PTB17 = 0x1044, |
AnnaBridge | 171:3a7713b1edbc | 72 | PTB18 = 0x1048, |
AnnaBridge | 171:3a7713b1edbc | 73 | PTB19 = 0x104c, |
AnnaBridge | 171:3a7713b1edbc | 74 | PTB20 = 0x1050, |
AnnaBridge | 171:3a7713b1edbc | 75 | |
AnnaBridge | 171:3a7713b1edbc | 76 | LED_RED = PTB8, |
AnnaBridge | 171:3a7713b1edbc | 77 | LED_GREEN = PTB9, |
AnnaBridge | 171:3a7713b1edbc | 78 | LED_BLUE = PTB10, |
AnnaBridge | 171:3a7713b1edbc | 79 | |
AnnaBridge | 171:3a7713b1edbc | 80 | // mbed original LED naming |
AnnaBridge | 171:3a7713b1edbc | 81 | LED1 = LED_RED, |
AnnaBridge | 171:3a7713b1edbc | 82 | LED2 = LED_GREEN, |
AnnaBridge | 171:3a7713b1edbc | 83 | LED3 = LED_BLUE, |
AnnaBridge | 171:3a7713b1edbc | 84 | LED4 = LED_BLUE, |
AnnaBridge | 171:3a7713b1edbc | 85 | |
AnnaBridge | 171:3a7713b1edbc | 86 | // USB Pins |
AnnaBridge | 171:3a7713b1edbc | 87 | USBTX = PTB1, |
AnnaBridge | 171:3a7713b1edbc | 88 | USBRX = PTB2, |
AnnaBridge | 171:3a7713b1edbc | 89 | |
AnnaBridge | 171:3a7713b1edbc | 90 | // Arduino Headers |
AnnaBridge | 171:3a7713b1edbc | 91 | D0 = PTB2, |
AnnaBridge | 171:3a7713b1edbc | 92 | D1 = PTB1, |
AnnaBridge | 171:3a7713b1edbc | 93 | D2 = PTA11, |
AnnaBridge | 171:3a7713b1edbc | 94 | D3 = PTB5, |
AnnaBridge | 171:3a7713b1edbc | 95 | D4 = PTA10, |
AnnaBridge | 171:3a7713b1edbc | 96 | D5 = PTA12, |
AnnaBridge | 171:3a7713b1edbc | 97 | D6 = PTB6, |
AnnaBridge | 171:3a7713b1edbc | 98 | D7 = PTB7, |
AnnaBridge | 171:3a7713b1edbc | 99 | D8 = PTB10, |
AnnaBridge | 171:3a7713b1edbc | 100 | D9 = PTB11, |
AnnaBridge | 171:3a7713b1edbc | 101 | D10 = PTA5, |
AnnaBridge | 171:3a7713b1edbc | 102 | D11 = PTA7, |
AnnaBridge | 171:3a7713b1edbc | 103 | D12 = PTA6, |
AnnaBridge | 171:3a7713b1edbc | 104 | D13 = PTB0, |
AnnaBridge | 171:3a7713b1edbc | 105 | D14 = PTB4, |
AnnaBridge | 171:3a7713b1edbc | 106 | D15 = PTB3, |
AnnaBridge | 171:3a7713b1edbc | 107 | |
AnnaBridge | 171:3a7713b1edbc | 108 | A0 = PTB8, |
AnnaBridge | 171:3a7713b1edbc | 109 | A1 = PTB9, |
AnnaBridge | 171:3a7713b1edbc | 110 | A2 = PTA8, |
AnnaBridge | 171:3a7713b1edbc | 111 | A3 = PTA0, |
AnnaBridge | 171:3a7713b1edbc | 112 | A4 = PTA9, |
AnnaBridge | 171:3a7713b1edbc | 113 | A5 = PTB13, |
AnnaBridge | 171:3a7713b1edbc | 114 | |
AnnaBridge | 171:3a7713b1edbc | 115 | I2C_SCL = D15, |
AnnaBridge | 171:3a7713b1edbc | 116 | I2C_SDA = D14, |
AnnaBridge | 171:3a7713b1edbc | 117 | |
AnnaBridge | 171:3a7713b1edbc | 118 | TSI_ELEC0 = PTA13, |
AnnaBridge | 171:3a7713b1edbc | 119 | TSI_ELEC1 = PTB12, |
AnnaBridge | 171:3a7713b1edbc | 120 | |
AnnaBridge | 171:3a7713b1edbc | 121 | // Not connected |
AnnaBridge | 171:3a7713b1edbc | 122 | NC = (int)0xFFFFFFFF |
AnnaBridge | 171:3a7713b1edbc | 123 | } PinName; |
AnnaBridge | 171:3a7713b1edbc | 124 | |
AnnaBridge | 171:3a7713b1edbc | 125 | /* PullDown not available for KL05 */ |
AnnaBridge | 171:3a7713b1edbc | 126 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 127 | PullNone = 0, |
AnnaBridge | 171:3a7713b1edbc | 128 | PullUp = 2, |
AnnaBridge | 171:3a7713b1edbc | 129 | PullDefault = PullUp |
AnnaBridge | 171:3a7713b1edbc | 130 | } PinMode; |
AnnaBridge | 171:3a7713b1edbc | 131 | |
AnnaBridge | 171:3a7713b1edbc | 132 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 133 | } |
AnnaBridge | 171:3a7713b1edbc | 134 | #endif |
AnnaBridge | 171:3a7713b1edbc | 135 | |
AnnaBridge | 171:3a7713b1edbc | 136 | #endif |