STM32F0xx Standard Peripherals Firmware Library: main.h Source File

STM32F0xx Standard Peripherals Library

STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/main.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    CRC/CRC_TwoBoards/main.h 
00004   * @author  MCD Application Team
00005   * @version V1.4.0
00006   * @date    24-July-2014
00007   * @brief   Header for main.c module
00008   ******************************************************************************
00009   * @attention
00010   *
00011   * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
00012   *
00013   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
00014   * You may not use this file except in compliance with the License.
00015   * You may obtain a copy of the License at:
00016   *
00017   *        http://www.st.com/software_license_agreement_liberty_v2
00018   *
00019   * Unless required by applicable law or agreed to in writing, software 
00020   * distributed under the License is distributed on an "AS IS" BASIS, 
00021   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00022   * See the License for the specific language governing permissions and
00023   * limitations under the License.
00024   *
00025   ******************************************************************************
00026   */
00027   
00028 /* Define to prevent recursive inclusion -------------------------------------*/
00029 #ifndef __MAIN_H
00030 #define __MAIN_H
00031 
00032 /* Includes ------------------------------------------------------------------*/
00033 #include "stm32f0xx.h"
00034 #ifdef USE_STM32072B_EVAL
00035   #include "stm32072b_eval.h" 
00036 #endif /* USE_STM32072B_EVAL */
00037 /* Exported typedef ----------------------------------------------------------*/
00038 #define countof(a)   (sizeof(a) / sizeof(*(a)))
00039 
00040 /* Exported define -----------------------------------------------------------*/
00041 
00042 /* Uncomment the line below if you will use the TRANSMITTER mode */
00043 #define MODE_TRANSMITTER  
00044 /* Uncomment the line below if you will use the RECIVER mode */
00045 //#define MODE_RECEIVER
00046 
00047 /* USART Communication boards Interface */
00048 #define USARTx                           USART2
00049 #define USARTx_CLK                       RCC_APB1Periph_USART2
00050 #define USARTx_APBPERIPHCLOCK            RCC_APB1PeriphClockCmd
00051 #define USARTx_IRQn                      USART2_IRQn
00052 #define USARTx_IRQHandler                USART2_IRQHandler
00053 
00054 #define USARTx_TX_PIN                    GPIO_Pin_5                
00055 #define USARTx_TX_GPIO_PORT              GPIOD                       
00056 #define USARTx_TX_GPIO_CLK               RCC_AHBPeriph_GPIOD
00057 #define USARTx_TX_SOURCE                 GPIO_PinSource5
00058 #define USARTx_TX_AF                     GPIO_AF_0
00059 
00060 #define USARTx_RX_PIN                    GPIO_Pin_6               
00061 #define USARTx_RX_GPIO_PORT              GPIOD              
00062 #define USARTx_RX_GPIO_CLK               RCC_AHBPeriph_GPIOD
00063 #define USARTx_RX_SOURCE                 GPIO_PinSource6
00064 #define USARTx_RX_AF                     GPIO_AF_0
00065 
00066 #define TXBUFFERSIZE                     (countof(TxBuffer) - 1)
00067 #define RXBUFFERSIZE                     TXBUFFERSIZE + 1
00068 
00069 /* Exported types ------------------------------------------------------------*/
00070 /* Exported constants --------------------------------------------------------*/
00071 /* Exported macro ------------------------------------------------------------*/
00072 /* Exported functions ------------------------------------------------------- */
00073 
00074 #endif /* __MAIN_H */
00075 
00076 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32