mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-05 01:02:18 +00:00
Replace the existing Apache 2.0 boilerplate header with an SPDX tag throughout the zephyr code tree. This patch was generated via a script run over the master branch. Also updated doc/porting/application.rst that had a dependency on line numbers in a literal include. Manually updated subsys/logging/sys_log.c that had a malformed header in the original file. Also cleanup several cases that already had a SPDX tag and we either got a duplicate or missed updating. Jira: ZEP-1457 Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
38 lines
809 B
C
38 lines
809 B
C
/*
|
|
* Copyright (c) 2016 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef _SENSOR_TH02
|
|
#define _SENSOR_TH02
|
|
|
|
#include <device.h>
|
|
#include <misc/util.h>
|
|
|
|
#define TH02_I2C_DEV_ID 0x40
|
|
#define TH02_REG_STATUS 0x00
|
|
#define TH02_REG_DATA_H 0x01
|
|
#define TH02_REG_DATA_L 0x02
|
|
#define TH02_REG_CONFIG 0x03
|
|
#define TH02_REG_ID 0x11
|
|
|
|
#define TH02_STATUS_RDY_MASK 0x01
|
|
|
|
#define TH02_CMD_MEASURE_HUMI 0x01
|
|
#define TH02_CMD_MEASURE_TEMP 0x11
|
|
|
|
#define TH02_WR_REG_MODE 0xC0
|
|
#define TH02_RD_REG_MODE 0x80
|
|
|
|
struct th02_data {
|
|
struct device *i2c;
|
|
uint16_t t_sample;
|
|
uint16_t rh_sample;
|
|
};
|
|
|
|
#define SYS_LOG_DOMAIN "TH02"
|
|
#define SYS_LOG_LEVEL CONFIG_SYS_LOG_SENSOR_LEVEL
|
|
#include <logging/sys_log.h>
|
|
#endif /* _SENSOR_TH02_ */
|