mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
AnnaBridge
Date:
Wed Feb 20 22:31:08 2019 +0000
Revision:
189:f392fc9709a3
Parent:
187:0387e8f68319
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 187:0387e8f68319 1 /* mbed Microcontroller Library
AnnaBridge 187:0387e8f68319 2 * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved
AnnaBridge 187:0387e8f68319 3 *
AnnaBridge 187:0387e8f68319 4 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 187:0387e8f68319 5 * you may not use this file except in compliance with the License.
AnnaBridge 187:0387e8f68319 6 * You may obtain a copy of the License at
AnnaBridge 187:0387e8f68319 7 *
AnnaBridge 187:0387e8f68319 8 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 187:0387e8f68319 9 *
AnnaBridge 187:0387e8f68319 10 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 187:0387e8f68319 11 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 187:0387e8f68319 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 187:0387e8f68319 13 * See the License for the specific language governing permissions and
AnnaBridge 187:0387e8f68319 14 * limitations under the License.
AnnaBridge 187:0387e8f68319 15 */
AnnaBridge 187:0387e8f68319 16 #ifndef MBED_PINNAMES_H
AnnaBridge 187:0387e8f68319 17 #define MBED_PINNAMES_H
AnnaBridge 187:0387e8f68319 18
AnnaBridge 187:0387e8f68319 19 #include "cmsis.h"
AnnaBridge 187:0387e8f68319 20
AnnaBridge 187:0387e8f68319 21 #ifdef __cplusplus
AnnaBridge 187:0387e8f68319 22 extern "C" {
AnnaBridge 187:0387e8f68319 23 #endif
AnnaBridge 187:0387e8f68319 24
AnnaBridge 187:0387e8f68319 25 typedef enum {
AnnaBridge 187:0387e8f68319 26 PIN_INPUT,
AnnaBridge 187:0387e8f68319 27 PIN_OUTPUT,
AnnaBridge 187:0387e8f68319 28 PIN_INOUT
AnnaBridge 187:0387e8f68319 29 } PinDirection;
AnnaBridge 187:0387e8f68319 30
AnnaBridge 187:0387e8f68319 31 typedef enum {
AnnaBridge 187:0387e8f68319 32 // TMPM3H6 Pin Names
AnnaBridge 187:0387e8f68319 33 PA0 = 0 << 3, PA1, PA2, PA3, PA4, PA5, PA6, PA7,
AnnaBridge 187:0387e8f68319 34 PB0 = 1 << 3, PB1, PB2, PB3, PB4, PB5, PB6, PB7,
AnnaBridge 187:0387e8f68319 35 PC0 = 2 << 3, PC1, PC2, PC3, PC4, PC5, PC6,
AnnaBridge 187:0387e8f68319 36 PD0 = 3 << 3, PD1, PD2, PD3,
AnnaBridge 187:0387e8f68319 37 PE0 = 4 << 3, PE1, PE2, PE3, PE4, PE5, PE6,
AnnaBridge 187:0387e8f68319 38 PF0 = 5 << 3, PF1, PF2, PF3, PF4,
AnnaBridge 187:0387e8f68319 39 PG0 = 6 << 3, PG1,
AnnaBridge 187:0387e8f68319 40 PH0 = 7 << 3, PH1, PH2, PH3,
AnnaBridge 187:0387e8f68319 41 PJ0 = 8 << 3, PJ1, PJ2, PJ3, PJ4, PJ5,
AnnaBridge 187:0387e8f68319 42 PK0 = 9 << 3, PK1, PK2, PK3, PK4, PK5, PK6, PK7,
AnnaBridge 187:0387e8f68319 43 PL0 = 10 << 3, PL1, PL2, PL3, PL4, PL5, PL6,
AnnaBridge 187:0387e8f68319 44 PM0 = 11 << 3, PM1, PM2, PM3, PM4, PM5, PM6,
AnnaBridge 187:0387e8f68319 45 PN0 = 12 << 3, PN1, PN2, PN3, PN4,PN5,
AnnaBridge 187:0387e8f68319 46 PP0 = 13 << 3, PP1, PP2, PP3,
AnnaBridge 187:0387e8f68319 47 PR0 = 14 << 3, PR1, PR2, PR3,
AnnaBridge 187:0387e8f68319 48
AnnaBridge 187:0387e8f68319 49 // Other mbed Pin Names
AnnaBridge 187:0387e8f68319 50 LED1 = PB4,
AnnaBridge 187:0387e8f68319 51 LED2 = PB5,
AnnaBridge 187:0387e8f68319 52 LED3 = PB6,
AnnaBridge 187:0387e8f68319 53 LED4 = PB7,
AnnaBridge 187:0387e8f68319 54
AnnaBridge 187:0387e8f68319 55 // external data bus Pin Names
AnnaBridge 187:0387e8f68319 56 D0 = PL0,
AnnaBridge 187:0387e8f68319 57 D1 = PL1,
AnnaBridge 187:0387e8f68319 58 D2 = PJ4,
AnnaBridge 187:0387e8f68319 59 D3 = PJ3,
AnnaBridge 187:0387e8f68319 60 D4 = PC4,
AnnaBridge 187:0387e8f68319 61 D5 = PC3,
AnnaBridge 187:0387e8f68319 62 D6 = PB3,
AnnaBridge 187:0387e8f68319 63 D7 = PB2,
AnnaBridge 187:0387e8f68319 64 D8 = PK1,
AnnaBridge 187:0387e8f68319 65 D9 = PJ0,
AnnaBridge 187:0387e8f68319 66 D10 = PL6,
AnnaBridge 187:0387e8f68319 67 D11 = PP1,
AnnaBridge 187:0387e8f68319 68 D12 = PP2,
AnnaBridge 187:0387e8f68319 69 D13 = PP0,
AnnaBridge 187:0387e8f68319 70 D14 = PA5,
AnnaBridge 187:0387e8f68319 71 D15 = PA4,
AnnaBridge 187:0387e8f68319 72
AnnaBridge 187:0387e8f68319 73 A0 = PE0,
AnnaBridge 187:0387e8f68319 74 A1 = PE1,
AnnaBridge 187:0387e8f68319 75 A2 = PE2,
AnnaBridge 187:0387e8f68319 76 A3 = PE3,
AnnaBridge 187:0387e8f68319 77 A4 = PE4,
AnnaBridge 187:0387e8f68319 78 A5 = PE5,
AnnaBridge 187:0387e8f68319 79
AnnaBridge 187:0387e8f68319 80 DAC0 = PG0,
AnnaBridge 187:0387e8f68319 81 DAC1 = PG1,
AnnaBridge 187:0387e8f68319 82
AnnaBridge 187:0387e8f68319 83 USBTX = PJ2,
AnnaBridge 187:0387e8f68319 84 USBRX = PJ1,
AnnaBridge 187:0387e8f68319 85
AnnaBridge 187:0387e8f68319 86 SW1 = PN4,
AnnaBridge 187:0387e8f68319 87 SW2 = PN3,
AnnaBridge 187:0387e8f68319 88 SW3 = PN2,
AnnaBridge 187:0387e8f68319 89 SW4 = PN1,
AnnaBridge 187:0387e8f68319 90
AnnaBridge 187:0387e8f68319 91 // I2C
AnnaBridge 187:0387e8f68319 92 EEPROM_SDA = PC1,
AnnaBridge 187:0387e8f68319 93 EEPROM_SCL = PC0,
AnnaBridge 187:0387e8f68319 94
AnnaBridge 187:0387e8f68319 95 // TSPI
AnnaBridge 187:0387e8f68319 96 MOSI = PP1,
AnnaBridge 187:0387e8f68319 97 MISO = PP2,
AnnaBridge 187:0387e8f68319 98 SCLK = PP0,
AnnaBridge 187:0387e8f68319 99
AnnaBridge 187:0387e8f68319 100 // Not connected
AnnaBridge 187:0387e8f68319 101 NC = (int)0xFFFFFFFF,
AnnaBridge 187:0387e8f68319 102 } PinName;
AnnaBridge 187:0387e8f68319 103
AnnaBridge 187:0387e8f68319 104 typedef enum {
AnnaBridge 187:0387e8f68319 105 PullUp = 0,
AnnaBridge 187:0387e8f68319 106 PullDown,
AnnaBridge 187:0387e8f68319 107 PullNone,
AnnaBridge 187:0387e8f68319 108 OpenDrain,
AnnaBridge 187:0387e8f68319 109 PullDefault
AnnaBridge 187:0387e8f68319 110 } PinMode;
AnnaBridge 187:0387e8f68319 111
AnnaBridge 187:0387e8f68319 112 typedef enum {
AnnaBridge 187:0387e8f68319 113 DISABLE = 0,
AnnaBridge 187:0387e8f68319 114 ENABLE
AnnaBridge 187:0387e8f68319 115 } FunctionalState;
AnnaBridge 187:0387e8f68319 116
AnnaBridge 187:0387e8f68319 117 #ifdef __cplusplus
AnnaBridge 187:0387e8f68319 118 }
AnnaBridge 187:0387e8f68319 119 #endif
AnnaBridge 187:0387e8f68319 120
AnnaBridge 187:0387e8f68319 121 #endif