/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 Jan 13 15:31:11 2014 +0200
Revision:
76:824293ae5e43
Parent:
73:1efda918f0ba
Child:
77:869cf507173a
Release 76 of the mbed library

Main changes:

- enabled SPI slave on LPC812
- the RTOS should now work with GCC_CR (LPC1768 and LPC4088)
- GCC now uses 'hard' as the floating point ABI (arguments in floating point registers)
- Bug fixes on various platforms

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 76:824293ae5e43 9 *******************************************************************************
bogdanm 76:824293ae5e43 10 * Copyright (c) 2014, STMicroelectronics
bogdanm 76:824293ae5e43 11 * All rights reserved.
bogdanm 76:824293ae5e43 12 *
bogdanm 76:824293ae5e43 13 * Redistribution and use in source and binary forms, with or without
bogdanm 76:824293ae5e43 14 * modification, are permitted provided that the following conditions are met:
bogdanm 76:824293ae5e43 15 *
bogdanm 76:824293ae5e43 16 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 76:824293ae5e43 17 * this list of conditions and the following disclaimer.
bogdanm 76:824293ae5e43 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 76:824293ae5e43 19 * this list of conditions and the following disclaimer in the documentation
bogdanm 76:824293ae5e43 20 * and/or other materials provided with the distribution.
bogdanm 76:824293ae5e43 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 76:824293ae5e43 22 * may be used to endorse or promote products derived from this software
bogdanm 76:824293ae5e43 23 * without specific prior written permission.
bogdanm 76:824293ae5e43 24 *
bogdanm 76:824293ae5e43 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 76:824293ae5e43 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 76:824293ae5e43 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 76:824293ae5e43 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 76:824293ae5e43 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 76:824293ae5e43 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 76:824293ae5e43 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 76:824293ae5e43 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 76:824293ae5e43 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 76:824293ae5e43 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 76:824293ae5e43 35 *******************************************************************************
bogdanm 76:824293ae5e43 36 */
bogdanm 73:1efda918f0ba 37
bogdanm 73:1efda918f0ba 38 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 73:1efda918f0ba 39 #ifndef __STM32F10x_CEC_H
bogdanm 73:1efda918f0ba 40 #define __STM32F10x_CEC_H
bogdanm 73:1efda918f0ba 41
bogdanm 73:1efda918f0ba 42 #ifdef __cplusplus
bogdanm 73:1efda918f0ba 43 extern "C" {
bogdanm 73:1efda918f0ba 44 #endif
bogdanm 73:1efda918f0ba 45
bogdanm 73:1efda918f0ba 46 /* Includes ------------------------------------------------------------------*/
bogdanm 73:1efda918f0ba 47 #include "stm32f10x.h"
bogdanm 73:1efda918f0ba 48
bogdanm 73:1efda918f0ba 49 /** @addtogroup STM32F10x_StdPeriph_Driver
bogdanm 73:1efda918f0ba 50 * @{
bogdanm 73:1efda918f0ba 51 */
bogdanm 73:1efda918f0ba 52
bogdanm 73:1efda918f0ba 53 /** @addtogroup CEC
bogdanm 73:1efda918f0ba 54 * @{
bogdanm 73:1efda918f0ba 55 */
bogdanm 73:1efda918f0ba 56
bogdanm 73:1efda918f0ba 57
bogdanm 73:1efda918f0ba 58 /** @defgroup CEC_Exported_Types
bogdanm 73:1efda918f0ba 59 * @{
bogdanm 73:1efda918f0ba 60 */
bogdanm 73:1efda918f0ba 61
bogdanm 73:1efda918f0ba 62 /**
bogdanm 73:1efda918f0ba 63 * @brief CEC Init structure definition
bogdanm 73:1efda918f0ba 64 */
bogdanm 73:1efda918f0ba 65 typedef struct
bogdanm 73:1efda918f0ba 66 {
bogdanm 73:1efda918f0ba 67 uint16_t CEC_BitTimingMode; /*!< Configures the CEC Bit Timing Error Mode.
bogdanm 73:1efda918f0ba 68 This parameter can be a value of @ref CEC_BitTiming_Mode */
bogdanm 73:1efda918f0ba 69 uint16_t CEC_BitPeriodMode; /*!< Configures the CEC Bit Period Error Mode.
bogdanm 73:1efda918f0ba 70 This parameter can be a value of @ref CEC_BitPeriod_Mode */
bogdanm 73:1efda918f0ba 71 }CEC_InitTypeDef;
bogdanm 73:1efda918f0ba 72
bogdanm 73:1efda918f0ba 73 /**
bogdanm 73:1efda918f0ba 74 * @}
bogdanm 73:1efda918f0ba 75 */
bogdanm 73:1efda918f0ba 76
bogdanm 73:1efda918f0ba 77 /** @defgroup CEC_Exported_Constants
bogdanm 73:1efda918f0ba 78 * @{
bogdanm 73:1efda918f0ba 79 */
bogdanm 73:1efda918f0ba 80
bogdanm 73:1efda918f0ba 81 /** @defgroup CEC_BitTiming_Mode
bogdanm 73:1efda918f0ba 82 * @{
bogdanm 73:1efda918f0ba 83 */
bogdanm 73:1efda918f0ba 84 #define CEC_BitTimingStdMode ((uint16_t)0x00) /*!< Bit timing error Standard Mode */
bogdanm 73:1efda918f0ba 85 #define CEC_BitTimingErrFreeMode CEC_CFGR_BTEM /*!< Bit timing error Free Mode */
bogdanm 73:1efda918f0ba 86
bogdanm 73:1efda918f0ba 87 #define IS_CEC_BIT_TIMING_ERROR_MODE(MODE) (((MODE) == CEC_BitTimingStdMode) || \
bogdanm 73:1efda918f0ba 88 ((MODE) == CEC_BitTimingErrFreeMode))
bogdanm 73:1efda918f0ba 89 /**
bogdanm 73:1efda918f0ba 90 * @}
bogdanm 73:1efda918f0ba 91 */
bogdanm 73:1efda918f0ba 92
bogdanm 73:1efda918f0ba 93 /** @defgroup CEC_BitPeriod_Mode
bogdanm 73:1efda918f0ba 94 * @{
bogdanm 73:1efda918f0ba 95 */
bogdanm 73:1efda918f0ba 96 #define CEC_BitPeriodStdMode ((uint16_t)0x00) /*!< Bit period error Standard Mode */
bogdanm 73:1efda918f0ba 97 #define CEC_BitPeriodFlexibleMode CEC_CFGR_BPEM /*!< Bit period error Flexible Mode */
bogdanm 73:1efda918f0ba 98
bogdanm 73:1efda918f0ba 99 #define IS_CEC_BIT_PERIOD_ERROR_MODE(MODE) (((MODE) == CEC_BitPeriodStdMode) || \
bogdanm 73:1efda918f0ba 100 ((MODE) == CEC_BitPeriodFlexibleMode))
bogdanm 73:1efda918f0ba 101 /**
bogdanm 73:1efda918f0ba 102 * @}
bogdanm 73:1efda918f0ba 103 */
bogdanm 73:1efda918f0ba 104
bogdanm 73:1efda918f0ba 105
bogdanm 73:1efda918f0ba 106 /** @defgroup CEC_interrupts_definition
bogdanm 73:1efda918f0ba 107 * @{
bogdanm 73:1efda918f0ba 108 */
bogdanm 73:1efda918f0ba 109 #define CEC_IT_TERR CEC_CSR_TERR
bogdanm 73:1efda918f0ba 110 #define CEC_IT_TBTRF CEC_CSR_TBTRF
bogdanm 73:1efda918f0ba 111 #define CEC_IT_RERR CEC_CSR_RERR
bogdanm 73:1efda918f0ba 112 #define CEC_IT_RBTF CEC_CSR_RBTF
bogdanm 73:1efda918f0ba 113 #define IS_CEC_GET_IT(IT) (((IT) == CEC_IT_TERR) || ((IT) == CEC_IT_TBTRF) || \
bogdanm 73:1efda918f0ba 114 ((IT) == CEC_IT_RERR) || ((IT) == CEC_IT_RBTF))
bogdanm 73:1efda918f0ba 115 /**
bogdanm 73:1efda918f0ba 116 * @}
bogdanm 73:1efda918f0ba 117 */
bogdanm 73:1efda918f0ba 118
bogdanm 73:1efda918f0ba 119
bogdanm 73:1efda918f0ba 120 /** @defgroup CEC_Own_Address
bogdanm 73:1efda918f0ba 121 * @{
bogdanm 73:1efda918f0ba 122 */
bogdanm 73:1efda918f0ba 123 #define IS_CEC_ADDRESS(ADDRESS) ((ADDRESS) < 0x10)
bogdanm 73:1efda918f0ba 124 /**
bogdanm 73:1efda918f0ba 125 * @}
bogdanm 73:1efda918f0ba 126 */
bogdanm 73:1efda918f0ba 127
bogdanm 73:1efda918f0ba 128 /** @defgroup CEC_Prescaler
bogdanm 73:1efda918f0ba 129 * @{
bogdanm 73:1efda918f0ba 130 */
bogdanm 73:1efda918f0ba 131 #define IS_CEC_PRESCALER(PRESCALER) ((PRESCALER) <= 0x3FFF)
bogdanm 73:1efda918f0ba 132
bogdanm 73:1efda918f0ba 133 /**
bogdanm 73:1efda918f0ba 134 * @}
bogdanm 73:1efda918f0ba 135 */
bogdanm 73:1efda918f0ba 136
bogdanm 73:1efda918f0ba 137 /** @defgroup CEC_flags_definition
bogdanm 73:1efda918f0ba 138 * @{
bogdanm 73:1efda918f0ba 139 */
bogdanm 73:1efda918f0ba 140
bogdanm 73:1efda918f0ba 141 /**
bogdanm 73:1efda918f0ba 142 * @brief ESR register flags
bogdanm 73:1efda918f0ba 143 */
bogdanm 73:1efda918f0ba 144 #define CEC_FLAG_BTE ((uint32_t)0x10010000)
bogdanm 73:1efda918f0ba 145 #define CEC_FLAG_BPE ((uint32_t)0x10020000)
bogdanm 73:1efda918f0ba 146 #define CEC_FLAG_RBTFE ((uint32_t)0x10040000)
bogdanm 73:1efda918f0ba 147 #define CEC_FLAG_SBE ((uint32_t)0x10080000)
bogdanm 73:1efda918f0ba 148 #define CEC_FLAG_ACKE ((uint32_t)0x10100000)
bogdanm 73:1efda918f0ba 149 #define CEC_FLAG_LINE ((uint32_t)0x10200000)
bogdanm 73:1efda918f0ba 150 #define CEC_FLAG_TBTFE ((uint32_t)0x10400000)
bogdanm 73:1efda918f0ba 151
bogdanm 73:1efda918f0ba 152 /**
bogdanm 73:1efda918f0ba 153 * @brief CSR register flags
bogdanm 73:1efda918f0ba 154 */
bogdanm 73:1efda918f0ba 155 #define CEC_FLAG_TEOM ((uint32_t)0x00000002)
bogdanm 73:1efda918f0ba 156 #define CEC_FLAG_TERR ((uint32_t)0x00000004)
bogdanm 73:1efda918f0ba 157 #define CEC_FLAG_TBTRF ((uint32_t)0x00000008)
bogdanm 73:1efda918f0ba 158 #define CEC_FLAG_RSOM ((uint32_t)0x00000010)
bogdanm 73:1efda918f0ba 159 #define CEC_FLAG_REOM ((uint32_t)0x00000020)
bogdanm 73:1efda918f0ba 160 #define CEC_FLAG_RERR ((uint32_t)0x00000040)
bogdanm 73:1efda918f0ba 161 #define CEC_FLAG_RBTF ((uint32_t)0x00000080)
bogdanm 73:1efda918f0ba 162
bogdanm 73:1efda918f0ba 163 #define IS_CEC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFF03) == 0x00) && ((FLAG) != 0x00))
bogdanm 73:1efda918f0ba 164
bogdanm 73:1efda918f0ba 165 #define IS_CEC_GET_FLAG(FLAG) (((FLAG) == CEC_FLAG_BTE) || ((FLAG) == CEC_FLAG_BPE) || \
bogdanm 73:1efda918f0ba 166 ((FLAG) == CEC_FLAG_RBTFE) || ((FLAG)== CEC_FLAG_SBE) || \
bogdanm 73:1efda918f0ba 167 ((FLAG) == CEC_FLAG_ACKE) || ((FLAG) == CEC_FLAG_LINE) || \
bogdanm 73:1efda918f0ba 168 ((FLAG) == CEC_FLAG_TBTFE) || ((FLAG) == CEC_FLAG_TEOM) || \
bogdanm 73:1efda918f0ba 169 ((FLAG) == CEC_FLAG_TERR) || ((FLAG) == CEC_FLAG_TBTRF) || \
bogdanm 73:1efda918f0ba 170 ((FLAG) == CEC_FLAG_RSOM) || ((FLAG) == CEC_FLAG_REOM) || \
bogdanm 73:1efda918f0ba 171 ((FLAG) == CEC_FLAG_RERR) || ((FLAG) == CEC_FLAG_RBTF))
bogdanm 73:1efda918f0ba 172
bogdanm 73:1efda918f0ba 173 /**
bogdanm 73:1efda918f0ba 174 * @}
bogdanm 73:1efda918f0ba 175 */
bogdanm 73:1efda918f0ba 176
bogdanm 73:1efda918f0ba 177 /**
bogdanm 73:1efda918f0ba 178 * @}
bogdanm 73:1efda918f0ba 179 */
bogdanm 73:1efda918f0ba 180
bogdanm 73:1efda918f0ba 181 /** @defgroup CEC_Exported_Macros
bogdanm 73:1efda918f0ba 182 * @{
bogdanm 73:1efda918f0ba 183 */
bogdanm 73:1efda918f0ba 184
bogdanm 73:1efda918f0ba 185 /**
bogdanm 73:1efda918f0ba 186 * @}
bogdanm 73:1efda918f0ba 187 */
bogdanm 73:1efda918f0ba 188
bogdanm 73:1efda918f0ba 189 /** @defgroup CEC_Exported_Functions
bogdanm 73:1efda918f0ba 190 * @{
bogdanm 73:1efda918f0ba 191 */
bogdanm 73:1efda918f0ba 192 void CEC_DeInit(void);
bogdanm 73:1efda918f0ba 193 void CEC_Init(CEC_InitTypeDef* CEC_InitStruct);
bogdanm 73:1efda918f0ba 194 void CEC_Cmd(FunctionalState NewState);
bogdanm 73:1efda918f0ba 195 void CEC_ITConfig(FunctionalState NewState);
bogdanm 73:1efda918f0ba 196 void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress);
bogdanm 73:1efda918f0ba 197 void CEC_SetPrescaler(uint16_t CEC_Prescaler);
bogdanm 73:1efda918f0ba 198 void CEC_SendDataByte(uint8_t Data);
bogdanm 73:1efda918f0ba 199 uint8_t CEC_ReceiveDataByte(void);
bogdanm 73:1efda918f0ba 200 void CEC_StartOfMessage(void);
bogdanm 73:1efda918f0ba 201 void CEC_EndOfMessageCmd(FunctionalState NewState);
bogdanm 73:1efda918f0ba 202 FlagStatus CEC_GetFlagStatus(uint32_t CEC_FLAG);
bogdanm 73:1efda918f0ba 203 void CEC_ClearFlag(uint32_t CEC_FLAG);
bogdanm 73:1efda918f0ba 204 ITStatus CEC_GetITStatus(uint8_t CEC_IT);
bogdanm 73:1efda918f0ba 205 void CEC_ClearITPendingBit(uint16_t CEC_IT);
bogdanm 73:1efda918f0ba 206
bogdanm 73:1efda918f0ba 207 #ifdef __cplusplus
bogdanm 73:1efda918f0ba 208 }
bogdanm 73:1efda918f0ba 209 #endif
bogdanm 73:1efda918f0ba 210
bogdanm 73:1efda918f0ba 211 #endif /* __STM32F10x_CEC_H */
bogdanm 73:1efda918f0ba 212
bogdanm 73:1efda918f0ba 213 /**
bogdanm 73:1efda918f0ba 214 * @}
bogdanm 73:1efda918f0ba 215 */
bogdanm 73:1efda918f0ba 216
bogdanm 73:1efda918f0ba 217 /**
bogdanm 73:1efda918f0ba 218 * @}
bogdanm 73:1efda918f0ba 219 */
bogdanm 73:1efda918f0ba 220
bogdanm 73:1efda918f0ba 221 /**
bogdanm 73:1efda918f0ba 222 * @}
bogdanm 73:1efda918f0ba 223 */
bogdanm 73:1efda918f0ba 224
bogdanm 73:1efda918f0ba 225 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/