/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc/fsl_adc_hal.h substitute line 894 extern } by }

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Mon Dec 09 18:43:03 2013 +0200
Revision:
73:1efda918f0ba
Child:
76:824293ae5e43
Release 73 of the mbed library

Main changes:

- added support for KL46Z and NUCLEO_F103RB
- STM32 USB device support
- various bug fixes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 73:1efda918f0ba 1 /**
bogdanm 73:1efda918f0ba 2 ******************************************************************************
bogdanm 73:1efda918f0ba 3 * @file stm32f10x_cec.h
bogdanm 73:1efda918f0ba 4 * @author MCD Application Team
bogdanm 73:1efda918f0ba 5 * @version V3.5.0
bogdanm 73:1efda918f0ba 6 * @date 11-March-2011
bogdanm 73:1efda918f0ba 7 * @brief This file contains all the functions prototypes for the CEC firmware
bogdanm 73:1efda918f0ba 8 * library.
bogdanm 73:1efda918f0ba 9 ******************************************************************************
bogdanm 73:1efda918f0ba 10 * @attention
bogdanm 73:1efda918f0ba 11 *
bogdanm 73:1efda918f0ba 12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
bogdanm 73:1efda918f0ba 13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
bogdanm 73:1efda918f0ba 14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
bogdanm 73:1efda918f0ba 15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
bogdanm 73:1efda918f0ba 16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
bogdanm 73:1efda918f0ba 17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
bogdanm 73:1efda918f0ba 18 *
bogdanm 73:1efda918f0ba 19 * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
bogdanm 73:1efda918f0ba 20 ******************************************************************************
bogdanm 73:1efda918f0ba 21 */
bogdanm 73:1efda918f0ba 22
bogdanm 73:1efda918f0ba 23 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 73:1efda918f0ba 24 #ifndef __STM32F10x_CEC_H
bogdanm 73:1efda918f0ba 25 #define __STM32F10x_CEC_H
bogdanm 73:1efda918f0ba 26
bogdanm 73:1efda918f0ba 27 #ifdef __cplusplus
bogdanm 73:1efda918f0ba 28 extern "C" {
bogdanm 73:1efda918f0ba 29 #endif
bogdanm 73:1efda918f0ba 30
bogdanm 73:1efda918f0ba 31 /* Includes ------------------------------------------------------------------*/
bogdanm 73:1efda918f0ba 32 #include "stm32f10x.h"
bogdanm 73:1efda918f0ba 33
bogdanm 73:1efda918f0ba 34 /** @addtogroup STM32F10x_StdPeriph_Driver
bogdanm 73:1efda918f0ba 35 * @{
bogdanm 73:1efda918f0ba 36 */
bogdanm 73:1efda918f0ba 37
bogdanm 73:1efda918f0ba 38 /** @addtogroup CEC
bogdanm 73:1efda918f0ba 39 * @{
bogdanm 73:1efda918f0ba 40 */
bogdanm 73:1efda918f0ba 41
bogdanm 73:1efda918f0ba 42
bogdanm 73:1efda918f0ba 43 /** @defgroup CEC_Exported_Types
bogdanm 73:1efda918f0ba 44 * @{
bogdanm 73:1efda918f0ba 45 */
bogdanm 73:1efda918f0ba 46
bogdanm 73:1efda918f0ba 47 /**
bogdanm 73:1efda918f0ba 48 * @brief CEC Init structure definition
bogdanm 73:1efda918f0ba 49 */
bogdanm 73:1efda918f0ba 50 typedef struct
bogdanm 73:1efda918f0ba 51 {
bogdanm 73:1efda918f0ba 52 uint16_t CEC_BitTimingMode; /*!< Configures the CEC Bit Timing Error Mode.
bogdanm 73:1efda918f0ba 53 This parameter can be a value of @ref CEC_BitTiming_Mode */
bogdanm 73:1efda918f0ba 54 uint16_t CEC_BitPeriodMode; /*!< Configures the CEC Bit Period Error Mode.
bogdanm 73:1efda918f0ba 55 This parameter can be a value of @ref CEC_BitPeriod_Mode */
bogdanm 73:1efda918f0ba 56 }CEC_InitTypeDef;
bogdanm 73:1efda918f0ba 57
bogdanm 73:1efda918f0ba 58 /**
bogdanm 73:1efda918f0ba 59 * @}
bogdanm 73:1efda918f0ba 60 */
bogdanm 73:1efda918f0ba 61
bogdanm 73:1efda918f0ba 62 /** @defgroup CEC_Exported_Constants
bogdanm 73:1efda918f0ba 63 * @{
bogdanm 73:1efda918f0ba 64 */
bogdanm 73:1efda918f0ba 65
bogdanm 73:1efda918f0ba 66 /** @defgroup CEC_BitTiming_Mode
bogdanm 73:1efda918f0ba 67 * @{
bogdanm 73:1efda918f0ba 68 */
bogdanm 73:1efda918f0ba 69 #define CEC_BitTimingStdMode ((uint16_t)0x00) /*!< Bit timing error Standard Mode */
bogdanm 73:1efda918f0ba 70 #define CEC_BitTimingErrFreeMode CEC_CFGR_BTEM /*!< Bit timing error Free Mode */
bogdanm 73:1efda918f0ba 71
bogdanm 73:1efda918f0ba 72 #define IS_CEC_BIT_TIMING_ERROR_MODE(MODE) (((MODE) == CEC_BitTimingStdMode) || \
bogdanm 73:1efda918f0ba 73 ((MODE) == CEC_BitTimingErrFreeMode))
bogdanm 73:1efda918f0ba 74 /**
bogdanm 73:1efda918f0ba 75 * @}
bogdanm 73:1efda918f0ba 76 */
bogdanm 73:1efda918f0ba 77
bogdanm 73:1efda918f0ba 78 /** @defgroup CEC_BitPeriod_Mode
bogdanm 73:1efda918f0ba 79 * @{
bogdanm 73:1efda918f0ba 80 */
bogdanm 73:1efda918f0ba 81 #define CEC_BitPeriodStdMode ((uint16_t)0x00) /*!< Bit period error Standard Mode */
bogdanm 73:1efda918f0ba 82 #define CEC_BitPeriodFlexibleMode CEC_CFGR_BPEM /*!< Bit period error Flexible Mode */
bogdanm 73:1efda918f0ba 83
bogdanm 73:1efda918f0ba 84 #define IS_CEC_BIT_PERIOD_ERROR_MODE(MODE) (((MODE) == CEC_BitPeriodStdMode) || \
bogdanm 73:1efda918f0ba 85 ((MODE) == CEC_BitPeriodFlexibleMode))
bogdanm 73:1efda918f0ba 86 /**
bogdanm 73:1efda918f0ba 87 * @}
bogdanm 73:1efda918f0ba 88 */
bogdanm 73:1efda918f0ba 89
bogdanm 73:1efda918f0ba 90
bogdanm 73:1efda918f0ba 91 /** @defgroup CEC_interrupts_definition
bogdanm 73:1efda918f0ba 92 * @{
bogdanm 73:1efda918f0ba 93 */
bogdanm 73:1efda918f0ba 94 #define CEC_IT_TERR CEC_CSR_TERR
bogdanm 73:1efda918f0ba 95 #define CEC_IT_TBTRF CEC_CSR_TBTRF
bogdanm 73:1efda918f0ba 96 #define CEC_IT_RERR CEC_CSR_RERR
bogdanm 73:1efda918f0ba 97 #define CEC_IT_RBTF CEC_CSR_RBTF
bogdanm 73:1efda918f0ba 98 #define IS_CEC_GET_IT(IT) (((IT) == CEC_IT_TERR) || ((IT) == CEC_IT_TBTRF) || \
bogdanm 73:1efda918f0ba 99 ((IT) == CEC_IT_RERR) || ((IT) == CEC_IT_RBTF))
bogdanm 73:1efda918f0ba 100 /**
bogdanm 73:1efda918f0ba 101 * @}
bogdanm 73:1efda918f0ba 102 */
bogdanm 73:1efda918f0ba 103
bogdanm 73:1efda918f0ba 104
bogdanm 73:1efda918f0ba 105 /** @defgroup CEC_Own_Address
bogdanm 73:1efda918f0ba 106 * @{
bogdanm 73:1efda918f0ba 107 */
bogdanm 73:1efda918f0ba 108 #define IS_CEC_ADDRESS(ADDRESS) ((ADDRESS) < 0x10)
bogdanm 73:1efda918f0ba 109 /**
bogdanm 73:1efda918f0ba 110 * @}
bogdanm 73:1efda918f0ba 111 */
bogdanm 73:1efda918f0ba 112
bogdanm 73:1efda918f0ba 113 /** @defgroup CEC_Prescaler
bogdanm 73:1efda918f0ba 114 * @{
bogdanm 73:1efda918f0ba 115 */
bogdanm 73:1efda918f0ba 116 #define IS_CEC_PRESCALER(PRESCALER) ((PRESCALER) <= 0x3FFF)
bogdanm 73:1efda918f0ba 117
bogdanm 73:1efda918f0ba 118 /**
bogdanm 73:1efda918f0ba 119 * @}
bogdanm 73:1efda918f0ba 120 */
bogdanm 73:1efda918f0ba 121
bogdanm 73:1efda918f0ba 122 /** @defgroup CEC_flags_definition
bogdanm 73:1efda918f0ba 123 * @{
bogdanm 73:1efda918f0ba 124 */
bogdanm 73:1efda918f0ba 125
bogdanm 73:1efda918f0ba 126 /**
bogdanm 73:1efda918f0ba 127 * @brief ESR register flags
bogdanm 73:1efda918f0ba 128 */
bogdanm 73:1efda918f0ba 129 #define CEC_FLAG_BTE ((uint32_t)0x10010000)
bogdanm 73:1efda918f0ba 130 #define CEC_FLAG_BPE ((uint32_t)0x10020000)
bogdanm 73:1efda918f0ba 131 #define CEC_FLAG_RBTFE ((uint32_t)0x10040000)
bogdanm 73:1efda918f0ba 132 #define CEC_FLAG_SBE ((uint32_t)0x10080000)
bogdanm 73:1efda918f0ba 133 #define CEC_FLAG_ACKE ((uint32_t)0x10100000)
bogdanm 73:1efda918f0ba 134 #define CEC_FLAG_LINE ((uint32_t)0x10200000)
bogdanm 73:1efda918f0ba 135 #define CEC_FLAG_TBTFE ((uint32_t)0x10400000)
bogdanm 73:1efda918f0ba 136
bogdanm 73:1efda918f0ba 137 /**
bogdanm 73:1efda918f0ba 138 * @brief CSR register flags
bogdanm 73:1efda918f0ba 139 */
bogdanm 73:1efda918f0ba 140 #define CEC_FLAG_TEOM ((uint32_t)0x00000002)
bogdanm 73:1efda918f0ba 141 #define CEC_FLAG_TERR ((uint32_t)0x00000004)
bogdanm 73:1efda918f0ba 142 #define CEC_FLAG_TBTRF ((uint32_t)0x00000008)
bogdanm 73:1efda918f0ba 143 #define CEC_FLAG_RSOM ((uint32_t)0x00000010)
bogdanm 73:1efda918f0ba 144 #define CEC_FLAG_REOM ((uint32_t)0x00000020)
bogdanm 73:1efda918f0ba 145 #define CEC_FLAG_RERR ((uint32_t)0x00000040)
bogdanm 73:1efda918f0ba 146 #define CEC_FLAG_RBTF ((uint32_t)0x00000080)
bogdanm 73:1efda918f0ba 147
bogdanm 73:1efda918f0ba 148 #define IS_CEC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFF03) == 0x00) && ((FLAG) != 0x00))
bogdanm 73:1efda918f0ba 149
bogdanm 73:1efda918f0ba 150 #define IS_CEC_GET_FLAG(FLAG) (((FLAG) == CEC_FLAG_BTE) || ((FLAG) == CEC_FLAG_BPE) || \
bogdanm 73:1efda918f0ba 151 ((FLAG) == CEC_FLAG_RBTFE) || ((FLAG)== CEC_FLAG_SBE) || \
bogdanm 73:1efda918f0ba 152 ((FLAG) == CEC_FLAG_ACKE) || ((FLAG) == CEC_FLAG_LINE) || \
bogdanm 73:1efda918f0ba 153 ((FLAG) == CEC_FLAG_TBTFE) || ((FLAG) == CEC_FLAG_TEOM) || \
bogdanm 73:1efda918f0ba 154 ((FLAG) == CEC_FLAG_TERR) || ((FLAG) == CEC_FLAG_TBTRF) || \
bogdanm 73:1efda918f0ba 155 ((FLAG) == CEC_FLAG_RSOM) || ((FLAG) == CEC_FLAG_REOM) || \
bogdanm 73:1efda918f0ba 156 ((FLAG) == CEC_FLAG_RERR) || ((FLAG) == CEC_FLAG_RBTF))
bogdanm 73:1efda918f0ba 157
bogdanm 73:1efda918f0ba 158 /**
bogdanm 73:1efda918f0ba 159 * @}
bogdanm 73:1efda918f0ba 160 */
bogdanm 73:1efda918f0ba 161
bogdanm 73:1efda918f0ba 162 /**
bogdanm 73:1efda918f0ba 163 * @}
bogdanm 73:1efda918f0ba 164 */
bogdanm 73:1efda918f0ba 165
bogdanm 73:1efda918f0ba 166 /** @defgroup CEC_Exported_Macros
bogdanm 73:1efda918f0ba 167 * @{
bogdanm 73:1efda918f0ba 168 */
bogdanm 73:1efda918f0ba 169
bogdanm 73:1efda918f0ba 170 /**
bogdanm 73:1efda918f0ba 171 * @}
bogdanm 73:1efda918f0ba 172 */
bogdanm 73:1efda918f0ba 173
bogdanm 73:1efda918f0ba 174 /** @defgroup CEC_Exported_Functions
bogdanm 73:1efda918f0ba 175 * @{
bogdanm 73:1efda918f0ba 176 */
bogdanm 73:1efda918f0ba 177 void CEC_DeInit(void);
bogdanm 73:1efda918f0ba 178 void CEC_Init(CEC_InitTypeDef* CEC_InitStruct);
bogdanm 73:1efda918f0ba 179 void CEC_Cmd(FunctionalState NewState);
bogdanm 73:1efda918f0ba 180 void CEC_ITConfig(FunctionalState NewState);
bogdanm 73:1efda918f0ba 181 void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress);
bogdanm 73:1efda918f0ba 182 void CEC_SetPrescaler(uint16_t CEC_Prescaler);
bogdanm 73:1efda918f0ba 183 void CEC_SendDataByte(uint8_t Data);
bogdanm 73:1efda918f0ba 184 uint8_t CEC_ReceiveDataByte(void);
bogdanm 73:1efda918f0ba 185 void CEC_StartOfMessage(void);
bogdanm 73:1efda918f0ba 186 void CEC_EndOfMessageCmd(FunctionalState NewState);
bogdanm 73:1efda918f0ba 187 FlagStatus CEC_GetFlagStatus(uint32_t CEC_FLAG);
bogdanm 73:1efda918f0ba 188 void CEC_ClearFlag(uint32_t CEC_FLAG);
bogdanm 73:1efda918f0ba 189 ITStatus CEC_GetITStatus(uint8_t CEC_IT);
bogdanm 73:1efda918f0ba 190 void CEC_ClearITPendingBit(uint16_t CEC_IT);
bogdanm 73:1efda918f0ba 191
bogdanm 73:1efda918f0ba 192 #ifdef __cplusplus
bogdanm 73:1efda918f0ba 193 }
bogdanm 73:1efda918f0ba 194 #endif
bogdanm 73:1efda918f0ba 195
bogdanm 73:1efda918f0ba 196 #endif /* __STM32F10x_CEC_H */
bogdanm 73:1efda918f0ba 197
bogdanm 73:1efda918f0ba 198 /**
bogdanm 73:1efda918f0ba 199 * @}
bogdanm 73:1efda918f0ba 200 */
bogdanm 73:1efda918f0ba 201
bogdanm 73:1efda918f0ba 202 /**
bogdanm 73:1efda918f0ba 203 * @}
bogdanm 73:1efda918f0ba 204 */
bogdanm 73:1efda918f0ba 205
bogdanm 73:1efda918f0ba 206 /**
bogdanm 73:1efda918f0ba 207 * @}
bogdanm 73:1efda918f0ba 208 */
bogdanm 73:1efda918f0ba 209
bogdanm 73:1efda918f0ba 210 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/