RTEMS 6.1-rc6
Loading...
Searching...
No Matches
fsl_tempmon.h
Go to the documentation of this file.
1/*
2 * Copyright 2018-2021 NXP
3 * All rights reserved.
4 *
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8#ifndef _FSL_TEMPMON_H_
9#define _FSL_TEMPMON_H_
10
11#include "fsl_common.h"
12
20/*******************************************************************************
21 * Definitions
22 ******************************************************************************/
23
27#define FSL_TEMPMON_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
31typedef struct _tempmon_config
32{
33 uint16_t frequency;
36 int8_t lowAlarmTemp;
38
41{
46
47/*******************************************************************************
48 * API
49 ******************************************************************************/
50
51#if defined(__cplusplus)
52extern "C" {
53#endif
54
62
69
83
89static inline void TEMPMON_StartMeasure(TEMPMON_Type *base)
90{
91 base->TEMPSENSE0 |= TEMPMON_TEMPSENSE0_MEASURE_TEMP_MASK;
92}
93
99static inline void TEMPMON_StopMeasure(TEMPMON_Type *base)
100{
101 base->TEMPSENSE0 &= ~TEMPMON_TEMPSENSE0_MEASURE_TEMP_MASK;
102}
103
111
119void TEMPMON_SetTempAlarm(TEMPMON_Type *base, int8_t tempVal, tempmon_alarm_mode alarmMode);
120
121#if defined(__cplusplus)
122}
123#endif
124
127#endif /* _FSL_TEMPMON_H_ */
int8_t lowAlarmTemp
Definition: fsl_tempmon.h:36
struct _tempmon_config tempmon_config_t
TEMPMON temperature structure.
int8_t panicAlarmTemp
Definition: fsl_tempmon.h:35
uint16_t frequency
Definition: fsl_tempmon.h:33
void TEMPMON_Deinit(TEMPMON_Type *base)
Deinitializes the TEMPMON module.
Definition: fsl_tempmon.c:92
enum _tempmon_alarm_mode tempmon_alarm_mode
TEMPMON alarm mode.
_tempmon_alarm_mode
TEMPMON alarm mode.
Definition: fsl_tempmon.h:41
void TEMPMON_SetTempAlarm(TEMPMON_Type *base, int8_t tempVal, tempmon_alarm_mode alarmMode)
Set the temperature count (raw sensor output) that will generate an alarm interrupt.
Definition: fsl_tempmon.c:160
void TEMPMON_GetDefaultConfig(tempmon_config_t *config)
Gets the default configuration structure.
Definition: fsl_tempmon.c:109
void TEMPMON_Init(TEMPMON_Type *base, const tempmon_config_t *config)
Initializes the TEMPMON module.
Definition: fsl_tempmon.c:53
int8_t highAlarmTemp
Definition: fsl_tempmon.h:34
float TEMPMON_GetCurrentTemperature(TEMPMON_Type *base)
Get current temperature with the fused temperature calibration data.
Definition: fsl_tempmon.c:132
@ kTEMPMON_LowAlarmMode
Definition: fsl_tempmon.h:44
@ kTEMPMON_PanicAlarmMode
Definition: fsl_tempmon.h:43
@ kTEMPMON_HighAlarmMode
Definition: fsl_tempmon.h:42
Definition: MIMXRT1052.h:43104
TEMPMON temperature structure.
Definition: fsl_tempmon.h:32
Definition: deflate.c:114