SPKT

Dependents:   WAV

Committer:
phungductung
Date:
Tue Jun 04 21:51:46 2019 +0000
Revision:
0:e87aa4c49e95
libray

Who changed what in which revision?

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