Infineon MOTIX™ MCU TLE987x Device Family SDK
mon.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 *******************************************************************************/
29 
30 /*******************************************************************************
31 ** Revision Control History **
32 ********************************************************************************
33 ** V0.1.0: 2014-05-12, DM: Initial version **
34 ** V0.1.1: 2015-02-10, DM: Individual header file added **
35 ** V0.1.2: 2017-04-20, DM: Macros for configuration and status added **
36 ** V0.1.3: 2017-10-10, DM: MISRA 2012 compliance, the following PC-Lint **
37 ** rules are globally deactivated: **
38 ** - Info 793: ANSI/ISO limit of 6 'significant **
39 ** characters in an external identifier **
40 ** - Info 835: A zero has been given as right **
41 ** argument to operator **
42 ** - Info 845: The left argument to operator '&' **
43 ** is certain to be 0 **
44 ** Replaced macros by INLINE functions **
45 ** Replaced register accesses within functions by **
46 ** function calls **
47 ** Replaced __STATIC_INLINE by INLINE **
48 ** V0.1.4: 2018-11-27, JO: Doxygen update **
49 ** Moved revision history from mon.c to mon.h **
50 ** V0.1.5: 2020-04-15, BG: Updated revision history format **
51 ** V0.1.6: 2020-07-21, BG: EP-439: Formatted .h/.c files **
52 ** V0.1.7: 2022-02-28, JO: EP-936: Updated copyright and branding **
53 ** V0.1.8: 2025-01-02, JO: EP-1493: Updated license **
54 *******************************************************************************/
55 
56 #ifndef MON_H
57 #define MON_H
58 
59 /*******************************************************************************
60 ** Includes **
61 *******************************************************************************/
62 #include "tle987x.h"
63 #include "types.h"
64 #include "sfr_access.h"
65 
66 /*******************************************************************************
67 ** Global Macro Definitions **
68 *******************************************************************************/
70 #define MON_STATUS_LOW (0U)
72 #define MON_STATUS_HIGH (1U)
73 
74 /*******************************************************************************
75 ** Global Inline Function Definitions **
76 *******************************************************************************/
98 {
100 }
101 
123 {
125 }
126 
148 {
149  Field_Mod8(&SCU->EXICON0.reg, (uint8)6u, (uint8)0x40u, 1u);
150 }
151 
174 {
175  Field_Mod8(&SCU->EXICON0.reg, (uint8)6u, (uint8)0x40u, 0u);
176 }
177 
199 {
200  Field_Mod8(&SCU->EXICON0.reg, (uint8)7u, (uint8)0x80u, 1u);
201 }
202 
225 {
226  Field_Mod8(&SCU->EXICON0.reg, (uint8)7u, (uint8)0x80u, 0u);
227 }
228 
246 {
248 }
249 
264 {
266 }
267 
282 {
284 }
285 
300 {
302 }
303 
318 {
320 }
321 
336 {
338 }
339 
354 {
356 }
357 
372 {
374 }
375 
390 {
392 }
393 
408 {
410 }
411 
426 {
428 }
429 
443 INLINE void MON_En(void)
444 {
446 }
447 
460 INLINE void MON_Dis(void)
461 {
463 }
464 
465 /*******************************************************************************
466 ** Global Function Declarations **
467 *******************************************************************************/
469 
474 void MON_Init(void);
475 
493 uint8 MON_Debounce(uint8 MonActiveState);
494 
495 /*******************************************************************************
496 ** Global Inline Function Definitions **
497 *******************************************************************************/
516 {
518 }
519 
520 #endif
#define MON
Definition: tle987x.h:6068
#define SCU
Definition: tle987x.h:6071
#define PMU_MON_CNF_CYC_Pos
Definition: tle987x.h:8299
#define PMU_MON_CNF_EN_Pos
Definition: tle987x.h:8305
#define PMU_MON_CNF_EN_Msk
Definition: tle987x.h:8306
#define PMU_MON_CNF_PU_Pos
Definition: tle987x.h:8295
#define SCU_MODIEN3_MONSTS_Msk
Definition: tle987x.h:9132
#define SCU_IRCON0CLR_MONRC_Pos
Definition: tle987x.h:9004
#define PMU_MON_CNF_PD_Msk
Definition: tle987x.h:8298
#define PMU_MON_CNF_RISE_Pos
Definition: tle987x.h:8301
#define PMU_MON_CNF_RISE_Msk
Definition: tle987x.h:8302
#define PMU_MON_CNF_FALL_Msk
Definition: tle987x.h:8304
#define PMU_MON_CNF_CYC_Msk
Definition: tle987x.h:8300
#define PMU_MON_CNF_PD_Pos
Definition: tle987x.h:8297
#define PMU_MON_CNF_PU_Msk
Definition: tle987x.h:8296
#define SCU_IRCON0CLR_MONRC_Msk
Definition: tle987x.h:9005
#define PMU_MON_CNF_FALL_Pos
Definition: tle987x.h:8303
#define SCU_MODIEN3_MONSTS_Pos
Definition: tle987x.h:9131
#define SCU_IRCON0CLR_MONFC_Msk
Definition: tle987x.h:9003
#define SCU_IRCON0CLR_MONFC_Pos
Definition: tle987x.h:9002
INLINE void MON_CycSense_En(void)
enables Cycle Sense for MON.
Definition: mon.h:335
INLINE void MON_Falling_Edge_Int_En(void)
enables MON on falling edge interrupt.
Definition: mon.h:198
void MON_Init(void)
Initializes the MON module based on the Config Wizard for MOTIX MCU configuration.
INLINE void MON_Rising_Edge_Int_Clr(void)
clears MON on rising edge interrupt flag.
Definition: mon.h:97
INLINE void MON_Falling_Edge_Int_Dis(void)
disables MON on falling edge interrupt.
Definition: mon.h:224
INLINE void MON_Falling_Edge_Int_Clr(void)
clears MON on falling edge interrupt flag.
Definition: mon.h:122
INLINE void MON_En(void)
enables MON.
Definition: mon.h:443
INLINE uint8 MON_Get_Status(void)
Reads out the MON Status.
Definition: mon.h:515
INLINE void MON_PullUp_En(void)
enables PullUp for MON.
Definition: mon.h:263
INLINE void MON_WakeOnFall_En(void)
enables Wake-up on Falling Edge for MON.
Definition: mon.h:407
INLINE void MON_WakeOnRise_En(void)
enables Wake-up on Rising Edge for MON.
Definition: mon.h:371
INLINE void MON_PullUp_Dis(void)
disables PullUp for MON.
Definition: mon.h:281
INLINE uint8 MON_Sts(void)
reads MON Status.
Definition: mon.h:245
INLINE void MON_Rising_Edge_Int_Dis(void)
disables MON on rising edge interrupt.
Definition: mon.h:173
uint8 MON_Debounce(uint8 MonActiveState)
Debounces the MON input and reads the logical input value.
INLINE void MON_CycSense_Dis(void)
disables Cycle Sense for MON.
Definition: mon.h:353
INLINE void MON_WakeOnRise_Dis(void)
disables Wake-up on Rising Edge for MON.
Definition: mon.h:389
INLINE void MON_Dis(void)
disables MON.
Definition: mon.h:460
INLINE void MON_Rising_Edge_Int_En(void)
enables MON on rising edge interrupt.
Definition: mon.h:147
INLINE void MON_PullDown_En(void)
enables PullDown for MON.
Definition: mon.h:299
INLINE void MON_PullDown_Dis(void)
disables PullDown for MON.
Definition: mon.h:317
INLINE void MON_WakeOnFall_Dis(void)
disables Wake-up on Falling Edge for MON.
Definition: mon.h:425
SFR low level access library.
INLINE void Field_Wrt8(volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
This function writes a bit field in a 8-bit register.
Definition: sfr_access.h:322
INLINE uint8 u1_Field_Rd8(const volatile uint8 *reg, uint8 pos, uint8 msk)
This function reads a 1-bit field of a 8-bit register.
Definition: sfr_access.h:382
INLINE void Field_Mod8(volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
This function writes a bit field in a 8-bit register.
Definition: sfr_access.h:337
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:132
uint8_t uint8
8 bit unsigned value
Definition: types.h:137