mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
targets/TARGET_TOSHIBA/TARGET_TMPM3HQ/PinNames.h@189:f392fc9709a3, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 22:31:08 2019 +0000
- Revision:
- 189:f392fc9709a3
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 189:f392fc9709a3 | 1 | /* mbed Microcontroller Library |
AnnaBridge | 189:f392fc9709a3 | 2 | * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved |
AnnaBridge | 189:f392fc9709a3 | 3 | * |
AnnaBridge | 189:f392fc9709a3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 189:f392fc9709a3 | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 189:f392fc9709a3 | 6 | * You may obtain a copy of the License at |
AnnaBridge | 189:f392fc9709a3 | 7 | * |
AnnaBridge | 189:f392fc9709a3 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 189:f392fc9709a3 | 9 | * |
AnnaBridge | 189:f392fc9709a3 | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 189:f392fc9709a3 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 189:f392fc9709a3 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 189:f392fc9709a3 | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 189:f392fc9709a3 | 14 | * limitations under the License. |
AnnaBridge | 189:f392fc9709a3 | 15 | */ |
AnnaBridge | 189:f392fc9709a3 | 16 | #ifndef MBED_PINNAMES_H |
AnnaBridge | 189:f392fc9709a3 | 17 | #define MBED_PINNAMES_H |
AnnaBridge | 189:f392fc9709a3 | 18 | |
AnnaBridge | 189:f392fc9709a3 | 19 | #include "cmsis.h" |
AnnaBridge | 189:f392fc9709a3 | 20 | |
AnnaBridge | 189:f392fc9709a3 | 21 | #ifdef __cplusplus |
AnnaBridge | 189:f392fc9709a3 | 22 | extern "C" { |
AnnaBridge | 189:f392fc9709a3 | 23 | #endif |
AnnaBridge | 189:f392fc9709a3 | 24 | |
AnnaBridge | 189:f392fc9709a3 | 25 | typedef enum { |
AnnaBridge | 189:f392fc9709a3 | 26 | PIN_INPUT, |
AnnaBridge | 189:f392fc9709a3 | 27 | PIN_OUTPUT, |
AnnaBridge | 189:f392fc9709a3 | 28 | PIN_INOUT |
AnnaBridge | 189:f392fc9709a3 | 29 | } PinDirection; |
AnnaBridge | 189:f392fc9709a3 | 30 | |
AnnaBridge | 189:f392fc9709a3 | 31 | typedef enum { |
AnnaBridge | 189:f392fc9709a3 | 32 | // TMPM3HQ Pin Names |
AnnaBridge | 189:f392fc9709a3 | 33 | PA0 = 0 << 3, PA1, PA2, PA3, PA4, PA5, PA6, PA7, |
AnnaBridge | 189:f392fc9709a3 | 34 | PB0 = 1 << 3, PB1, PB2, PB3, PB4, PB5, PB6, PB7, |
AnnaBridge | 189:f392fc9709a3 | 35 | PC0 = 2 << 3, PC1, PC2, PC3, PC4, PC5, PC6, |
AnnaBridge | 189:f392fc9709a3 | 36 | PD0 = 3 << 3, PD1, PD2, PD3, PD4, PD5, |
AnnaBridge | 189:f392fc9709a3 | 37 | PE0 = 4 << 3, PE1, PE2, PE3, PE4, PE5, PE6, |
AnnaBridge | 189:f392fc9709a3 | 38 | PF0 = 5 << 3, PF1, PF2, PF3, PF4, PF5, PF6, PF7, |
AnnaBridge | 189:f392fc9709a3 | 39 | PG0 = 6 << 3, PG1, PG2, PG3, PG4, PG5, PG6, PG7, |
AnnaBridge | 189:f392fc9709a3 | 40 | PH0 = 7 << 3, PH1, PH2, PH3, PH4, PH5, PH6, PH7, |
AnnaBridge | 189:f392fc9709a3 | 41 | PJ0 = 8 << 3, PJ1, PJ2, PJ3, PJ4, PJ5, |
AnnaBridge | 189:f392fc9709a3 | 42 | PK0 = 9 << 3, PK1, PK2, PK3, PK4, PK5, PK6, PK7, |
AnnaBridge | 189:f392fc9709a3 | 43 | PL0 = 10 << 3, PL1, PL2, PL3, PL4, PL5, PL6, PL7, |
AnnaBridge | 189:f392fc9709a3 | 44 | PM0 = 11 << 3, PM1, PM2, PM3, PM4, PM5, PM6, PM7, |
AnnaBridge | 189:f392fc9709a3 | 45 | PN0 = 12 << 3, PN1, PN2, PN3, PN4, PN5, |
AnnaBridge | 189:f392fc9709a3 | 46 | PP0 = 13 << 3, PP1, PP2, PP3, PP4, PP5, PP6, PP7, |
AnnaBridge | 189:f392fc9709a3 | 47 | PR0 = 14 << 3, PR1, PR2, PR3, PR4, PR5, PR6, PR7, |
AnnaBridge | 189:f392fc9709a3 | 48 | PT0 = 15 << 3, PT1, PT2, PT3, PT4, PT5, PT6, PT7, |
AnnaBridge | 189:f392fc9709a3 | 49 | PU0 = 16 << 3, PU1, PU2, PU3, PU4, PU5, |
AnnaBridge | 189:f392fc9709a3 | 50 | PV0 = 17 << 3, PV1, PV2, PV3, PV4, PV5, PV6, PV7, |
AnnaBridge | 189:f392fc9709a3 | 51 | |
AnnaBridge | 189:f392fc9709a3 | 52 | // LED |
AnnaBridge | 189:f392fc9709a3 | 53 | LED1 = PK4, |
AnnaBridge | 189:f392fc9709a3 | 54 | LED2 = PK5, |
AnnaBridge | 189:f392fc9709a3 | 55 | LED3 = PK6, |
AnnaBridge | 189:f392fc9709a3 | 56 | LED4 = PK7, |
AnnaBridge | 189:f392fc9709a3 | 57 | |
AnnaBridge | 189:f392fc9709a3 | 58 | // External data bus Pin Names |
AnnaBridge | 189:f392fc9709a3 | 59 | D0 = PV7, |
AnnaBridge | 189:f392fc9709a3 | 60 | D1 = PV6, |
AnnaBridge | 189:f392fc9709a3 | 61 | D2 = PC4, |
AnnaBridge | 189:f392fc9709a3 | 62 | D3 = PK2, |
AnnaBridge | 189:f392fc9709a3 | 63 | D4 = PC3, |
AnnaBridge | 189:f392fc9709a3 | 64 | D5 = PJ0, |
AnnaBridge | 189:f392fc9709a3 | 65 | D6 = PN0, |
AnnaBridge | 189:f392fc9709a3 | 66 | D7 = PM6, |
AnnaBridge | 189:f392fc9709a3 | 67 | D8 = PT0, |
AnnaBridge | 189:f392fc9709a3 | 68 | D9 = PG2, |
AnnaBridge | 189:f392fc9709a3 | 69 | D10 = PT1, |
AnnaBridge | 189:f392fc9709a3 | 70 | D11 = PT3, |
AnnaBridge | 189:f392fc9709a3 | 71 | D12 = PT4, |
AnnaBridge | 189:f392fc9709a3 | 72 | D13 = PT2, |
AnnaBridge | 189:f392fc9709a3 | 73 | D14 = PC1, |
AnnaBridge | 189:f392fc9709a3 | 74 | D15 = PC0, |
AnnaBridge | 189:f392fc9709a3 | 75 | |
AnnaBridge | 189:f392fc9709a3 | 76 | // Analogue out pins |
AnnaBridge | 189:f392fc9709a3 | 77 | A0 = PF2, |
AnnaBridge | 189:f392fc9709a3 | 78 | A1 = PF3, |
AnnaBridge | 189:f392fc9709a3 | 79 | A2 = PF4, |
AnnaBridge | 189:f392fc9709a3 | 80 | A3 = PF5, |
AnnaBridge | 189:f392fc9709a3 | 81 | A4 = PF6, |
AnnaBridge | 189:f392fc9709a3 | 82 | A5 = PF7, |
AnnaBridge | 189:f392fc9709a3 | 83 | |
AnnaBridge | 189:f392fc9709a3 | 84 | // DAC |
AnnaBridge | 189:f392fc9709a3 | 85 | DAC0 = PG0, |
AnnaBridge | 189:f392fc9709a3 | 86 | DAC1 = PG1, |
AnnaBridge | 189:f392fc9709a3 | 87 | |
AnnaBridge | 189:f392fc9709a3 | 88 | // DAP_UART |
AnnaBridge | 189:f392fc9709a3 | 89 | USBTX = PJ1, |
AnnaBridge | 189:f392fc9709a3 | 90 | USBRX = PJ2, |
AnnaBridge | 189:f392fc9709a3 | 91 | MBEDIF_TXD = USBTX, |
AnnaBridge | 189:f392fc9709a3 | 92 | MBEDIF_RXD = USBRX, |
AnnaBridge | 189:f392fc9709a3 | 93 | |
AnnaBridge | 189:f392fc9709a3 | 94 | // Push buttons |
AnnaBridge | 189:f392fc9709a3 | 95 | SW1 = PV0, |
AnnaBridge | 189:f392fc9709a3 | 96 | SW2 = PV1, |
AnnaBridge | 189:f392fc9709a3 | 97 | SW3 = PV2, |
AnnaBridge | 189:f392fc9709a3 | 98 | SW4 = PV3, |
AnnaBridge | 189:f392fc9709a3 | 99 | |
AnnaBridge | 189:f392fc9709a3 | 100 | // Standardized button names |
AnnaBridge | 189:f392fc9709a3 | 101 | BUTTON1 = SW1, |
AnnaBridge | 189:f392fc9709a3 | 102 | BUTTON2 = SW2, |
AnnaBridge | 189:f392fc9709a3 | 103 | BUTTON3 = SW3, |
AnnaBridge | 189:f392fc9709a3 | 104 | BUTTON4 = SW4, |
AnnaBridge | 189:f392fc9709a3 | 105 | |
AnnaBridge | 189:f392fc9709a3 | 106 | // TSPI2 |
AnnaBridge | 189:f392fc9709a3 | 107 | MOSI = D11, |
AnnaBridge | 189:f392fc9709a3 | 108 | MISO = D12, |
AnnaBridge | 189:f392fc9709a3 | 109 | SCLK = D13, |
AnnaBridge | 189:f392fc9709a3 | 110 | CS = D10, |
AnnaBridge | 189:f392fc9709a3 | 111 | |
AnnaBridge | 189:f392fc9709a3 | 112 | // SD Shield TSPI2 |
AnnaBridge | 189:f392fc9709a3 | 113 | SD_SEL = CS, // Chip select |
AnnaBridge | 189:f392fc9709a3 | 114 | SD_CLK = SCLK, // SPI clock |
AnnaBridge | 189:f392fc9709a3 | 115 | SD_MISO = MISO, // Master in Salve out |
AnnaBridge | 189:f392fc9709a3 | 116 | SD_MOSI = MOSI, // Master out Salve in |
AnnaBridge | 189:f392fc9709a3 | 117 | |
AnnaBridge | 189:f392fc9709a3 | 118 | // I2C pins |
AnnaBridge | 189:f392fc9709a3 | 119 | SDA = D14, |
AnnaBridge | 189:f392fc9709a3 | 120 | SCL = D15, |
AnnaBridge | 189:f392fc9709a3 | 121 | I2C_SDA = SDA, |
AnnaBridge | 189:f392fc9709a3 | 122 | I2C_SCL = SCL, |
AnnaBridge | 189:f392fc9709a3 | 123 | |
AnnaBridge | 189:f392fc9709a3 | 124 | // Not connected |
AnnaBridge | 189:f392fc9709a3 | 125 | NC = (int)0xFFFFFFFF, |
AnnaBridge | 189:f392fc9709a3 | 126 | } PinName; |
AnnaBridge | 189:f392fc9709a3 | 127 | |
AnnaBridge | 189:f392fc9709a3 | 128 | typedef enum { |
AnnaBridge | 189:f392fc9709a3 | 129 | PullUp = 0, |
AnnaBridge | 189:f392fc9709a3 | 130 | PullDown, |
AnnaBridge | 189:f392fc9709a3 | 131 | PullNone, |
AnnaBridge | 189:f392fc9709a3 | 132 | OpenDrain, |
AnnaBridge | 189:f392fc9709a3 | 133 | PullDefault |
AnnaBridge | 189:f392fc9709a3 | 134 | } PinMode; |
AnnaBridge | 189:f392fc9709a3 | 135 | |
AnnaBridge | 189:f392fc9709a3 | 136 | typedef enum { |
AnnaBridge | 189:f392fc9709a3 | 137 | DISABLE = 0, |
AnnaBridge | 189:f392fc9709a3 | 138 | ENABLE |
AnnaBridge | 189:f392fc9709a3 | 139 | } FunctionalState; |
AnnaBridge | 189:f392fc9709a3 | 140 | |
AnnaBridge | 189:f392fc9709a3 | 141 | #ifdef __cplusplus |
AnnaBridge | 189:f392fc9709a3 | 142 | } |
AnnaBridge | 189:f392fc9709a3 | 143 | #endif |
AnnaBridge | 189:f392fc9709a3 | 144 | |
AnnaBridge | 189:f392fc9709a3 | 145 | #endif |