![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL43Z/TARGET_FRDM/PinNames.h@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | /* mbed Microcontroller Library |
kadonotakashi | 0:8fdf9a60065b | 2 | * Copyright (c) 2006-2013 ARM Limited |
kadonotakashi | 0:8fdf9a60065b | 3 | * |
kadonotakashi | 0:8fdf9a60065b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
kadonotakashi | 0:8fdf9a60065b | 5 | * you may not use this file except in compliance with the License. |
kadonotakashi | 0:8fdf9a60065b | 6 | * You may obtain a copy of the License at |
kadonotakashi | 0:8fdf9a60065b | 7 | * |
kadonotakashi | 0:8fdf9a60065b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
kadonotakashi | 0:8fdf9a60065b | 9 | * |
kadonotakashi | 0:8fdf9a60065b | 10 | * Unless required by applicable law or agreed to in writing, software |
kadonotakashi | 0:8fdf9a60065b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
kadonotakashi | 0:8fdf9a60065b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
kadonotakashi | 0:8fdf9a60065b | 13 | * See the License for the specific language governing permissions and |
kadonotakashi | 0:8fdf9a60065b | 14 | * limitations under the License. |
kadonotakashi | 0:8fdf9a60065b | 15 | */ |
kadonotakashi | 0:8fdf9a60065b | 16 | #ifndef MBED_PINNAMES_H |
kadonotakashi | 0:8fdf9a60065b | 17 | #define MBED_PINNAMES_H |
kadonotakashi | 0:8fdf9a60065b | 18 | |
kadonotakashi | 0:8fdf9a60065b | 19 | #include "cmsis.h" |
kadonotakashi | 0:8fdf9a60065b | 20 | |
kadonotakashi | 0:8fdf9a60065b | 21 | #ifdef __cplusplus |
kadonotakashi | 0:8fdf9a60065b | 22 | extern "C" { |
kadonotakashi | 0:8fdf9a60065b | 23 | #endif |
kadonotakashi | 0:8fdf9a60065b | 24 | |
kadonotakashi | 0:8fdf9a60065b | 25 | typedef enum { |
kadonotakashi | 0:8fdf9a60065b | 26 | PIN_INPUT, |
kadonotakashi | 0:8fdf9a60065b | 27 | PIN_OUTPUT |
kadonotakashi | 0:8fdf9a60065b | 28 | } PinDirection; |
kadonotakashi | 0:8fdf9a60065b | 29 | |
kadonotakashi | 0:8fdf9a60065b | 30 | #define GPIO_PORT_SHIFT 12 |
kadonotakashi | 0:8fdf9a60065b | 31 | |
kadonotakashi | 0:8fdf9a60065b | 32 | typedef enum { |
kadonotakashi | 0:8fdf9a60065b | 33 | PTA0 = (0 << GPIO_PORT_SHIFT | 0 ), |
kadonotakashi | 0:8fdf9a60065b | 34 | PTA1 = (0 << GPIO_PORT_SHIFT | 1 ), |
kadonotakashi | 0:8fdf9a60065b | 35 | PTA2 = (0 << GPIO_PORT_SHIFT | 2 ), |
kadonotakashi | 0:8fdf9a60065b | 36 | PTA3 = (0 << GPIO_PORT_SHIFT | 3 ), |
kadonotakashi | 0:8fdf9a60065b | 37 | PTA4 = (0 << GPIO_PORT_SHIFT | 4 ), |
kadonotakashi | 0:8fdf9a60065b | 38 | PTA5 = (0 << GPIO_PORT_SHIFT | 5 ), |
kadonotakashi | 0:8fdf9a60065b | 39 | PTA12 = (0 << GPIO_PORT_SHIFT | 12), |
kadonotakashi | 0:8fdf9a60065b | 40 | PTA13 = (0 << GPIO_PORT_SHIFT | 13), |
kadonotakashi | 0:8fdf9a60065b | 41 | PTA18 = (0 << GPIO_PORT_SHIFT | 18), |
kadonotakashi | 0:8fdf9a60065b | 42 | PTA19 = (0 << GPIO_PORT_SHIFT | 19), |
kadonotakashi | 0:8fdf9a60065b | 43 | PTA20 = (0 << GPIO_PORT_SHIFT | 20), |
kadonotakashi | 0:8fdf9a60065b | 44 | PTB0 = (1 << GPIO_PORT_SHIFT | 0 ), |
kadonotakashi | 0:8fdf9a60065b | 45 | PTB1 = (1 << GPIO_PORT_SHIFT | 1 ), |
kadonotakashi | 0:8fdf9a60065b | 46 | PTB2 = (1 << GPIO_PORT_SHIFT | 2 ), |
kadonotakashi | 0:8fdf9a60065b | 47 | PTB3 = (1 << GPIO_PORT_SHIFT | 3 ), |
kadonotakashi | 0:8fdf9a60065b | 48 | PTB16 = (1 << GPIO_PORT_SHIFT | 16), |
kadonotakashi | 0:8fdf9a60065b | 49 | PTB17 = (1 << GPIO_PORT_SHIFT | 17), |
kadonotakashi | 0:8fdf9a60065b | 50 | PTB18 = (1 << GPIO_PORT_SHIFT | 18), |
kadonotakashi | 0:8fdf9a60065b | 51 | PTB19 = (1 << GPIO_PORT_SHIFT | 19), |
kadonotakashi | 0:8fdf9a60065b | 52 | PTC0 = (2 << GPIO_PORT_SHIFT | 0 ), |
kadonotakashi | 0:8fdf9a60065b | 53 | PTC1 = (2 << GPIO_PORT_SHIFT | 1 ), |
kadonotakashi | 0:8fdf9a60065b | 54 | PTC2 = (2 << GPIO_PORT_SHIFT | 2 ), |
kadonotakashi | 0:8fdf9a60065b | 55 | PTC3 = (2 << GPIO_PORT_SHIFT | 3 ), |
kadonotakashi | 0:8fdf9a60065b | 56 | PTC4 = (2 << GPIO_PORT_SHIFT | 4 ), |
kadonotakashi | 0:8fdf9a60065b | 57 | PTC5 = (2 << GPIO_PORT_SHIFT | 5 ), |
kadonotakashi | 0:8fdf9a60065b | 58 | PTC6 = (2 << GPIO_PORT_SHIFT | 6 ), |
kadonotakashi | 0:8fdf9a60065b | 59 | PTC7 = (2 << GPIO_PORT_SHIFT | 7 ), |
kadonotakashi | 0:8fdf9a60065b | 60 | PTC8 = (2 << GPIO_PORT_SHIFT | 8 ), |
kadonotakashi | 0:8fdf9a60065b | 61 | PTC9 = (2 << GPIO_PORT_SHIFT | 9 ), |
kadonotakashi | 0:8fdf9a60065b | 62 | PTC10 = (2 << GPIO_PORT_SHIFT | 10), |
kadonotakashi | 0:8fdf9a60065b | 63 | PTC11 = (2 << GPIO_PORT_SHIFT | 11), |
kadonotakashi | 0:8fdf9a60065b | 64 | PTD0 = (3 << GPIO_PORT_SHIFT | 0 ), |
kadonotakashi | 0:8fdf9a60065b | 65 | PTD1 = (3 << GPIO_PORT_SHIFT | 1 ), |
kadonotakashi | 0:8fdf9a60065b | 66 | PTD2 = (3 << GPIO_PORT_SHIFT | 2 ), |
kadonotakashi | 0:8fdf9a60065b | 67 | PTD3 = (3 << GPIO_PORT_SHIFT | 3 ), |
kadonotakashi | 0:8fdf9a60065b | 68 | PTD4 = (3 << GPIO_PORT_SHIFT | 4 ), |
kadonotakashi | 0:8fdf9a60065b | 69 | PTD5 = (3 << GPIO_PORT_SHIFT | 5 ), |
kadonotakashi | 0:8fdf9a60065b | 70 | PTD6 = (3 << GPIO_PORT_SHIFT | 6 ), |
kadonotakashi | 0:8fdf9a60065b | 71 | PTD7 = (3 << GPIO_PORT_SHIFT | 7 ), |
kadonotakashi | 0:8fdf9a60065b | 72 | PTE0 = (4 << GPIO_PORT_SHIFT | 0 ), |
kadonotakashi | 0:8fdf9a60065b | 73 | PTE1 = (4 << GPIO_PORT_SHIFT | 1 ), |
kadonotakashi | 0:8fdf9a60065b | 74 | PTE16 = (4 << GPIO_PORT_SHIFT | 16), |
kadonotakashi | 0:8fdf9a60065b | 75 | PTE17 = (4 << GPIO_PORT_SHIFT | 17), |
kadonotakashi | 0:8fdf9a60065b | 76 | PTE18 = (4 << GPIO_PORT_SHIFT | 18), |
kadonotakashi | 0:8fdf9a60065b | 77 | PTE19 = (4 << GPIO_PORT_SHIFT | 19), |
kadonotakashi | 0:8fdf9a60065b | 78 | PTE20 = (4 << GPIO_PORT_SHIFT | 20), |
kadonotakashi | 0:8fdf9a60065b | 79 | PTE21 = (4 << GPIO_PORT_SHIFT | 21), |
kadonotakashi | 0:8fdf9a60065b | 80 | PTE22 = (4 << GPIO_PORT_SHIFT | 22), |
kadonotakashi | 0:8fdf9a60065b | 81 | PTE23 = (4 << GPIO_PORT_SHIFT | 23), |
kadonotakashi | 0:8fdf9a60065b | 82 | PTE24 = (4 << GPIO_PORT_SHIFT | 24), |
kadonotakashi | 0:8fdf9a60065b | 83 | PTE25 = (4 << GPIO_PORT_SHIFT | 25), |
kadonotakashi | 0:8fdf9a60065b | 84 | PTE29 = (4 << GPIO_PORT_SHIFT | 29), |
kadonotakashi | 0:8fdf9a60065b | 85 | PTE30 = (4 << GPIO_PORT_SHIFT | 30), |
kadonotakashi | 0:8fdf9a60065b | 86 | PTE31 = (4 << GPIO_PORT_SHIFT | 31), |
kadonotakashi | 0:8fdf9a60065b | 87 | |
kadonotakashi | 0:8fdf9a60065b | 88 | LED_RED = PTE31, |
kadonotakashi | 0:8fdf9a60065b | 89 | LED_GREEN = PTD5, |
kadonotakashi | 0:8fdf9a60065b | 90 | |
kadonotakashi | 0:8fdf9a60065b | 91 | // mbed original LED naming |
kadonotakashi | 0:8fdf9a60065b | 92 | LED1 = LED_GREEN, |
kadonotakashi | 0:8fdf9a60065b | 93 | LED2 = LED_RED, |
kadonotakashi | 0:8fdf9a60065b | 94 | LED3 = LED_GREEN, |
kadonotakashi | 0:8fdf9a60065b | 95 | LED4 = LED_RED, |
kadonotakashi | 0:8fdf9a60065b | 96 | |
kadonotakashi | 0:8fdf9a60065b | 97 | //Push buttons |
kadonotakashi | 0:8fdf9a60065b | 98 | SW1 = PTA4, |
kadonotakashi | 0:8fdf9a60065b | 99 | SW3 = PTC3, |
kadonotakashi | 0:8fdf9a60065b | 100 | // Standardized button names |
kadonotakashi | 0:8fdf9a60065b | 101 | BUTTON1 = SW1, |
kadonotakashi | 0:8fdf9a60065b | 102 | BUTTON2 = SW3, |
kadonotakashi | 0:8fdf9a60065b | 103 | |
kadonotakashi | 0:8fdf9a60065b | 104 | // USB Pins |
kadonotakashi | 0:8fdf9a60065b | 105 | USBTX = PTA2, |
kadonotakashi | 0:8fdf9a60065b | 106 | USBRX = PTA1, |
kadonotakashi | 0:8fdf9a60065b | 107 | |
kadonotakashi | 0:8fdf9a60065b | 108 | // Arduino Headers |
kadonotakashi | 0:8fdf9a60065b | 109 | |
kadonotakashi | 0:8fdf9a60065b | 110 | D0 = PTA1, |
kadonotakashi | 0:8fdf9a60065b | 111 | D1 = PTA2, |
kadonotakashi | 0:8fdf9a60065b | 112 | D2 = PTD3, |
kadonotakashi | 0:8fdf9a60065b | 113 | D3 = PTA12, |
kadonotakashi | 0:8fdf9a60065b | 114 | D4 = PTA4, |
kadonotakashi | 0:8fdf9a60065b | 115 | D5 = PTA5, |
kadonotakashi | 0:8fdf9a60065b | 116 | D6 = PTE29, |
kadonotakashi | 0:8fdf9a60065b | 117 | D7 = PTE30, |
kadonotakashi | 0:8fdf9a60065b | 118 | D8 = PTA13, |
kadonotakashi | 0:8fdf9a60065b | 119 | D9 = PTD2, |
kadonotakashi | 0:8fdf9a60065b | 120 | D10 = PTD4, |
kadonotakashi | 0:8fdf9a60065b | 121 | D11 = PTD6, |
kadonotakashi | 0:8fdf9a60065b | 122 | D12 = PTD7, |
kadonotakashi | 0:8fdf9a60065b | 123 | D13 = PTD5, |
kadonotakashi | 0:8fdf9a60065b | 124 | D14 = PTE0, |
kadonotakashi | 0:8fdf9a60065b | 125 | D15 = PTE1, |
kadonotakashi | 0:8fdf9a60065b | 126 | |
kadonotakashi | 0:8fdf9a60065b | 127 | I2C_SCL = D15, |
kadonotakashi | 0:8fdf9a60065b | 128 | I2C_SDA = D14, |
kadonotakashi | 0:8fdf9a60065b | 129 | |
kadonotakashi | 0:8fdf9a60065b | 130 | A0 = PTB0, |
kadonotakashi | 0:8fdf9a60065b | 131 | A1 = PTB1, |
kadonotakashi | 0:8fdf9a60065b | 132 | A2 = PTB2, |
kadonotakashi | 0:8fdf9a60065b | 133 | A3 = PTB3, |
kadonotakashi | 0:8fdf9a60065b | 134 | A4 = PTC2, |
kadonotakashi | 0:8fdf9a60065b | 135 | A5 = PTC1, |
kadonotakashi | 0:8fdf9a60065b | 136 | |
kadonotakashi | 0:8fdf9a60065b | 137 | // Not connected |
kadonotakashi | 0:8fdf9a60065b | 138 | NC = (int)0xFFFFFFFF |
kadonotakashi | 0:8fdf9a60065b | 139 | } PinName; |
kadonotakashi | 0:8fdf9a60065b | 140 | |
kadonotakashi | 0:8fdf9a60065b | 141 | |
kadonotakashi | 0:8fdf9a60065b | 142 | typedef enum { |
kadonotakashi | 0:8fdf9a60065b | 143 | PullNone = 0, |
kadonotakashi | 0:8fdf9a60065b | 144 | PullDown = 1, |
kadonotakashi | 0:8fdf9a60065b | 145 | PullUp = 2, |
kadonotakashi | 0:8fdf9a60065b | 146 | PullDefault = PullUp |
kadonotakashi | 0:8fdf9a60065b | 147 | } PinMode; |
kadonotakashi | 0:8fdf9a60065b | 148 | |
kadonotakashi | 0:8fdf9a60065b | 149 | #ifdef __cplusplus |
kadonotakashi | 0:8fdf9a60065b | 150 | } |
kadonotakashi | 0:8fdf9a60065b | 151 | #endif |
kadonotakashi | 0:8fdf9a60065b | 152 | |
kadonotakashi | 0:8fdf9a60065b | 153 | #endif |