Infineon MOTIX™ MCU TLE985x Device Family SDK
csa.h
Go to the documentation of this file.
1 /*
2  ***********************************************************************************************************************
3  *
4  * Copyright (c) 2018-2023, Infineon Technologies AG
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without modification,are permitted provided that the
8  * following conditions are met:
9  *
10  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
11  * disclaimer.
12  *
13  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
14  * following disclaimer in the documentation and/or other materials provided with the distribution.
15  *
16  * Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote
17  * products derived from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
25  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  **********************************************************************************************************************/
39 /*******************************************************************************
40 ** Author(s) Identity **
41 ********************************************************************************
42 ** Initials Name **
43 ** ---------------------------------------------------------------------------**
44 ** TS T&S **
45 ** BG Blandine Guillot **
46 *******************************************************************************/
47 
48 /*******************************************************************************
49 ** Revision Control History **
50 ********************************************************************************
51 ** V0.2.0: 2018-02-13, TS: Initial version **
52 ** V0.2.1: 2019-01-28, TS: __STATIC_INLINE changed to INLINE **
53 ** Doxygen update **
54 ** Revision history moved from csa.c to csa.h **
55 ** V0.2.2: 2020-03-02, BG: Updated revision history format **
56 ** V0.2.3: 2022-01-21, JO: EP-934: Updated copyright and branding **
57 ** V0.2.4: 2023-08-28, JO: EP-435: Removed ARMCC v6 compiler warnings **
58 *******************************************************************************/
59 
60 #ifndef CSA_H
61 #define CSA_H
62 
63 /*******************************************************************************
64 ** Includes **
65 *******************************************************************************/
66 #include "tle985x.h"
67 #include "types.h"
68 #include "sfr_access.h"
69 
70 /*******************************************************************************
71 ** Global Constant Declarations **
72 *******************************************************************************/
76 typedef enum
77 {
81  CSA_GAIN_60 = 3
83 
84 /*******************************************************************************
85 ** Global Function Declarations **
86 *******************************************************************************/
91 void CSA_Init(void);
92 
93 /*******************************************************************************
94 ** Inline Function Declarations **
95 *******************************************************************************/
108 INLINE void CSA_Power_On(void);
109 
122 INLINE void CSA_Power_Off(void);
123 
138 INLINE void CSA_Set_Gain(TCSA_Gain gain);
139 
140 /*******************************************************************************
141 ** Inline Function Definitions **
142 *******************************************************************************/
144 {
146 }
147 
149 {
151 }
152 
154 {
156 }
157 
158 #endif
INLINE void CSA_Power_On(void)
Switches on CSA.
Definition: csa.h:143
INLINE void CSA_Power_Off(void)
Switches off CSA.
Definition: csa.h:148
INLINE void CSA_Set_Gain(TCSA_Gain gain)
Sets CSA Gain value.
Definition: csa.h:153
void CSA_Init(void)
Initializes the CSA module.
TCSA_Gain
This enum lists the CSA Gain Settings.
Definition: csa.h:77
@ CSA_GAIN_20
Definition: csa.h:79
@ CSA_GAIN_10
Definition: csa.h:78
@ CSA_GAIN_60
Definition: csa.h:81
@ CSA_GAIN_40
Definition: csa.h:80
#define MF
Definition: tle985x.h:6274
#define MF_CSA_CTRL_CSA_EN_Msk
Definition: tle985x.h:9151
#define MF_CSA_CTRL_CSA_EN_Pos
Definition: tle985x.h:9150
#define MF_CSA_CTRL_CSA_GAIN_Pos
Definition: tle985x.h:9148
#define MF_CSA_CTRL_CSA_GAIN_Msk
Definition: tle985x.h:9149
SFR low level access library.
INLINE void Field_Mod32(volatile uint32 *reg, uint8 pos, uint32 msk, uint32 val)
This function writes a bit field in a 32-bit register.
Definition: sfr_access.h:378
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:145
uint8_t uint8
8 bit unsigned value
Definition: types.h:153
uint32_t uint32
32 bit unsigned value
Definition: types.h:155