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