STM32F0xx Standard Peripherals Firmware Library: main.h Source File

STM32F0xx Standard Peripherals Library

STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    I2C/I2C_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 #include "stm32f0xx_i2c_cpal.h"
00035 #ifdef USE_STM320518_EVAL
00036   #include "stm320518_eval.h"
00037   #include "stm320518_eval_lcd.h"
00038 #else 
00039   #include "stm32072b_eval.h"
00040   #include "stm32072b_eval_lcd.h"
00041 #endif /* USE_STM320518_EVAL */
00042 
00043 /* Exported types ------------------------------------------------------------*/
00044 /* Exported constants --------------------------------------------------------*/
00045 
00046 /* This define select used I2Cx device for communication */
00047 
00048 #define I2C_DevStructure        I2C1_DevStructure
00049 
00050 
00051 #define countof(a) (sizeof(a) / sizeof(*(a)))
00052 
00053 #define MESSAGE1                (uint8_t*)"---STM32 CPAL Lib---"
00054 #define MESSAGE2                (uint8_t*)"I2C 2xBoards Example"
00055 #define MESSAGE3                (uint8_t*)"-------READY--------"
00056 
00057 #define MEASSAGE_EMPTY          (uint8_t*)"                    "
00058 
00059 #define MAX_BUFF_SIZE           200
00060 #define BUFFER_SIZE             (countof(tStateSignal)-1)
00061 
00062 #define OWN_ADDRESS             0x74
00063 
00064 #define I2C_TIMING              0x00731012 
00065 
00066 #define ACTION_NONE             0xFF
00067 #define ACTION_DISABLED         0xFD
00068 #define ACTION_PENDING          0xFE
00069 #define ACTION_PERIODIC         0xFC
00070 
00071 #define STATE_OFF               0
00072 #define STATE_ON                1
00073 
00074 /* Exported macro ------------------------------------------------------------*/
00075 /* Exported functions ------------------------------------------------------- */
00076 
00077 #endif /* __MAIN_H */
00078 
00079 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
STM32L1xx Standard Peripherals Library: Footer

 

 

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