Line data Source code
1 1 : /* 2 : * Copyright (c) 2021, Jimmy Johnson <catch22@fastmail.net> 3 : * 4 : * SPDX-License-Identifier: Apache-2.0 5 : */ 6 : 7 : /** 8 : * @file 9 : * @brief Extended public API for TI's TMP108 temperature sensor 10 : * 11 : * This exposes attributes for the TMP108 which can be used for 12 : * setting the on-chip Temperature Mode and alert parameters. 13 : */ 14 : 15 : #ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_TMP108_H_ 16 : #define ZEPHYR_INCLUDE_DRIVERS_SENSOR_TMP108_H_ 17 : 18 : #ifdef __cplusplus 19 : extern "C" { 20 : #endif 21 : 22 0 : enum sensor_attribute_tmp_108 { 23 : /** Turn on power saving/one shot mode */ 24 : SENSOR_ATTR_TMP108_ONE_SHOT_MODE = SENSOR_ATTR_PRIV_START, 25 : /** Shutdown the sensor */ 26 : SENSOR_ATTR_TMP108_SHUTDOWN_MODE, 27 : /** Turn on continuous conversion */ 28 : SENSOR_ATTR_TMP108_CONTINUOUS_CONVERSION_MODE, 29 : /** Set the alert pin polarity */ 30 : SENSOR_ATTR_TMP108_ALERT_POLARITY 31 : }; 32 : 33 : /** a tmp108 mask for the over temp alert bit in the status word*/ 34 1 : #define TMP108_OVER_TEMP_MASK 0x1000U 35 : 36 : /** a tmp108 mask for the under temp alert bit in the status word*/ 37 1 : #define TMP108_UNDER_TEMP_MASK 0x0800U 38 : 39 : /** a as6212 mask for the over temp alert bit in the status word*/ 40 1 : #define A6212_ALERT_TEMP_MASK 0x0020U 41 : 42 : #ifdef __cplusplus 43 : } 44 : #endif 45 : 46 : #endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_TMP108_H_ */