mbed.h library with any bug fixes AV finds.
Dependents: micromouse4_encoder_testing PID_Test Lab1_Test WorkingPID ... more
targets/hal/TARGET_STM/TARGET_STM32F3XX/PinNames.h@0:ba7650f404af, 2015-11-02 (annotated)
- Committer:
- aravindsv
- Date:
- Mon Nov 02 02:26:59 2015 +0000
- Revision:
- 0:ba7650f404af
Reduced HSE_STARTUP_TIMEOUT to 500 ms, fixed some compiler warnings
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aravindsv | 0:ba7650f404af | 1 | /* mbed Microcontroller Library |
aravindsv | 0:ba7650f404af | 2 | ******************************************************************************* |
aravindsv | 0:ba7650f404af | 3 | * Copyright (c) 2014, STMicroelectronics |
aravindsv | 0:ba7650f404af | 4 | * All rights reserved. |
aravindsv | 0:ba7650f404af | 5 | * |
aravindsv | 0:ba7650f404af | 6 | * Redistribution and use in source and binary forms, with or without |
aravindsv | 0:ba7650f404af | 7 | * modification, are permitted provided that the following conditions are met: |
aravindsv | 0:ba7650f404af | 8 | * |
aravindsv | 0:ba7650f404af | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
aravindsv | 0:ba7650f404af | 10 | * this list of conditions and the following disclaimer. |
aravindsv | 0:ba7650f404af | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
aravindsv | 0:ba7650f404af | 12 | * this list of conditions and the following disclaimer in the documentation |
aravindsv | 0:ba7650f404af | 13 | * and/or other materials provided with the distribution. |
aravindsv | 0:ba7650f404af | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
aravindsv | 0:ba7650f404af | 15 | * may be used to endorse or promote products derived from this software |
aravindsv | 0:ba7650f404af | 16 | * without specific prior written permission. |
aravindsv | 0:ba7650f404af | 17 | * |
aravindsv | 0:ba7650f404af | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
aravindsv | 0:ba7650f404af | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
aravindsv | 0:ba7650f404af | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
aravindsv | 0:ba7650f404af | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
aravindsv | 0:ba7650f404af | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
aravindsv | 0:ba7650f404af | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
aravindsv | 0:ba7650f404af | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
aravindsv | 0:ba7650f404af | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
aravindsv | 0:ba7650f404af | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
aravindsv | 0:ba7650f404af | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
aravindsv | 0:ba7650f404af | 28 | ******************************************************************************* |
aravindsv | 0:ba7650f404af | 29 | */ |
aravindsv | 0:ba7650f404af | 30 | #ifndef MBED_PINNAMES_H |
aravindsv | 0:ba7650f404af | 31 | #define MBED_PINNAMES_H |
aravindsv | 0:ba7650f404af | 32 | |
aravindsv | 0:ba7650f404af | 33 | #include "cmsis.h" |
aravindsv | 0:ba7650f404af | 34 | |
aravindsv | 0:ba7650f404af | 35 | #ifdef __cplusplus |
aravindsv | 0:ba7650f404af | 36 | extern "C" { |
aravindsv | 0:ba7650f404af | 37 | #endif |
aravindsv | 0:ba7650f404af | 38 | |
aravindsv | 0:ba7650f404af | 39 | // MODE (see GPIOMode_TypeDef structure) |
aravindsv | 0:ba7650f404af | 40 | // OTYPE (see GPIOOType_TypeDef structure) |
aravindsv | 0:ba7650f404af | 41 | // PUPD (see GPIOPuPd_TypeDef structure) |
aravindsv | 0:ba7650f404af | 42 | // AFNUM (see AF_mapping constant table, 0xFF is not used) |
aravindsv | 0:ba7650f404af | 43 | #define STM_PIN_DATA(MODE, OTYPE, PUPD, AFNUM) (((AFNUM)<<8)|((PUPD)<<4)|((OTYPE)<<2)|((MODE)<<0)) |
aravindsv | 0:ba7650f404af | 44 | #define STM_PIN_MODE(X) (((X)>>0) & 0x3) |
aravindsv | 0:ba7650f404af | 45 | #define STM_PIN_OTYPE(X) (((X)>>2) & 0x1) |
aravindsv | 0:ba7650f404af | 46 | #define STM_PIN_PUPD(X) (((X)>>4) & 0x3) |
aravindsv | 0:ba7650f404af | 47 | #define STM_PIN_AFNUM(X) (((X)>>8) & 0xF) |
aravindsv | 0:ba7650f404af | 48 | |
aravindsv | 0:ba7650f404af | 49 | // High nibble = port number (0=A, 1=B, 2=C, 3=D, 4=E, 5=F, 6=G, 7=H) |
aravindsv | 0:ba7650f404af | 50 | // Low nibble = pin number |
aravindsv | 0:ba7650f404af | 51 | #define STM_PORT(X) (((uint32_t)(X) >> 4) & 0xF) |
aravindsv | 0:ba7650f404af | 52 | #define STM_PIN(X) ((uint32_t)(X) & 0xF) |
aravindsv | 0:ba7650f404af | 53 | |
aravindsv | 0:ba7650f404af | 54 | typedef enum { |
aravindsv | 0:ba7650f404af | 55 | PIN_INPUT, |
aravindsv | 0:ba7650f404af | 56 | PIN_OUTPUT |
aravindsv | 0:ba7650f404af | 57 | } PinDirection; |
aravindsv | 0:ba7650f404af | 58 | |
aravindsv | 0:ba7650f404af | 59 | typedef enum { |
aravindsv | 0:ba7650f404af | 60 | PA_0 = 0x00, |
aravindsv | 0:ba7650f404af | 61 | PA_1 = 0x01, |
aravindsv | 0:ba7650f404af | 62 | PA_2 = 0x02, |
aravindsv | 0:ba7650f404af | 63 | PA_3 = 0x03, |
aravindsv | 0:ba7650f404af | 64 | PA_4 = 0x04, |
aravindsv | 0:ba7650f404af | 65 | PA_5 = 0x05, |
aravindsv | 0:ba7650f404af | 66 | PA_6 = 0x06, |
aravindsv | 0:ba7650f404af | 67 | PA_7 = 0x07, |
aravindsv | 0:ba7650f404af | 68 | PA_8 = 0x08, |
aravindsv | 0:ba7650f404af | 69 | PA_9 = 0x09, |
aravindsv | 0:ba7650f404af | 70 | PA_10 = 0x0A, |
aravindsv | 0:ba7650f404af | 71 | PA_11 = 0x0B, |
aravindsv | 0:ba7650f404af | 72 | PA_12 = 0x0C, |
aravindsv | 0:ba7650f404af | 73 | PA_13 = 0x0D, |
aravindsv | 0:ba7650f404af | 74 | PA_14 = 0x0E, |
aravindsv | 0:ba7650f404af | 75 | PA_15 = 0x0F, |
aravindsv | 0:ba7650f404af | 76 | |
aravindsv | 0:ba7650f404af | 77 | PB_0 = 0x10, |
aravindsv | 0:ba7650f404af | 78 | PB_1 = 0x11, |
aravindsv | 0:ba7650f404af | 79 | PB_2 = 0x12, |
aravindsv | 0:ba7650f404af | 80 | PB_3 = 0x13, |
aravindsv | 0:ba7650f404af | 81 | PB_4 = 0x14, |
aravindsv | 0:ba7650f404af | 82 | PB_5 = 0x15, |
aravindsv | 0:ba7650f404af | 83 | PB_6 = 0x16, |
aravindsv | 0:ba7650f404af | 84 | PB_7 = 0x17, |
aravindsv | 0:ba7650f404af | 85 | PB_8 = 0x18, |
aravindsv | 0:ba7650f404af | 86 | PB_9 = 0x19, |
aravindsv | 0:ba7650f404af | 87 | PB_10 = 0x1A, |
aravindsv | 0:ba7650f404af | 88 | PB_11 = 0x1B, |
aravindsv | 0:ba7650f404af | 89 | PB_12 = 0x1C, |
aravindsv | 0:ba7650f404af | 90 | PB_13 = 0x1D, |
aravindsv | 0:ba7650f404af | 91 | PB_14 = 0x1E, |
aravindsv | 0:ba7650f404af | 92 | PB_15 = 0x1F, |
aravindsv | 0:ba7650f404af | 93 | |
aravindsv | 0:ba7650f404af | 94 | PC_0 = 0x20, |
aravindsv | 0:ba7650f404af | 95 | PC_1 = 0x21, |
aravindsv | 0:ba7650f404af | 96 | PC_2 = 0x22, |
aravindsv | 0:ba7650f404af | 97 | PC_3 = 0x23, |
aravindsv | 0:ba7650f404af | 98 | PC_4 = 0x24, |
aravindsv | 0:ba7650f404af | 99 | PC_5 = 0x25, |
aravindsv | 0:ba7650f404af | 100 | PC_6 = 0x26, |
aravindsv | 0:ba7650f404af | 101 | PC_7 = 0x27, |
aravindsv | 0:ba7650f404af | 102 | PC_8 = 0x28, |
aravindsv | 0:ba7650f404af | 103 | PC_9 = 0x29, |
aravindsv | 0:ba7650f404af | 104 | PC_10 = 0x2A, |
aravindsv | 0:ba7650f404af | 105 | PC_11 = 0x2B, |
aravindsv | 0:ba7650f404af | 106 | PC_12 = 0x2C, |
aravindsv | 0:ba7650f404af | 107 | PC_13 = 0x2D, |
aravindsv | 0:ba7650f404af | 108 | PC_14 = 0x2E, |
aravindsv | 0:ba7650f404af | 109 | PC_15 = 0x2F, |
aravindsv | 0:ba7650f404af | 110 | |
aravindsv | 0:ba7650f404af | 111 | PD_0 = 0x30, |
aravindsv | 0:ba7650f404af | 112 | PD_1 = 0x31, |
aravindsv | 0:ba7650f404af | 113 | PD_2 = 0x32, |
aravindsv | 0:ba7650f404af | 114 | PD_3 = 0x33, |
aravindsv | 0:ba7650f404af | 115 | PD_4 = 0x34, |
aravindsv | 0:ba7650f404af | 116 | PD_5 = 0x35, |
aravindsv | 0:ba7650f404af | 117 | PD_6 = 0x36, |
aravindsv | 0:ba7650f404af | 118 | PD_7 = 0x37, |
aravindsv | 0:ba7650f404af | 119 | PD_8 = 0x38, |
aravindsv | 0:ba7650f404af | 120 | PD_9 = 0x39, |
aravindsv | 0:ba7650f404af | 121 | PD_10 = 0x3A, |
aravindsv | 0:ba7650f404af | 122 | PD_11 = 0x3B, |
aravindsv | 0:ba7650f404af | 123 | PD_12 = 0x3C, |
aravindsv | 0:ba7650f404af | 124 | PD_13 = 0x3D, |
aravindsv | 0:ba7650f404af | 125 | PD_14 = 0x3E, |
aravindsv | 0:ba7650f404af | 126 | PD_15 = 0x3F, |
aravindsv | 0:ba7650f404af | 127 | |
aravindsv | 0:ba7650f404af | 128 | PE_0 = 0x40, |
aravindsv | 0:ba7650f404af | 129 | PE_1 = 0x41, |
aravindsv | 0:ba7650f404af | 130 | PE_2 = 0x42, |
aravindsv | 0:ba7650f404af | 131 | PE_3 = 0x43, |
aravindsv | 0:ba7650f404af | 132 | PE_4 = 0x44, |
aravindsv | 0:ba7650f404af | 133 | PE_5 = 0x45, |
aravindsv | 0:ba7650f404af | 134 | PE_6 = 0x46, |
aravindsv | 0:ba7650f404af | 135 | PE_7 = 0x47, |
aravindsv | 0:ba7650f404af | 136 | PE_8 = 0x48, |
aravindsv | 0:ba7650f404af | 137 | PE_9 = 0x49, |
aravindsv | 0:ba7650f404af | 138 | PE_10 = 0x4A, |
aravindsv | 0:ba7650f404af | 139 | PE_11 = 0x4B, |
aravindsv | 0:ba7650f404af | 140 | PE_12 = 0x4C, |
aravindsv | 0:ba7650f404af | 141 | PE_13 = 0x4D, |
aravindsv | 0:ba7650f404af | 142 | PE_14 = 0x4E, |
aravindsv | 0:ba7650f404af | 143 | PE_15 = 0x4F, |
aravindsv | 0:ba7650f404af | 144 | |
aravindsv | 0:ba7650f404af | 145 | PF_0 = 0x50, |
aravindsv | 0:ba7650f404af | 146 | PF_1 = 0x51, |
aravindsv | 0:ba7650f404af | 147 | PF_2 = 0x52, |
aravindsv | 0:ba7650f404af | 148 | PF_3 = 0x53, |
aravindsv | 0:ba7650f404af | 149 | PF_4 = 0x54, |
aravindsv | 0:ba7650f404af | 150 | PF_5 = 0x55, |
aravindsv | 0:ba7650f404af | 151 | PF_6 = 0x56, |
aravindsv | 0:ba7650f404af | 152 | PF_7 = 0x57, |
aravindsv | 0:ba7650f404af | 153 | PF_8 = 0x58, |
aravindsv | 0:ba7650f404af | 154 | PF_9 = 0x59, |
aravindsv | 0:ba7650f404af | 155 | PF_10 = 0x5A, |
aravindsv | 0:ba7650f404af | 156 | PF_11 = 0x5B, |
aravindsv | 0:ba7650f404af | 157 | PF_12 = 0x5C, |
aravindsv | 0:ba7650f404af | 158 | PF_13 = 0x5D, |
aravindsv | 0:ba7650f404af | 159 | PF_14 = 0x5E, |
aravindsv | 0:ba7650f404af | 160 | PF_15 = 0x5F, |
aravindsv | 0:ba7650f404af | 161 | |
aravindsv | 0:ba7650f404af | 162 | LED1 = PE_9, |
aravindsv | 0:ba7650f404af | 163 | |
aravindsv | 0:ba7650f404af | 164 | // Not connected |
aravindsv | 0:ba7650f404af | 165 | NC = (int)0xFFFFFFFF |
aravindsv | 0:ba7650f404af | 166 | } PinName; |
aravindsv | 0:ba7650f404af | 167 | |
aravindsv | 0:ba7650f404af | 168 | typedef enum { |
aravindsv | 0:ba7650f404af | 169 | PullNone = 0, |
aravindsv | 0:ba7650f404af | 170 | PullUp = 1, |
aravindsv | 0:ba7650f404af | 171 | PullDown = 2, |
aravindsv | 0:ba7650f404af | 172 | OpenDrain = 3, |
aravindsv | 0:ba7650f404af | 173 | PullDefault = PullNone |
aravindsv | 0:ba7650f404af | 174 | } PinMode; |
aravindsv | 0:ba7650f404af | 175 | |
aravindsv | 0:ba7650f404af | 176 | #ifdef __cplusplus |
aravindsv | 0:ba7650f404af | 177 | } |
aravindsv | 0:ba7650f404af | 178 | #endif |
aravindsv | 0:ba7650f404af | 179 | |
aravindsv | 0:ba7650f404af | 180 | #endif |