Fix nxstyle warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-10-19 12:30:19 +08:00
committed by Brennan Ashton
parent eb4121ce38
commit 2956b8516b
9 changed files with 109 additions and 111 deletions
+14 -16
View File
@@ -1,4 +1,4 @@
/******************************************************************************
/****************************************************************************
* include/nuttx/sensors/adxl372.h
*
* Copyright (C) 2017-2018 RAF Research LLC. All rights reserved.
@@ -31,17 +31,17 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_ADXL372_H
#define __INCLUDE_NUTTX_SENSORS_ADXL372_H
/******************************************************************************
/****************************************************************************
* Driver usage notes:
*
* This driver is a "kernel sensor leaf driver" that may be used directly from
* user applications via the file_operations interface or have selected entry
* points called directly from a "kernel sensor cluster driver".
* This driver is a "kernel sensor leaf driver" that may be used directly
* from user applications via the file_operations interface or have selected
* entry points called directly from a "kernel sensor cluster driver".
*
* To use this driver via the file_operations interface, the board
* initialization function should call this driver's registration function.
@@ -85,10 +85,9 @@
*
****************************************************************************/
/*******************************************************************************
/****************************************************************************
* Included Files
*******************************************************************************
*/
****************************************************************************/
#include <nuttx/irq.h>
#include <nuttx/config.h>
@@ -99,10 +98,9 @@
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_ADXL372) \
&& defined(CONFIG_SPI_EXCHANGE)
/*******************************************************************************
/****************************************************************************
* Pre-processor Definitions
*******************************************************************************
*/
****************************************************************************/
/* ADXL372 common definitions */
@@ -196,10 +194,10 @@ struct adxl372_dvr_entry_vector_s
{
struct sensor_cluster_operations_s c;
/* Extend the sensor cluster driver interface with a SPI DMA exchange transfer.
* The standard driver_read and driver_write perform PIO transfers.
* The will loop waiting on the SPI hardware and are only appropriate for
* short data transfers.
/* Extend the sensor cluster driver interface with a SPI DMA exchange
* transfer. The standard driver_read and driver_write perform PIO
* transfers. The will loop waiting on the SPI hardware and are only
* appropriate for short data transfers.
* Note that the first byte in the tx buffer must be a command/address
* byte. The exchange function does not provide one. Also note that
* the first byte stored in the rxbuffer is a garbage byte, which
+10 -11
View File
@@ -1,4 +1,4 @@
/*****************************************************************************
/****************************************************************************
* include/nuttx/sensors/lsm330.h
*
* Copyright (C) 2017-2018 RAF Research LLC. All rights reserved.
@@ -31,12 +31,12 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_LSM330_H
#define __INCLUDE_NUTTX_SENSORS_LSM330_H
/*****************************************************************************
/****************************************************************************
* Driver usage notes:
*
* This driver is a "kernel sensor leaf driver" that may be used directly
@@ -285,14 +285,14 @@ struct lsm330_config_s
/* Initial control register configuration values. */
uint16_t initial_cr_values_size; /* size of the below array.
* 0 = use default values. */
uint16_t initial_cr_values_size; /* size of the below array.
* 0 = use default values. */
/* The initial value store operations will occur in the order they appear
* in the array.
*/
struct lsm330_reg_pair_s *initial_cr_values;
struct lsm330_reg_pair_s *initial_cr_values;
/* The below fields are intended for the sensor cluster driver interface
* and may be ignored when the sensor cluster driver is not being used.
@@ -320,15 +320,15 @@ extern "C"
#define EXTERN extern
#endif
/*******************************************************************************
/****************************************************************************
* Name: lsm330_register
*
* Description:
* Register the LSM330 character device as 'devpath'
*
* Input Parameters:
* devpath_acl - The full path to the driver to register. E.g., "/dev/acl0"
* devpath_gyro - The full path to the driver to register. E.g., "/dev/gyr0"
* devpath_acl - The full path to the driver to register. E.g. "/dev/acl0"
* devpath_gyro - The full path to the driver to register. E.g. "/dev/gyr0"
* spi - An instance of the SPI interface to use to communicate with LSM330
* config_acl - configuration for the LSM330 accelerometer driver.
* For details see description above.
@@ -338,8 +338,7 @@ extern "C"
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
*******************************************************************************
*/
****************************************************************************/
int lsm330_register(FAR const char *devpath_acl,
FAR const char *devpath_gyro,
+2 -1
View File
@@ -127,7 +127,8 @@ extern "C"
*
****************************************************************************/
int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen);
int ramlog_register(FAR const char *devpath,
FAR char *buffer, size_t buflen);
/****************************************************************************
* Name: ramlog_syslog_register
+19 -16
View File
@@ -64,7 +64,8 @@
* unnested) that can be processed in the report item descriptor. A large
* value allows for more COLLECTION items to be processed, but consumes
* more memory. By default this is set to 10 collections, but this can be
* overridden by defining CONFIG_HID_MAXCOLLECTIONS in the NuttX config file.
* overridden by defining CONFIG_HID_MAXCOLLECTIONS in the NuttX config
* file.
*
* CONFIG_HID_MAXITEMS
* Constant indicating the maximum number of report items (IN, OUT or
@@ -80,8 +81,9 @@
* array in the user HID Report Info structure. A large value allows for
* more report ID report sizes to be stored, but consumes more memory. By
* default this is set to 10 items, but this can be overridden by defining
* CONFIG_HID_MAXIDS in the NuttX config file. Note that IN, OUT and FEATURE
* items sharing the same report ID consume only one size item in the array.
* CONFIG_HID_MAXIDS in the NuttX config file. Note that IN, OUT and
* FEATURE items sharing the same report ID consume only one size item in
* the array.
*/
#ifndef CONFIG_HID_STATEDEPTH
@@ -175,14 +177,14 @@ struct hid_rptitem_attributes_s
struct hid_rptitem_s
{
uint16_t bitoffset; /* Bit offset in IN, OUT or FEATURE report of the item */
uint8_t type; /* Report item type */
uint16_t flags; /* Item data flags */
uint8_t id; /* Report ID this item belongs to (0 if only one report) */
struct hid_collectionpath_s *collectionpath; /* Collection path of the item */
struct hid_rptitem_attributes_s attrib; /* Report item attributes */
uint32_t value; /* Current value of the report item */
uint32_t previous; /* Previous value of the report item */
uint16_t bitoffset; /* Bit offset in IN, OUT or FEATURE report of the item */
uint8_t type; /* Report item type */
uint16_t flags; /* Item data flags */
uint8_t id; /* Report ID this item belongs to (0 if only one report) */
struct hid_collectionpath_s *collectionpath; /* Collection path of the item */
struct hid_rptitem_attributes_s attrib; /* Report item attributes */
uint32_t value; /* Current value of the report item */
uint32_t previous; /* Previous value of the report item */
};
/* HID Parser Report Size Structure. Type define for a report item size
@@ -201,7 +203,9 @@ struct hid_rptsizeinfo_s
struct hid_rptinfo_s
{
/* nitems is the number of report items stored in the report items array (rptitems[]). */
/* nitems is the number of report items stored in the report items array
* (rptitems[]).
*/
uint8_t nitems;
struct hid_rptitem_s items[CONFIG_HID_MAXITEMS];
@@ -210,10 +214,10 @@ struct hid_rptinfo_s
struct hid_collectionpath_s collectionpaths[CONFIG_HID_MAXCOLLECTIONS];
uint8_t nreports; /* Number of reports within the HID interface */
uint8_t nreports; /* Number of reports within the HID interface */
struct hid_rptsizeinfo_s rptsize[CONFIG_HID_MAXIDS]; /* Report sizes for each report in the interface */
uint16_t maxrptsize; /* Largest report that the attached device will generate, in bits */
bool haverptid; /* Device has at least one REPORT ID in its HID report */
uint16_t maxrptsize; /* Largest report that the attached device will generate, in bits */
bool haverptid; /* Device has at least one REPORT ID in its HID report */
};
/* Callback routine for the HID Report Parser. This callback must be
@@ -349,5 +353,4 @@ size_t hid_reportsize(FAR struct hid_rptinfo_s *rptinfo, uint8_t id,
}
#endif
#endif /* __INCLUDE_NUTTX_USB_HID_PARSER_H */