You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/05/06 19:38:50 UTC

[GitHub] [mynewt-core] vrahane commented on a change in pull request #1801: Added support to Infineon DPS368/3xx barometric pressure sensor.

vrahane commented on a change in pull request #1801: Added support to Infineon DPS368/3xx barometric pressure sensor.
URL: https://github.com/apache/mynewt-core/pull/1801#discussion_r281323438
 
 

 ##########
 File path: hw/drivers/sensors/dps368/include/dps368/dps368.h
 ##########
 @@ -0,0 +1,374 @@
+/*Copyright 2019 Infineon Technologies AG
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * dps368_priv.h
+ *
+ *  Created on: Apr 15, 2019
+ *      Author: Saumitra Chafekar
+ */
+#ifndef __DPS368_H__
+#define __DPS368_H__
+
+
+#include "os/mynewt.h"
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
+#include "bus/drivers/i2c_common.h"
+#include "bus/drivers/spi_common.h"
+#endif
+
+#include "sensor/sensor.h"
+
+
+
+#define IFX_DPS368_OFF_TO_IDLE_MS		40
+#define IFX_DPS368_TRIM_FINISH_TIME_MS	12
+#define IFX_DPS368_DEV_PROD_REVID		0x10
+
+#define IFX_DPS368_CONFIG_TIME_MS		1 //1 ms config time
+
+#define IFX_DPS368_FAC_TEST_RUN_PRS_ODR DPS368_ODR_8
+#define IFX_DPS368_FAC_TEST_RUN_TMP_ODR	DPS368_ODR_4
+
+
+#define IFX_DPS368_DEFAULT_PRS_ODR		DPS368_ODR_32
+#define IFX_DPS368_DEFAULT_TMP_ODR		DPS368_ODR_8
+
+
+/* DPS368 Device Register Addresses , Values and Lengths of register words (values to be read or written)*/
+#define     IFX_DPS368_PROD_REV_ID_REG_ADDR             0x0D
+#define     IFX_DPS368_PROD_REV_ID_LEN                  1
+#define     IFX_DSPS368_PROD_REV_ID_VAL                 IFX_DPS368_DEV_PROD_REVID
+
+#define     IFX_DPS368_SOFT_RESET_REG_ADDR              0x0C
+#define     IFX_DPS368_SOFT_RESET_REG_DATA              0x09
+#define     IFX_DPS368_SOFT_RESET_REG_LEN               1
+#define     IFX_DPS368_SOFT_RESET_VERIFY_REG_ADDR       0x06
+
+#define     IFX_DPS368_COEF_REG_ADDR                    0x10
+#define     IFX_DPS368_COEF_LEN                         18    // Length in bytes
+
+#define     IFX_DPS368_TMP_COEF_SRCE_REG_ADDR           0x28
+#define     IFX_DPS368_TMP_COEF_SRCE_REG_LEN            1
+#define     IFX_DPS368_TMP_COEF_SRCE_REG_POS            7
+
+#define     IFX_DPS368_PSR_TMP_READ_REG_ADDR            0x00
+#define     IFX_DPS368_PSR_TMP_READ_LEN                 6
+
+#define     IFX_DPS368_PRS_CFG_REG_ADDR                 0x06
+#define     IFX_DPS368_PRS_CFG_REG_LEN                  1
+
+#define     IFX_DPS368_TMP_CFG_REG_ADDR                 0x07
+#define     IFX_DPS368_TMP_CFG_REG_LEN                  1
+
+#define     IFX_DPS368_MEAS_CFG_REG_ADDR                0x08
+#define     IFX_DPS368_MEAS_CFG_REG_LEN                 1
+#define		IFX_DPS368_MEAS_CFG_REG_SEN_RDY_VAL			0x40
 
 Review comment:
   Seems tab was used instead of spaces by mistake

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services