E&R S3 prime / BSP_DISCO_L476VG
Committer:
bcostm
Date:
Wed Jan 17 14:57:52 2018 +0100
Revision:
3:4c7d003a8259
Parent:
1:917af0ca86df
Child:
5:4943b15cce9f
Update BSP files with CubeL4 V1.11.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jerome Coutant 1:917af0ca86df 1 /**
Jerome Coutant 1:917af0ca86df 2 ******************************************************************************
Jerome Coutant 1:917af0ca86df 3 * @file tsensor.h
Jerome Coutant 1:917af0ca86df 4 * @author MCD Application Team
Jerome Coutant 1:917af0ca86df 5 * @brief This header file contains the functions prototypes for the
Jerome Coutant 1:917af0ca86df 6 * Temperature Sensor driver.
Jerome Coutant 1:917af0ca86df 7 ******************************************************************************
Jerome Coutant 1:917af0ca86df 8 * @attention
Jerome Coutant 1:917af0ca86df 9 *
Jerome Coutant 1:917af0ca86df 10 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
Jerome Coutant 1:917af0ca86df 11 *
Jerome Coutant 1:917af0ca86df 12 * Redistribution and use in source and binary forms, with or without modification,
Jerome Coutant 1:917af0ca86df 13 * are permitted provided that the following conditions are met:
Jerome Coutant 1:917af0ca86df 14 * 1. Redistributions of source code must retain the above copyright notice,
Jerome Coutant 1:917af0ca86df 15 * this list of conditions and the following disclaimer.
Jerome Coutant 1:917af0ca86df 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
Jerome Coutant 1:917af0ca86df 17 * this list of conditions and the following disclaimer in the documentation
Jerome Coutant 1:917af0ca86df 18 * and/or other materials provided with the distribution.
Jerome Coutant 1:917af0ca86df 19 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Jerome Coutant 1:917af0ca86df 20 * may be used to endorse or promote products derived from this software
Jerome Coutant 1:917af0ca86df 21 * without specific prior written permission.
Jerome Coutant 1:917af0ca86df 22 *
Jerome Coutant 1:917af0ca86df 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Jerome Coutant 1:917af0ca86df 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Jerome Coutant 1:917af0ca86df 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Jerome Coutant 1:917af0ca86df 26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Jerome Coutant 1:917af0ca86df 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Jerome Coutant 1:917af0ca86df 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Jerome Coutant 1:917af0ca86df 29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Jerome Coutant 1:917af0ca86df 30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Jerome Coutant 1:917af0ca86df 31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Jerome Coutant 1:917af0ca86df 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Jerome Coutant 1:917af0ca86df 33 *
Jerome Coutant 1:917af0ca86df 34 ******************************************************************************
Jerome Coutant 1:917af0ca86df 35 */
Jerome Coutant 1:917af0ca86df 36
Jerome Coutant 1:917af0ca86df 37 /* Define to prevent recursive inclusion -------------------------------------*/
Jerome Coutant 1:917af0ca86df 38 #ifndef __TSENSOR_H
Jerome Coutant 1:917af0ca86df 39 #define __TSENSOR_H
Jerome Coutant 1:917af0ca86df 40
Jerome Coutant 1:917af0ca86df 41 #ifdef __cplusplus
Jerome Coutant 1:917af0ca86df 42 extern "C" {
Jerome Coutant 1:917af0ca86df 43 #endif
Jerome Coutant 1:917af0ca86df 44
Jerome Coutant 1:917af0ca86df 45 /* Includes ------------------------------------------------------------------*/
Jerome Coutant 1:917af0ca86df 46 #include <stdint.h>
Jerome Coutant 1:917af0ca86df 47
Jerome Coutant 1:917af0ca86df 48 /** @addtogroup BSP
Jerome Coutant 1:917af0ca86df 49 * @{
Jerome Coutant 1:917af0ca86df 50 */
Jerome Coutant 1:917af0ca86df 51
Jerome Coutant 1:917af0ca86df 52 /** @addtogroup Components
Jerome Coutant 1:917af0ca86df 53 * @{
Jerome Coutant 1:917af0ca86df 54 */
Jerome Coutant 1:917af0ca86df 55
Jerome Coutant 1:917af0ca86df 56 /** @addtogroup TSENSOR
Jerome Coutant 1:917af0ca86df 57 * @{
Jerome Coutant 1:917af0ca86df 58 */
Jerome Coutant 1:917af0ca86df 59
Jerome Coutant 1:917af0ca86df 60 /** @defgroup TSENSOR_Exported_Types
Jerome Coutant 1:917af0ca86df 61 * @{
Jerome Coutant 1:917af0ca86df 62 */
Jerome Coutant 1:917af0ca86df 63
Jerome Coutant 1:917af0ca86df 64 /** @defgroup TSENSOR_Config_structure Temperature Sensor Configuration structure
Jerome Coutant 1:917af0ca86df 65 * @{
Jerome Coutant 1:917af0ca86df 66 */
Jerome Coutant 1:917af0ca86df 67 typedef struct
Jerome Coutant 1:917af0ca86df 68 {
Jerome Coutant 1:917af0ca86df 69 uint8_t AlertMode; /* Alert Mode Temperature out of range*/
Jerome Coutant 1:917af0ca86df 70 uint8_t ConversionMode; /* Continuous/One Shot Mode */
Jerome Coutant 1:917af0ca86df 71 uint8_t ConversionResolution; /* Temperature Resolution */
Jerome Coutant 1:917af0ca86df 72 uint8_t ConversionRate; /* Number of measure per second */
Jerome Coutant 1:917af0ca86df 73 int8_t TemperatureLimitHigh; /* High Temperature Limit Range */
Jerome Coutant 1:917af0ca86df 74 int8_t TemperatureLimitLow; /* Low Temperature Limit Range */
Jerome Coutant 1:917af0ca86df 75 }TSENSOR_InitTypeDef;
Jerome Coutant 1:917af0ca86df 76 /**
Jerome Coutant 1:917af0ca86df 77 * @}
Jerome Coutant 1:917af0ca86df 78 */
Jerome Coutant 1:917af0ca86df 79
Jerome Coutant 1:917af0ca86df 80 /** @defgroup TSENSOR_Driver_structure Temperature Sensor Driver structure
Jerome Coutant 1:917af0ca86df 81 * @{
Jerome Coutant 1:917af0ca86df 82 */
Jerome Coutant 1:917af0ca86df 83 typedef struct
Jerome Coutant 1:917af0ca86df 84 {
Jerome Coutant 1:917af0ca86df 85 void (*Init)(uint16_t, TSENSOR_InitTypeDef *);
Jerome Coutant 1:917af0ca86df 86 uint8_t (*IsReady)(uint16_t, uint32_t);
Jerome Coutant 1:917af0ca86df 87 uint8_t (*ReadStatus)(uint16_t);
Jerome Coutant 1:917af0ca86df 88 float (*ReadTemp)(uint16_t);
Jerome Coutant 1:917af0ca86df 89 }TSENSOR_DrvTypeDef;
Jerome Coutant 1:917af0ca86df 90 /**
Jerome Coutant 1:917af0ca86df 91 * @}
Jerome Coutant 1:917af0ca86df 92 */
Jerome Coutant 1:917af0ca86df 93
Jerome Coutant 1:917af0ca86df 94 /**
Jerome Coutant 1:917af0ca86df 95 * @}
Jerome Coutant 1:917af0ca86df 96 */
Jerome Coutant 1:917af0ca86df 97
Jerome Coutant 1:917af0ca86df 98 /**
Jerome Coutant 1:917af0ca86df 99 * @}
Jerome Coutant 1:917af0ca86df 100 */
Jerome Coutant 1:917af0ca86df 101
Jerome Coutant 1:917af0ca86df 102 /**
Jerome Coutant 1:917af0ca86df 103 * @}
Jerome Coutant 1:917af0ca86df 104 */
Jerome Coutant 1:917af0ca86df 105
Jerome Coutant 1:917af0ca86df 106 /**
Jerome Coutant 1:917af0ca86df 107 * @}
Jerome Coutant 1:917af0ca86df 108 */
Jerome Coutant 1:917af0ca86df 109
Jerome Coutant 1:917af0ca86df 110 #ifdef __cplusplus
Jerome Coutant 1:917af0ca86df 111 }
Jerome Coutant 1:917af0ca86df 112 #endif
Jerome Coutant 1:917af0ca86df 113
Jerome Coutant 1:917af0ca86df 114 #endif /* __TSENSOR_H */
Jerome Coutant 1:917af0ca86df 115
Jerome Coutant 1:917af0ca86df 116 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/