JerrySlhao commented on code in PR #15428:
URL: https://github.com/apache/nuttx/pull/15428#discussion_r1904076594


##########
include/nuttx/sensors/bmi088.h:
##########
@@ -0,0 +1,217 @@
+/****************************************************************************
+ * include/nuttx/sensors/bmi088.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * 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_BMI088_H
+#define __INCLUDE_NUTTX_SENSORS_BMI088_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/fs/ioctl.h>
+
+#if defined(CONFIG_SENSORS_BMI088) || defined(CONFIG_SENSORS_BMI088_SCU)
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define BMI088_SPI_MAXFREQUENCY 1000000
+
+/* Configuration ************************************************************/
+
+/* Power mode */
+
+#define BMI088_PM_SUSPEND       (0x00)
+#define BMI088_PM_NORMAL        (0x01)
+#define BMI088_PM_LOWPOWER      (0x02)
+#define BMI088_PM_FASTSTARTUP   (0x03)
+
+/* Output data rate */
+
+#define BMI088_ACCEL_ODR_0_78HZ (0x01)
+#define BMI088_ACCEL_ODR_1_56HZ (0x02)
+#define BMI088_ACCEL_ODR_3_12HZ (0x03)
+#define BMI088_ACCEL_ODR_6_25HZ (0x04)
+#define BMI088_ACCEL_ODR_12_5HZ (0x05)
+#define BMI088_ACCEL_ODR_25HZ   (0x06)
+#define BMI088_ACCEL_ODR_50HZ   (0x07)
+#define BMI088_ACCEL_ODR_100HZ  (0x08)
+#define BMI088_ACCEL_ODR_200HZ  (0x09)
+#define BMI088_ACCEL_ODR_400HZ  (0x0A)
+#define BMI088_ACCEL_ODR_800HZ  (0x0B)
+#define BMI088_ACCEL_ODR_1600HZ (0x0C)
+
+/* IOCTL Commands ***********************************************************/
+
+#define SNIOC_ACC_GET_CHIPID              _SNIOC(0x0001)

Review Comment:
   This is the interface reserved for configuring BMI088 working parameters at 
the user layer. Users may need to modify the working status of BMI088. First, 
the board initializes the default parameters of BMI088. If the user wants to 
modify the working parameters of BMI088, the ioctl can be modified.



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