raiden00pl commented on code in PR #15428: URL: https://github.com/apache/nuttx/pull/15428#discussion_r1904067249
########## arch/arm/src/stm32/stm32_spi.c: ########## @@ -1512,7 +1517,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) if (nbits != priv->nbits) { -#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32G4XXX) Review Comment: ```suggestion #if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) || \ defined(CONFIG_STM32_STM32G4XXX) ``` ########## drivers/sensors/Make.defs: ########## @@ -291,10 +300,6 @@ ifeq ($(CONFIG_SENSORS_LTR308),y) CSRCS += ltr308_uorb.c endif -ifeq ($(CONFIG_SENSORS_FS3000),y) Review Comment: please bring it back ########## drivers/sensors/Kconfig: ########## @@ -1758,48 +1828,4 @@ config SENSOR_AMG88XX_ADDR endif # SENSORS_AMG88XX -config SENSORS_FS3000 Review Comment: please bring it back ########## 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: what is the purpose of these? access to the system registers shouldn't be available to user-space in this way. It's not portable at all. -- 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