mbed.h library with any bug fixes AV finds.

Dependents:   micromouse4_encoder_testing PID_Test Lab1_Test WorkingPID ... more

Committer:
aravindsv
Date:
Mon Nov 02 03:07:12 2015 +0000
Revision:
1:ebce2ad32f95
Parent:
0:ba7650f404af
Changed the RCC timeout value to 500 ms, so total code startup time before program starts running is ~1s. Hopefully no side-effects from lower startup timeouts

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aravindsv 0:ba7650f404af 1 /* mbed Microcontroller Library
aravindsv 0:ba7650f404af 2 * Copyright (c) 2006-2013 ARM Limited
aravindsv 0:ba7650f404af 3 *
aravindsv 0:ba7650f404af 4 * Licensed under the Apache License, Version 2.0 (the "License");
aravindsv 0:ba7650f404af 5 * you may not use this file except in compliance with the License.
aravindsv 0:ba7650f404af 6 * You may obtain a copy of the License at
aravindsv 0:ba7650f404af 7 *
aravindsv 0:ba7650f404af 8 * http://www.apache.org/licenses/LICENSE-2.0
aravindsv 0:ba7650f404af 9 *
aravindsv 0:ba7650f404af 10 * Unless required by applicable law or agreed to in writing, software
aravindsv 0:ba7650f404af 11 * distributed under the License is distributed on an "AS IS" BASIS,
aravindsv 0:ba7650f404af 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
aravindsv 0:ba7650f404af 13 * See the License for the specific language governing permissions and
aravindsv 0:ba7650f404af 14 * limitations under the License.
aravindsv 0:ba7650f404af 15 */
aravindsv 0:ba7650f404af 16 #ifndef MBED_PINNAMES_H
aravindsv 0:ba7650f404af 17 #define MBED_PINNAMES_H
aravindsv 0:ba7650f404af 18
aravindsv 0:ba7650f404af 19 #include "cmsis.h"
aravindsv 0:ba7650f404af 20
aravindsv 0:ba7650f404af 21 #ifdef __cplusplus
aravindsv 0:ba7650f404af 22 extern "C" {
aravindsv 0:ba7650f404af 23 #endif
aravindsv 0:ba7650f404af 24
aravindsv 0:ba7650f404af 25 #define STM_PIN_DATA(MODE, FUNC) (((MODE) << 8) | (FUNC))
aravindsv 0:ba7650f404af 26 #define STM_PIN_MODE(X) ((X) >> 8)
aravindsv 0:ba7650f404af 27 #define STM_PIN_FUNC(X) ((X) & 0xFF)
aravindsv 0:ba7650f404af 28
aravindsv 0:ba7650f404af 29 typedef enum {
aravindsv 0:ba7650f404af 30 PIN_INPUT,
aravindsv 0:ba7650f404af 31 PIN_OUTPUT
aravindsv 0:ba7650f404af 32 } PinDirection;
aravindsv 0:ba7650f404af 33
aravindsv 0:ba7650f404af 34 #define PORT_SHIFT 6
aravindsv 0:ba7650f404af 35
aravindsv 0:ba7650f404af 36 typedef enum {
aravindsv 0:ba7650f404af 37 // STM32 Pin Names
aravindsv 0:ba7650f404af 38 PA_0 = 0, PA_1, PA_2, PA_3, PA_4, PA_5, PA_6, PA_7, PA_8, PA_9, PA_10, PA_11, PA_12, PA_13, PA_14, PA_15,
aravindsv 0:ba7650f404af 39 PB_0, PB_1, PB_2, PB_3, PB_4, PB_5, PB_6, PB_7, PB_8, PB_9, PB_10, PB_11, PB_12, PB_13, PB_14, PB_15,
aravindsv 0:ba7650f404af 40 PC_0, PC_1, PC_2, PC_3, PC_4, PC_5, PC_6, PC_7, PC_8, PC_9, PC_10, PC_11, PC_12, PC_13, PC_14, PC_15,
aravindsv 0:ba7650f404af 41 PD_0, PD_1, PD_2, PD_3, PD_4, PD_5, PD_6, PD_7, PD_8, PD_9, PD_10, PD_11, PD_12, PD_13, PD_14, PD_15,
aravindsv 0:ba7650f404af 42 PE_0, PE_1, PE_2, PE_3, PE_4, PE_5, PE_6, PE_7, PE_8, PE_9, PE_10, PE_11, PE_12, PE_13, PE_14, PE_15,
aravindsv 0:ba7650f404af 43 PF_0, PF_1, PF_2, PF_3, PF_4, PF_5, PF_6, PF_7, PF_8, PF_9, PF_10, PF_11, PF_12, PF_13, PF_14, PF_15,
aravindsv 0:ba7650f404af 44 PH_0, PH_1, PH_2, PH_3, PH_4, PH_5, PH_6, PH_7, PH_8, PH_9, PH_10, PH_11,
aravindsv 0:ba7650f404af 45
aravindsv 0:ba7650f404af 46 LED1 = PD_13,
aravindsv 0:ba7650f404af 47 LED2 = PD_12,
aravindsv 0:ba7650f404af 48 LED3 = PD_13,
aravindsv 0:ba7650f404af 49 LED4 = PD_12,
aravindsv 0:ba7650f404af 50 LED5 = PD_14,
aravindsv 0:ba7650f404af 51 LED6 = PD_15,
aravindsv 0:ba7650f404af 52
aravindsv 0:ba7650f404af 53 // Not connected
aravindsv 0:ba7650f404af 54 NC = (int)0xFFFFFFFF
aravindsv 0:ba7650f404af 55 } PinName;
aravindsv 0:ba7650f404af 56
aravindsv 0:ba7650f404af 57 typedef enum {
aravindsv 0:ba7650f404af 58 PullNone = 0,
aravindsv 0:ba7650f404af 59 PullUp = 1,
aravindsv 0:ba7650f404af 60 PullDown = 2,
aravindsv 0:ba7650f404af 61 OpenDrain = 3,
aravindsv 0:ba7650f404af 62 PullDefault = PullDown
aravindsv 0:ba7650f404af 63 } PinMode;
aravindsv 0:ba7650f404af 64
aravindsv 0:ba7650f404af 65 #ifdef __cplusplus
aravindsv 0:ba7650f404af 66 }
aravindsv 0:ba7650f404af 67 #endif
aravindsv 0:ba7650f404af 68
aravindsv 0:ba7650f404af 69 #endif