iLLD_TC27xC
1.0
IfxDts.h
Go to the documentation of this file.
1
/**
2
* \file IfxDts.h
3
* \brief DTS basic functionality
4
* \ingroup IfxLld_Dts
5
*
6
* \version iLLD_0_1_0_10
7
* \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8
*
9
*
10
* IMPORTANT NOTICE
11
*
12
*
13
* Infineon Technologies AG (Infineon) is supplying this file for use
14
* exclusively with Infineon's microcontroller products. This file can be freely
15
* distributed within development tools that are supporting such microcontroller
16
* products.
17
*
18
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21
* INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22
* OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23
*
24
* \defgroup IfxLld_Dts DTS
25
* \ingroup IfxLld
26
* \defgroup IfxLld_Dts_Std Standard Driver
27
* \ingroup IfxLld_Dts
28
* \defgroup IfxLld_Dts_Std_Control Control functions
29
* \ingroup IfxLld_Dts_Std
30
* \defgroup IfxLld_Dts_Std_Status Status functions
31
* \ingroup IfxLld_Dts_Std
32
*/
33
34
#ifndef IFXDTS_H
35
#define IFXDTS_H 1
36
37
/******************************************************************************/
38
/*----------------------------------Includes----------------------------------*/
39
/******************************************************************************/
40
41
#include "
_Impl/IfxDts_cfg.h
"
42
/** \addtogroup IfxLld_Dts_Std_Control
43
* \{ */
44
45
/******************************************************************************/
46
/*-------------------------Inline Function Prototypes-------------------------*/
47
/******************************************************************************/
48
49
/** \brief Disable the writing of register bits except START bit.
50
* \return None
51
*/
52
IFX_INLINE
void
IfxDts_disableSensorControl
(
void
);
53
54
/** \brief Enables the DTS sensor
55
* \return None
56
*/
57
IFX_INLINE
void
IfxDts_enableSensor
(
void
);
58
59
/** \brief Starts the next temperature measurement.
60
* \return None
61
*/
62
IFX_INLINE
void
IfxDts_startSensor
(
void
);
63
64
/** \} */
65
66
/** \addtogroup IfxLld_Dts_Std_Status
67
* \{ */
68
69
/******************************************************************************/
70
/*-------------------------Inline Function Prototypes-------------------------*/
71
/******************************************************************************/
72
73
/** \brief Gets the Interrupt request source.
74
* \return Address of interrupt request source
75
*/
76
IFX_INLINE
volatile
Ifx_SRC_SRCR *
IfxDts_getSrcPointer
(
void
);
77
78
/** \brief Read the temperature measurement result
79
* \return Temperature measurement result
80
*/
81
IFX_INLINE
uint16
IfxDts_getTemperatureValue
(
void
);
82
83
/** \brief Returns the current BUSY status of the Sensor
84
* \return TRUE if Sensor is busy in measuring temperature otherwise FALSE
85
*/
86
IFX_INLINE
boolean
IfxDts_isBusy
(
void
);
87
88
/** \} */
89
90
/******************************************************************************/
91
/*-------------------------Global Function Prototypes-------------------------*/
92
/******************************************************************************/
93
94
/** \brief Returns the current READY status of the Sensor.
95
* \return TRUE if Sensor is ready for measuring temperature otherwise FALSE
96
*/
97
IFX_EXTERN
boolean
IfxDts_isReady
(
void
);
98
99
/******************************************************************************/
100
/*---------------------Inline Function Implementations------------------------*/
101
/******************************************************************************/
102
103
IFX_INLINE
void
IfxDts_disableSensorControl
(
void
)
104
{
105
MODULE_SCU.DTSCON.B.SLCK = 1;
106
MODULE_SCU.DTSLIM.B.SLCK = 1;
107
}
108
109
110
IFX_INLINE
void
IfxDts_enableSensor
(
void
)
111
{
112
MODULE_SCU.DTSCON.B.PWD = 0;
113
}
114
115
116
IFX_INLINE
void
IfxDts_startSensor
(
void
)
117
{
118
MODULE_SCU.DTSCON.B.START = 1;
119
}
120
121
122
IFX_INLINE
volatile
Ifx_SRC_SRCR *
IfxDts_getSrcPointer
(
void
)
123
{
124
return
&SRC_SCUDTS;
125
}
126
127
128
IFX_INLINE
uint16
IfxDts_getTemperatureValue
(
void
)
129
{
130
return
(
uint16
)MODULE_SCU.DTSSTAT.B.RESULT;
131
}
132
133
134
IFX_INLINE
boolean
IfxDts_isBusy
(
void
)
135
{
136
return
MODULE_SCU.DTSSTAT.B.BUSY == 1 ?
TRUE
:
FALSE
;
137
}
138
139
140
#endif
/* IFXDTS_H */
home
mclld
Libraries
release
iLLD_0_1_0_10
src
ifx
TC27xC
Dts
Std
IfxDts.h
Generated by
1.8.4