TimJTi commented on code in PR #8789:
URL: https://github.com/apache/nuttx/pull/8789#discussion_r1144656078


##########
include/nuttx/sensors/apds9922.h:
##########
@@ -0,0 +1,279 @@
+/****************************************************************************
+ * include/nuttx/sensors/apds9922.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you 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
+ *
+ *   http://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.
+ *
+ ****************************************************************************/
+
+#ifndef __INCLUDE_NUTTX_SENSORS_APDS9922_H
+#define __INCLUDE_NUTTX_SENSORS_APDS9922_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/irq.h>
+#include <nuttx/i2c/i2c_master.h>
+#include <nuttx/sensors/ioctl.h>
+
+#if defined(CONFIG_SENSORS_APDS9922)
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+#define APDS9922_I2C_ADDR   (0x53)
+#define APDS9922_ID_VAL     (0xb3)
+
+#define PS_DEF_THRESHU      (0x07ff)
+#define PS_DEF_THRESHL      (0)
+#define PS_DEF_CANCEL_LVL   (0)
+#define PS_DEF_PULSES       (0x08)
+#define ALS_DEF_THRESHU     (0x0fffff)
+#define ALS_DEF_THRESHL     (0)
+#define PS_DEF_PERSISTANCE  (0)
+#define ALS_DEF_PERSISTANCE (0)
+#define ALS_DEF_VAR         (0)
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+enum
+{
+  ALS_RATE25MS,
+  ALS_RATE50MS,
+  ALS_RATE100MS,
+  ALS_RATE200MS,
+  ALS_RATE500MS,
+  ALS_RATE1000MS,
+  ALS_RATE2000MS,
+  ALS_RATE4000MS,
+};
+
+enum
+{
+  ALS_RES400MS,
+  ALS_RES200MS,
+  ALS_RES100MS,
+  ALS_RES50MS,
+  ALS_RES25MS,
+};
+
+enum
+{
+  ALS_GAINX1,
+  ALS_GAINX3,
+  ALS_GAINX6,
+  ALS_GAINX9,
+  ALS_GAINX18,
+};
+
+enum
+{
+  ALS_VAR8,
+  ALS_VAR16,
+  ALS_VAR32,
+  ALS_VAR64,
+  ALS_VAR128,
+  ALS_VAR256,
+  ALS_VAR512,
+  ALS_VAR1024,
+};
+
+enum
+{
+  ALS_IR,
+  ALS_VISIBLE,
+};
+
+enum
+{
+  PS_RATE_RESERVED,
+  PS_RATE6MS25,
+  PS_RATE12MS5,
+  PS_RATE25MS,
+  PS_RATE50MS,
+  PS_RATE100MS,
+  PS_RATE200MS,
+  PS_RATE400MS,
+};
+
+enum
+{
+  PS_RES8,
+  PS_RES9,
+  PS_RES10,
+  PS_RES11,
+};
+
+enum
+{
+  PS_LED_FREQ_RESERVED1,
+  PS_LED_FREQ_RESERVED2,
+  PS_LED_FREQ_RESERVED3,
+  PS_LED_FREQ60K,

Review Comment:
   not needed - done.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to