inport from local

Dependents:   Hobbyking_Cheetah_0511

Committer:
NYX
Date:
Mon Mar 16 06:35:48 2020 +0000
Revision:
0:85b3fd62ea1a
reinport to mbed;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NYX 0:85b3fd62ea1a 1 /* mbed Microcontroller Library
NYX 0:85b3fd62ea1a 2 *******************************************************************************
NYX 0:85b3fd62ea1a 3 * Copyright (c) 2014, STMicroelectronics
NYX 0:85b3fd62ea1a 4 * All rights reserved.
NYX 0:85b3fd62ea1a 5 *
NYX 0:85b3fd62ea1a 6 * Redistribution and use in source and binary forms, with or without
NYX 0:85b3fd62ea1a 7 * modification, are permitted provided that the following conditions are met:
NYX 0:85b3fd62ea1a 8 *
NYX 0:85b3fd62ea1a 9 * 1. Redistributions of source code must retain the above copyright notice,
NYX 0:85b3fd62ea1a 10 * this list of conditions and the following disclaimer.
NYX 0:85b3fd62ea1a 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
NYX 0:85b3fd62ea1a 12 * this list of conditions and the following disclaimer in the documentation
NYX 0:85b3fd62ea1a 13 * and/or other materials provided with the distribution.
NYX 0:85b3fd62ea1a 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
NYX 0:85b3fd62ea1a 15 * may be used to endorse or promote products derived from this software
NYX 0:85b3fd62ea1a 16 * without specific prior written permission.
NYX 0:85b3fd62ea1a 17 *
NYX 0:85b3fd62ea1a 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
NYX 0:85b3fd62ea1a 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
NYX 0:85b3fd62ea1a 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
NYX 0:85b3fd62ea1a 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
NYX 0:85b3fd62ea1a 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
NYX 0:85b3fd62ea1a 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
NYX 0:85b3fd62ea1a 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
NYX 0:85b3fd62ea1a 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
NYX 0:85b3fd62ea1a 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
NYX 0:85b3fd62ea1a 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NYX 0:85b3fd62ea1a 28 *******************************************************************************
NYX 0:85b3fd62ea1a 29 */
NYX 0:85b3fd62ea1a 30 #ifndef MBED_PERIPHERALNAMES_H
NYX 0:85b3fd62ea1a 31 #define MBED_PERIPHERALNAMES_H
NYX 0:85b3fd62ea1a 32
NYX 0:85b3fd62ea1a 33 #include "cmsis.h"
NYX 0:85b3fd62ea1a 34
NYX 0:85b3fd62ea1a 35 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 36 extern "C" {
NYX 0:85b3fd62ea1a 37 #endif
NYX 0:85b3fd62ea1a 38
NYX 0:85b3fd62ea1a 39 typedef enum {
NYX 0:85b3fd62ea1a 40 ADC_1 = (int)ADC1_BASE,
NYX 0:85b3fd62ea1a 41 ADC_2 = (int)ADC2_BASE,
NYX 0:85b3fd62ea1a 42 ADC_3 = (int)ADC3_BASE
NYX 0:85b3fd62ea1a 43 } ADCName;
NYX 0:85b3fd62ea1a 44
NYX 0:85b3fd62ea1a 45 typedef enum {
NYX 0:85b3fd62ea1a 46 DAC_1 = (int)DAC_BASE
NYX 0:85b3fd62ea1a 47 } DACName;
NYX 0:85b3fd62ea1a 48
NYX 0:85b3fd62ea1a 49 typedef enum {
NYX 0:85b3fd62ea1a 50 UART_1 = (int)USART1_BASE,
NYX 0:85b3fd62ea1a 51 UART_2 = (int)USART2_BASE,
NYX 0:85b3fd62ea1a 52 UART_3 = (int)USART3_BASE,
NYX 0:85b3fd62ea1a 53 UART_4 = (int)UART4_BASE,
NYX 0:85b3fd62ea1a 54 UART_5 = (int)UART5_BASE,
NYX 0:85b3fd62ea1a 55 UART_6 = (int)USART6_BASE
NYX 0:85b3fd62ea1a 56 } UARTName;
NYX 0:85b3fd62ea1a 57
NYX 0:85b3fd62ea1a 58 #define STDIO_UART_TX PA_2
NYX 0:85b3fd62ea1a 59 #define STDIO_UART_RX PA_3
NYX 0:85b3fd62ea1a 60 #define STDIO_UART UART_2
NYX 0:85b3fd62ea1a 61
NYX 0:85b3fd62ea1a 62 typedef enum {
NYX 0:85b3fd62ea1a 63 SPI_1 = (int)SPI1_BASE,
NYX 0:85b3fd62ea1a 64 SPI_2 = (int)SPI2_BASE,
NYX 0:85b3fd62ea1a 65 SPI_3 = (int)SPI3_BASE,
NYX 0:85b3fd62ea1a 66 SPI_4 = (int)SPI4_BASE
NYX 0:85b3fd62ea1a 67 } SPIName;
NYX 0:85b3fd62ea1a 68
NYX 0:85b3fd62ea1a 69 typedef enum {
NYX 0:85b3fd62ea1a 70 I2C_1 = (int)I2C1_BASE,
NYX 0:85b3fd62ea1a 71 I2C_2 = (int)I2C2_BASE,
NYX 0:85b3fd62ea1a 72 I2C_3 = (int)I2C3_BASE,
NYX 0:85b3fd62ea1a 73 FMPI2C_1 = (int)FMPI2C1_BASE
NYX 0:85b3fd62ea1a 74 } I2CName;
NYX 0:85b3fd62ea1a 75
NYX 0:85b3fd62ea1a 76 typedef enum {
NYX 0:85b3fd62ea1a 77 PWM_1 = (int)TIM1_BASE,
NYX 0:85b3fd62ea1a 78 PWM_2 = (int)TIM2_BASE,
NYX 0:85b3fd62ea1a 79 PWM_3 = (int)TIM3_BASE,
NYX 0:85b3fd62ea1a 80 PWM_4 = (int)TIM4_BASE,
NYX 0:85b3fd62ea1a 81 PWM_5 = (int)TIM5_BASE,
NYX 0:85b3fd62ea1a 82 PWM_8 = (int)TIM8_BASE,
NYX 0:85b3fd62ea1a 83 PWM_9 = (int)TIM9_BASE,
NYX 0:85b3fd62ea1a 84 PWM_10 = (int)TIM10_BASE,
NYX 0:85b3fd62ea1a 85 PWM_11 = (int)TIM11_BASE,
NYX 0:85b3fd62ea1a 86 PWM_12 = (int)TIM12_BASE,
NYX 0:85b3fd62ea1a 87 PWM_13 = (int)TIM13_BASE,
NYX 0:85b3fd62ea1a 88 PWM_14 = (int)TIM14_BASE
NYX 0:85b3fd62ea1a 89 } PWMName;
NYX 0:85b3fd62ea1a 90
NYX 0:85b3fd62ea1a 91 typedef enum {
NYX 0:85b3fd62ea1a 92 CAN_1 = (int)CAN1_BASE,
NYX 0:85b3fd62ea1a 93 CAN_2 = (int)CAN2_BASE
NYX 0:85b3fd62ea1a 94 } CANName;
NYX 0:85b3fd62ea1a 95
NYX 0:85b3fd62ea1a 96 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 97 }
NYX 0:85b3fd62ea1a 98 #endif
NYX 0:85b3fd62ea1a 99
NYX 0:85b3fd62ea1a 100 #endif