Infineon MOTIX™ MCU TLE987x Device Family SDK
csa.h
Go to the documentation of this file.
1 /*
2  ***********************************************************************************************************************
3  *
4  * Copyright (c) Infineon Technologies AG
5  * All rights reserved.
6  *
7  * The applicable license agreement can be found at this pack's installation directory in the file
8  * license/IFX_SW_Licence_MOTIX_LITIX.txt
9  *
10  **********************************************************************************************************************/
20 /*******************************************************************************
21 ** Author(s) Identity **
22 ********************************************************************************
23 ** Initials Name **
24 ** ---------------------------------------------------------------------------**
25 ** DM Daniel Mysliwitz **
26 ** BG Blandine Guillot **
27 ** JO Julia Ott **
28 ** VO Vanessa Ongaro **
29 *******************************************************************************/
30 
31 /*******************************************************************************
32 ** Revision Control History **
33 ********************************************************************************
34 ** V0.1.0: 2014-06-02, DM: Initial version **
35 ** V0.1.1: 2015-02-10, DM: Individual header file added **
36 ** V0.1.2: 2017-09-29, DM: CSA_Offset_Get() function added **
37 ** MISRA 2012 compliance, the following PC-Lint **
38 ** rules are globally deactivated: **
39 ** - Info 793: ANSI/ISO limit of 6 'significant **
40 ** characters in an external identifier **
41 ** - Info 835: A zero has been given as right **
42 ** argument to operator **
43 ** - Info 845: The left argument to operator '&' **
44 ** is certain to be 0 **
45 ** Replaced register accesses within functions by **
46 ** function calls **
47 ** Replaced __STATIC_INLINE by INLINE **
48 ** V0.1.3: 2018-07-07, BG: CSA_Set_Gain(uint8 gain) function rewritten **
49 ** V0.1.4: 2018-11-27, JO: Doxygen update **
50 ** Moved revision history from csa.c to csa.h **
51 ** V0.1.5: 2020-04-15, BG: Updated revision history format **
52 ** V0.1.6: 2020-07-21, BG: EP-439: Formatted .h/.c files **
53 ** V0.1.7: 2021-04-01, JO: EP-757: Added function CSA_Gain_Get **
54 ** V0.1.8: 2022-02-28, JO: EP-936: Updated copyright and branding **
55 ** V0.1.9: 2022-10-18, VO: EP-1252: Updated enum definition **
56 ** V0.2.0: 2025-01-02, JO: EP-1493: Updated license **
57 *******************************************************************************/
58 
59 #ifndef CSA_H
60 #define CSA_H
61 
62 /*******************************************************************************
63 ** Includes **
64 *******************************************************************************/
65 #include "tle987x.h"
66 #include "types.h"
67 #include "sfr_access.h"
68 
69 /*******************************************************************************
70 ** Global Constant Declarations **
71 *******************************************************************************/
75 typedef enum CSA_Gain
76 {
80  CSA_GAIN_60 = 3
82 
83 /*******************************************************************************
84 ** Global Function Declarations **
85 *******************************************************************************/
98 INLINE void CSA_Power_On(void)
99 {
101 }
102 
116 {
118 }
119 
135 {
137 }
138 
155 {
157 }
158 
163 void CSA_Init(void);
164 
165 INLINE void CSA_Set_Gain(uint8 gain);
166 
175 
176 /*******************************************************************************
177 ** Global Inline Function Definitions **
178 *******************************************************************************/
194 {
196 }
197 
198 
199 #endif
INLINE void CSA_Gain_Set(uint32 gain)
Set CSA Gain value.
Definition: csa.h:134
INLINE void CSA_Power_On(void)
switches on CSA module.
Definition: csa.h:98
enum CSA_Gain TCSA_Gain
INLINE void CSA_Power_Off(void)
switches off CSA module.
Definition: csa.h:115
INLINE void CSA_Set_Gain(uint8 gain)
Set CSA Gain value.
Definition: csa.h:193
INLINE uint32 CSA_Gain_Get()
Get CSA Gain value.
Definition: csa.h:154
void CSA_Init(void)
Initializes the CSA module based on the Config Wizard for MOTIX MCU configuration.
CSA_Gain
Definition: csa.h:76
@ CSA_GAIN_20
Definition: csa.h:78
@ CSA_GAIN_10
Definition: csa.h:77
@ CSA_GAIN_60
Definition: csa.h:80
@ CSA_GAIN_40
Definition: csa.h:79
uint16 CSA_Offset_Get(void)
measures the CSA offset using ADC1.
#define CSA
Definition: tle987x.h:6062
#define MF_CSA_CTRL_GAIN_Pos
Definition: tle987x.h:8171
#define MF_CSA_CTRL_EN_Msk
Definition: tle987x.h:8174
#define MF_CSA_CTRL_EN_Pos
Definition: tle987x.h:8173
#define MF_CSA_CTRL_GAIN_Msk
Definition: tle987x.h:8172
SFR low level access library.
INLINE void Field_Mod32(volatile uint32 *reg, uint32 pos, uint32 msk, uint32 val)
This function writes a bit field in a 32-bit register.
Definition: sfr_access.h:347
INLINE uint32 u32_Field_Rd32(const volatile uint32 *reg, uint32 pos, uint32 msk)
This function reads a 32-bit field of a 32-bit register.
Definition: sfr_access.h:422
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:132
uint8_t uint8
8 bit unsigned value
Definition: types.h:137
uint16_t uint16
16 bit unsigned value
Definition: types.h:138
uint32_t uint32
32 bit unsigned value
Definition: types.h:139