Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO_L4R9I-LCD-demo
Drivers/BSP/Components/Common/tsensor.h@1:2105b8894450, 2019-11-26 (annotated)
- Committer:
- Jerome Coutant
- Date:
- Tue Nov 26 14:35:07 2019 +0100
- Revision:
- 1:2105b8894450
- Parent:
- 0:31ddfafdd3da
Update for MBED use
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
Jerome Coutant |
0:31ddfafdd3da
|
1
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
2
|
******************************************************************************
|
|
Jerome Coutant |
0:31ddfafdd3da
|
3
|
* @file tsensor.h
|
|
Jerome Coutant |
0:31ddfafdd3da
|
4
|
* @author MCD Application Team
|
|
Jerome Coutant |
0:31ddfafdd3da
|
5
|
* @brief This header file contains the functions prototypes for the
|
|
Jerome Coutant |
0:31ddfafdd3da
|
6
|
* Temperature Sensor driver.
|
|
Jerome Coutant |
0:31ddfafdd3da
|
7
|
******************************************************************************
|
|
Jerome Coutant |
0:31ddfafdd3da
|
8
|
* @attention
|
|
Jerome Coutant |
0:31ddfafdd3da
|
9
|
*
|
|
Jerome Coutant |
0:31ddfafdd3da
|
10
|
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
|
Jerome Coutant |
0:31ddfafdd3da
|
11
|
* All rights reserved.</center></h2>
|
|
Jerome Coutant |
0:31ddfafdd3da
|
12
|
*
|
|
Jerome Coutant |
0:31ddfafdd3da
|
13
|
* This software component is licensed by ST under BSD 3-Clause license,
|
|
Jerome Coutant |
0:31ddfafdd3da
|
14
|
* the "License"; You may not use this file except in compliance with the
|
|
Jerome Coutant |
0:31ddfafdd3da
|
15
|
* License. You may obtain a copy of the License at:
|
|
Jerome Coutant |
0:31ddfafdd3da
|
16
|
* opensource.org/licenses/BSD-3-Clause
|
|
Jerome Coutant |
0:31ddfafdd3da
|
17
|
*
|
|
Jerome Coutant |
0:31ddfafdd3da
|
18
|
******************************************************************************
|
|
Jerome Coutant |
0:31ddfafdd3da
|
19
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
20
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
21
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
22
|
#ifndef __TSENSOR_H
|
|
Jerome Coutant |
0:31ddfafdd3da
|
23
|
#define __TSENSOR_H
|
|
Jerome Coutant |
0:31ddfafdd3da
|
24
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
25
|
#ifdef __cplusplus
|
|
Jerome Coutant |
0:31ddfafdd3da
|
26
|
extern "C" {
|
|
Jerome Coutant |
0:31ddfafdd3da
|
27
|
#endif
|
|
Jerome Coutant |
0:31ddfafdd3da
|
28
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
29
|
/* Includes ------------------------------------------------------------------*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
30
|
#include <stdint.h>
|
|
Jerome Coutant |
0:31ddfafdd3da
|
31
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
32
|
/** @addtogroup BSP
|
|
Jerome Coutant |
0:31ddfafdd3da
|
33
|
* @{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
34
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
35
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
36
|
/** @addtogroup Components
|
|
Jerome Coutant |
0:31ddfafdd3da
|
37
|
* @{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
38
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
39
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
40
|
/** @addtogroup TSENSOR
|
|
Jerome Coutant |
0:31ddfafdd3da
|
41
|
* @{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
42
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
43
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
44
|
/** @defgroup TSENSOR_Exported_Types
|
|
Jerome Coutant |
0:31ddfafdd3da
|
45
|
* @{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
46
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
47
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
48
|
/** @defgroup TSENSOR_Config_structure Temperature Sensor Configuration structure
|
|
Jerome Coutant |
0:31ddfafdd3da
|
49
|
* @{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
50
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
51
|
typedef struct
|
|
Jerome Coutant |
0:31ddfafdd3da
|
52
|
{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
53
|
uint8_t AlertMode; /* Alert Mode Temperature out of range*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
54
|
uint8_t ConversionMode; /* Continuous/One Shot Mode */
|
|
Jerome Coutant |
0:31ddfafdd3da
|
55
|
uint8_t ConversionResolution; /* Temperature Resolution */
|
|
Jerome Coutant |
0:31ddfafdd3da
|
56
|
uint8_t ConversionRate; /* Number of measure per second */
|
|
Jerome Coutant |
0:31ddfafdd3da
|
57
|
int8_t TemperatureLimitHigh; /* High Temperature Limit Range */
|
|
Jerome Coutant |
0:31ddfafdd3da
|
58
|
int8_t TemperatureLimitLow; /* Low Temperature Limit Range */
|
|
Jerome Coutant |
0:31ddfafdd3da
|
59
|
}TSENSOR_InitTypeDef;
|
|
Jerome Coutant |
0:31ddfafdd3da
|
60
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
61
|
* @}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
62
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
63
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
64
|
/** @defgroup TSENSOR_Driver_structure Temperature Sensor Driver structure
|
|
Jerome Coutant |
0:31ddfafdd3da
|
65
|
* @{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
66
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
67
|
typedef struct
|
|
Jerome Coutant |
0:31ddfafdd3da
|
68
|
{
|
|
Jerome Coutant |
0:31ddfafdd3da
|
69
|
void (*Init)(uint16_t, TSENSOR_InitTypeDef *);
|
|
Jerome Coutant |
0:31ddfafdd3da
|
70
|
uint8_t (*IsReady)(uint16_t, uint32_t);
|
|
Jerome Coutant |
0:31ddfafdd3da
|
71
|
uint8_t (*ReadStatus)(uint16_t);
|
|
Jerome Coutant |
0:31ddfafdd3da
|
72
|
float (*ReadTemp)(uint16_t);
|
|
Jerome Coutant |
0:31ddfafdd3da
|
73
|
}TSENSOR_DrvTypeDef;
|
|
Jerome Coutant |
0:31ddfafdd3da
|
74
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
75
|
* @}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
76
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
77
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
78
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
79
|
* @}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
80
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
81
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
82
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
83
|
* @}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
84
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
85
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
86
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
87
|
* @}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
88
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
89
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
90
|
/**
|
|
Jerome Coutant |
0:31ddfafdd3da
|
91
|
* @}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
92
|
*/
|
|
Jerome Coutant |
0:31ddfafdd3da
|
93
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
94
|
#ifdef __cplusplus
|
|
Jerome Coutant |
0:31ddfafdd3da
|
95
|
}
|
|
Jerome Coutant |
0:31ddfafdd3da
|
96
|
#endif
|
|
Jerome Coutant |
0:31ddfafdd3da
|
97
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
98
|
#endif /* __TSENSOR_H */
|
|
Jerome Coutant |
0:31ddfafdd3da
|
99
|
|
|
Jerome Coutant |
0:31ddfafdd3da
|
100
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|