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

View File

@ -47,6 +47,7 @@
************************************************************************************/ ************************************************************************************/
/* Per the data sheet: LPC4350/30/20/10 Rev. 3.2 — 4 June 2012 */ /* Per the data sheet: LPC4350/30/20/10 Rev. 3.2 — 4 June 2012 */
/* Get customizations for each supported chip. /* Get customizations for each supported chip.
* *
* SRAM Resources * SRAM Resources
@ -75,6 +76,7 @@
*/ */
/* Per the user manual: UM10503, Rev. 1.2 — 8 June 2012 */ /* Per the user manual: UM10503, Rev. 1.2 — 8 June 2012 */
/* Get customizations for each supported chip. /* Get customizations for each supported chip.
* *
* SRAM Resources * SRAM Resources
@ -90,7 +92,7 @@
* --------------------- -------- ------- ------- ------- ------- ------- ------- * --------------------- -------- ------- ------- ------- ------- ------- -------
* BANK 0 (0x2000 0000) 16Kb 48Kb 48Kb 48Kb 48Kb 48Kb 48Kb * BANK 0 (0x2000 0000) 16Kb 48Kb 48Kb 48Kb 48Kb 48Kb 48Kb
* BANK 1 (0x2000 8000) NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1 * BANK 1 (0x2000 8000) NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1
* BANK 2 (0x2000 c000) 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb * BANK 2 (0x2000 c000) 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb
* --------------------- -------- ------- ------- ------- ------- ------- ------- * --------------------- -------- ------- ------- ------- ------- ------- -------
* SUBTOTAL 32Kb 64Kb 64Kb 64Kb 64Kb 64Kb 64Kb * SUBTOTAL 32Kb 64Kb 64Kb 64Kb 64Kb 64Kb 64Kb
* --------------------- -------- ------- ------- ------- ------- ------- ------- * --------------------- -------- ------- ------- ------- ------- ------- -------
@ -103,7 +105,7 @@
* BANK A (0x1a00 0000) 256Kb 512Kb 512Kb * BANK A (0x1a00 0000) 256Kb 512Kb 512Kb
* BANK B (0x1b00 8000) 256Kb 512Kb 512Kb * BANK B (0x1b00 8000) 256Kb 512Kb 512Kb
* --------------------- -------- ------- ------- ------- ------- ------- ------- * --------------------- -------- ------- ------- ------- ------- ------- -------
* TOTAL None None None None 512Kb 1024Kb 1024Kb * TOTAL None None None None 512Kb 1024Kb 1024Kb
* --------------------- -------- ------- ------- ------- ------- ------- ------- * --------------------- -------- ------- ------- ------- ------- ------- -------
* *
* NOTE 1: The 64Kb of AHB of SRAM on the LPC4350/30/20 span all AHB SRAM * NOTE 1: The 64Kb of AHB of SRAM on the LPC4350/30/20 span all AHB SRAM
@ -688,6 +690,7 @@
#endif #endif
/* NVIC priority levels *************************************************************/ /* NVIC priority levels *************************************************************/
/* Each priority field holds a priority value, 0-31. The lower the value, the greater /* Each priority field holds a priority value, 0-31. The lower the value, the greater
* the priority of the corresponding interrupt. * the priority of the corresponding interrupt.
* *
@ -713,16 +716,4 @@
#define NVIC_SYSH_PRIORITY_MAX LPC43M4_SYSH_PRIORITY_MAX #define NVIC_SYSH_PRIORITY_MAX LPC43M4_SYSH_PRIORITY_MAX
#define NVIC_SYSH_PRIORITY_STEP LPC43M4_SYSH_PRIORITY_STEP #define NVIC_SYSH_PRIORITY_STEP LPC43M4_SYSH_PRIORITY_STEP
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Public Data
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
#endif /* __ARCH_ARM_INCLUDE_LPC43XX_CHIP_H */ #endif /* __ARCH_ARM_INCLUDE_LPC43XX_CHIP_H */

View File

@ -148,7 +148,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
if ((getreg32(SAM_TRNG_ISR) & TRNG_INT_DATRDY) == 0) if ((getreg32(SAM_TRNG_ISR) & TRNG_INT_DATRDY) == 0)
{ {
/* No? Then return and continue processing on the next interrupt. */ /* No? Then return and continue processing on the next
* interrupt.
*/
return OK; return OK;
} }
@ -156,10 +158,10 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
/* As required by the FIPS PUB (Federal Information Processing Standard /* As required by the FIPS PUB (Federal Information Processing Standard
* Publication) 140-2, the first random number generated after setting * Publication) 140-2, the first random number generated after setting
* the RNGEN bit should not be used, but saved for comparison with the * the RNGEN bit should not be used, but saved for comparison with the
* next generated random number. Each subsequent generated random number * next generated random number. Each subsequent generated random
* has to be compared with the previously generated number. The test * number has to be compared with the previously generated number. The
* fails if any two compared numbers are equal (continuous random number * test fails if any two compared numbers are equal (continuous random
* generator test). * number generator test).
*/ */
if (g_trngdev.nsamples == 0) if (g_trngdev.nsamples == 0)
@ -179,7 +181,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
else if (odata == g_trngdev.samples[g_trngdev.nsamples - 1]) else if (odata == g_trngdev.samples[g_trngdev.nsamples - 1])
{ {
/* Two samples with the same value. Discard this one and try again. */ /* Two samples with the same value. Discard this one and try
* again.
*/
continue; continue;
} }
@ -307,7 +311,7 @@ static ssize_t sam_read(struct file *filep, char *buffer, size_t buflen)
/* Success... calculate the number of bytes to return */ /* Success... calculate the number of bytes to return */
retval = g_trngdev.nsamples << 2; retval = g_trngdev.nsamples << 2;
errout: errout:

View File

@ -149,7 +149,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
if ((getreg32(SAM_TRNG_ISR) & TRNG_INT_DATRDY) == 0) if ((getreg32(SAM_TRNG_ISR) & TRNG_INT_DATRDY) == 0)
{ {
/* No? Then return and continue processing on the next interrupt. */ /* No? Then return and continue processing on the next
* interrupt.
*/
return OK; return OK;
} }
@ -157,10 +159,10 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
/* As required by the FIPS PUB (Federal Information Processing Standard /* As required by the FIPS PUB (Federal Information Processing Standard
* Publication) 140-2, the first random number generated after setting * Publication) 140-2, the first random number generated after setting
* the RNGEN bit should not be used, but saved for comparison with the * the RNGEN bit should not be used, but saved for comparison with the
* next generated random number. Each subsequent generated random number * next generated random number. Each subsequent generated random
* has to be compared with the previously generated number. The test * number has to be compared with the previously generated number. The
* fails if any two compared numbers are equal (continuous random number * test fails if any two compared numbers are equal (continuous random
* generator test). * number generator test).
*/ */
if (g_trngdev.nsamples == 0) if (g_trngdev.nsamples == 0)
@ -180,7 +182,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
else if (odata == g_trngdev.samples[g_trngdev.nsamples - 1]) else if (odata == g_trngdev.samples[g_trngdev.nsamples - 1])
{ {
/* Two samples with the same value. Discard this one and try again. */ /* Two samples with the same value. Discard this one and try
* again.
*/
continue; continue;
} }
@ -310,7 +314,7 @@ static ssize_t sam_read(struct file *filep, char *buffer, size_t buflen)
/* Success... calculate the number of bytes to return */ /* Success... calculate the number of bytes to return */
retval = g_trngdev.nsamples << 2; retval = g_trngdev.nsamples << 2;
errout: errout:

View File

@ -129,7 +129,7 @@
BOARD_SIM_CLKDIV2_USBFRAC) BOARD_SIM_CLKDIV2_USBFRAC)
#endif #endif
/* Divider output clock = Divider input clock * ((PLLFLLFRAC+1)/(PLLFLLDIV+1)) /* Divider output clock = Divider input clock*((PLLFLLFRAC+1)/(PLLFLLDIV+1))
* SIM_CLKDIV3_FREQ = BOARD_SOPT2_FREQ × [ (PLLFLLFRAC+1) / (PLLFLLDIV+1)] * SIM_CLKDIV3_FREQ = BOARD_SOPT2_FREQ × [ (PLLFLLFRAC+1) / (PLLFLLDIV+1)]
* 90 MHz = 180 MHz X [(0 + 1) / (1 + 1)] * 90 MHz = 180 MHz X [(0 + 1) / (1 + 1)]
* 90 MHz = 180 MHz / (1 + 1) * (0 + 1) * 90 MHz = 180 MHz / (1 + 1) * (0 + 1)
@ -275,10 +275,10 @@
* Besides the general purpose input/output functions, SW2 and SW3 can be * Besides the general purpose input/output functions, SW2 and SW3 can be
* low-power wake up signal. Also, only SW3 can be a non-maskable interrupt. * low-power wake up signal. Also, only SW3 can be a non-maskable interrupt.
* *
* Switch GPIO Function * Switch GPIO Function
* --------- --------------------------------------------------------------- * ------ ---------------------------------------------------------------
* SW2 PTC6/SPI0_SOUT/PD0_EXTRG/I2S0_RX_BCLK/FB_AD9/I2S0_MCLK/LLWU_P10 * SW2 PTC6/SPI0_SOUT/PD0_EXTRG/I2S0_RX_BCLK/FB_AD9/I2S0_MCLK/LLWU_P10
* SW3 PTA4/FTM0_CH1/NMI_b/LLWU_P3 * SW3 PTA4/FTM0_CH1/NMI_b/LLWU_P3
*/ */
#define BUTTON_SW2 0 #define BUTTON_SW2 0
@ -382,38 +382,36 @@
#define PIN_SPI1_SIN PIN_SPI1_SIN_3 #define PIN_SPI1_SIN PIN_SPI1_SIN_3
/* Ethernet MAC/KSZ8081 PHY /* Ethernet MAC/KSZ8081 PHY
* ------------------------ * ------------ ----------- ---------------------------------------
* ------------ ----------------- -------------------------------------------- * KSZ8081 Board K66F Pin
* KSZ8081 Board Signal(s) K66F Pin * Pin Signal Signal(s) Function pinmux Name
* Pin Signal Function pinmux Name * --- -------- ------------ ---------------------------------------
* --- -------- ----------------- -------------------------------------------- * 1 VDD_1V2 VDDPLL_1.2V --- ---
* 1 VDD_1V2 VDDPLL_1.2V --- --- * 2 VDDA_3V3 VDDA_ENET --- ---
* 2 VDDA_3V3 VDDA_ENET --- --- * 3 RXM ENET1_RX- --- ---
* 3 RXM ENET1_RX- --- --- * 4 RXP ENET1_RX+ --- ---
* 4 RXP ENET1_RX+ --- --- * 5 TXM ENET1_TX- --- ---
* 5 TXM ENET1_TX- --- --- * 6 TXP ENET1_TX+ --- ---
* 6 TXP ENET1_TX+ --- --- * 7 X0 RMII_XTAL0 --- ---
* 7 X0 RMII_XTAL0 --- --- * 8 XI RMII_XTAL1 --- ---
* 8 XI RMII_XTAL1 --- --- * 9 REXT --- Apparently not connected ---
* 9 REXT --- ---, Apparently not connected --- * 10 MDIO RMII0_MDIO PTB0/RMII0_MDIO PIN_RMII0_MDIO
* 10 MDIO RMII0_MDIO PTB0/RMII0_MDIO PIN_RMII0_MDIO * 11 MDC RMII0_MDC PTB1/RMII0_MDC PIN_RMII0_MDC
* 11 MDC RMII0_MDC PTB1/RMII0_MDC PIN_RMII0_MDC * 12 RXD1 RMII0_RXD_1 PTA12/RMII0_RXD1 PIN_RMII0_RXD1
* 12 RXD1 RMII0_RXD_1 PTA12/RMII0_RXD1 PIN_RMII0_RXD1 * 13 RXD0 RMII0_RXD_0 PTA13/RMII0_RXD0 PIN_RMII0_RXD0
* 13 RXD0 RMII0_RXD_0 PTA13/RMII0_RXD0 PIN_RMII0_RXD0 * 14 VDDIO VDDIO_ENET --- ---
* 14 VDDIO VDDIO_ENET --- --- * 15 CRS_DIV PTA14/RMII0_CRS_DV PIN_RMII0_CRS_DV
* 15 CRS_DIV PTA14/RMII0_CRS_DV PIN_RMII0_CRS_DV * 16 REF_CLK PTE26 PTE26(Ethernet clock) PTE26/ENET_1588_CLKIN
* 16 REF_CLK PTE26 PTE26(Ethernet clock) PTE26/ENET_1588_CLKIN * 17 RXER RMII0_RXER PTA5/RMII0_RXER PIN_RMII0_RXER
* 17 RXER RMII0_RXER PTA5/RMII0_RXER PIN_RMII0_RXER * 18 INTRP RMII0_INT_B, J14 Pin 2, Apparently not ---
* 18 INTRP RMII0_INT_B, J14 Pin 2, Apparently not --- * PHY_INT_1 available unless jumpered ---
* PHY_INT_1 available unless jumpered * 19 TXEN RMII0_TXEN PTA15/RMII0_TXEN PIN_RMII0_TXEN
* 19 TXEN RMII0_TXEN PTA15/RMII0_TXEN PIN_RMII0_TXEN * 20 TXD0 RMII0_TXD_0 PTA16/RMII0_TXD0 PIN_RMII0_TXD0
* 20 TXD0 RMII0_TXD_0 PTA16/RMII0_TXD0 PIN_RMII0_TXD0 * 21 TXD1 RMII0_TXD_1 PTA17/RMII0_TXD1 PIN_RMII0_TXD1
* 21 TXD1 RMII0_TXD_1 PTA17/RMII0_TXD1 PIN_RMII0_TXD1 * 22 GND1 --- --- ---
* 22 GND1 --- --- --- * 24 nRST PHY_RST_B --- ---
* 24 nRST PHY_RST_B --- --- * 25 GND2 --- --- ---
* 25 GND2 --- --- --- * --- -------- ------------ --------------------------------------------
* --- -------- ----------------- --------------------------------------------
*
*/ */
#define PIN_RMII0_MDIO PIN_RMII0_MDIO_1 #define PIN_RMII0_MDIO PIN_RMII0_MDIO_1

View File

@ -1,4 +1,4 @@
/****************************************************************************** /****************************************************************************
* include/nuttx/sensors/adxl372.h * include/nuttx/sensors/adxl372.h
* *
* Copyright (C) 2017-2018 RAF Research LLC. All rights reserved. * 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 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
******************************************************************************/ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_ADXL372_H #ifndef __INCLUDE_NUTTX_SENSORS_ADXL372_H
#define __INCLUDE_NUTTX_SENSORS_ADXL372_H #define __INCLUDE_NUTTX_SENSORS_ADXL372_H
/****************************************************************************** /****************************************************************************
* Driver usage notes: * Driver usage notes:
* *
* This driver is a "kernel sensor leaf driver" that may be used directly from * This driver is a "kernel sensor leaf driver" that may be used directly
* user applications via the file_operations interface or have selected entry * from user applications via the file_operations interface or have selected
* points called directly from a "kernel sensor cluster driver". * entry points called directly from a "kernel sensor cluster driver".
* *
* To use this driver via the file_operations interface, the board * To use this driver via the file_operations interface, the board
* initialization function should call this driver's registration function. * initialization function should call this driver's registration function.
@ -85,10 +85,9 @@
* *
****************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Included Files * Included Files
******************************************************************************* ****************************************************************************/
*/
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/config.h> #include <nuttx/config.h>
@ -99,10 +98,9 @@
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_ADXL372) \ #if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_ADXL372) \
&& defined(CONFIG_SPI_EXCHANGE) && defined(CONFIG_SPI_EXCHANGE)
/******************************************************************************* /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
******************************************************************************* ****************************************************************************/
*/
/* ADXL372 common definitions */ /* ADXL372 common definitions */
@ -196,10 +194,10 @@ struct adxl372_dvr_entry_vector_s
{ {
struct sensor_cluster_operations_s c; struct sensor_cluster_operations_s c;
/* Extend the sensor cluster driver interface with a SPI DMA exchange transfer. /* Extend the sensor cluster driver interface with a SPI DMA exchange
* The standard driver_read and driver_write perform PIO transfers. * transfer. The standard driver_read and driver_write perform PIO
* The will loop waiting on the SPI hardware and are only appropriate for * transfers. The will loop waiting on the SPI hardware and are only
* short data transfers. * appropriate for short data transfers.
* Note that the first byte in the tx buffer must be a command/address * 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 * byte. The exchange function does not provide one. Also note that
* the first byte stored in the rxbuffer is a garbage byte, which * the first byte stored in the rxbuffer is a garbage byte, which

View File

@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* include/nuttx/sensors/lsm330.h * include/nuttx/sensors/lsm330.h
* *
* Copyright (C) 2017-2018 RAF Research LLC. All rights reserved. * 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 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_LSM330_H #ifndef __INCLUDE_NUTTX_SENSORS_LSM330_H
#define __INCLUDE_NUTTX_SENSORS_LSM330_H #define __INCLUDE_NUTTX_SENSORS_LSM330_H
/***************************************************************************** /****************************************************************************
* Driver usage notes: * Driver usage notes:
* *
* This driver is a "kernel sensor leaf driver" that may be used directly * 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. */ /* Initial control register configuration values. */
uint16_t initial_cr_values_size; /* size of the below array. uint16_t initial_cr_values_size; /* size of the below array.
* 0 = use default values. */ * 0 = use default values. */
/* The initial value store operations will occur in the order they appear /* The initial value store operations will occur in the order they appear
* in the array. * 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 /* The below fields are intended for the sensor cluster driver interface
* and may be ignored when the sensor cluster driver is not being used. * and may be ignored when the sensor cluster driver is not being used.
@ -320,15 +320,15 @@ extern "C"
#define EXTERN extern #define EXTERN extern
#endif #endif
/******************************************************************************* /****************************************************************************
* Name: lsm330_register * Name: lsm330_register
* *
* Description: * Description:
* Register the LSM330 character device as 'devpath' * Register the LSM330 character device as 'devpath'
* *
* Input Parameters: * Input Parameters:
* devpath_acl - The full path to the driver to register. E.g., "/dev/acl0" * 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_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 * spi - An instance of the SPI interface to use to communicate with LSM330
* config_acl - configuration for the LSM330 accelerometer driver. * config_acl - configuration for the LSM330 accelerometer driver.
* For details see description above. * For details see description above.
@ -338,8 +338,7 @@ extern "C"
* Returned Value: * Returned Value:
* Zero (OK) on success; a negated errno value on failure. * Zero (OK) on success; a negated errno value on failure.
* *
******************************************************************************* ****************************************************************************/
*/
int lsm330_register(FAR const char *devpath_acl, int lsm330_register(FAR const char *devpath_acl,
FAR const char *devpath_gyro, FAR const char *devpath_gyro,

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 * Name: ramlog_syslog_register

View File

@ -64,7 +64,8 @@
* unnested) that can be processed in the report item descriptor. A large * unnested) that can be processed in the report item descriptor. A large
* value allows for more COLLECTION items to be processed, but consumes * 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 * 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 * CONFIG_HID_MAXITEMS
* Constant indicating the maximum number of report items (IN, OUT or * 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 * 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 * 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 * 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 * CONFIG_HID_MAXIDS in the NuttX config file. Note that IN, OUT and
* items sharing the same report ID consume only one size item in the array. * FEATURE items sharing the same report ID consume only one size item in
* the array.
*/ */
#ifndef CONFIG_HID_STATEDEPTH #ifndef CONFIG_HID_STATEDEPTH
@ -175,14 +177,14 @@ struct hid_rptitem_attributes_s
struct hid_rptitem_s struct hid_rptitem_s
{ {
uint16_t bitoffset; /* Bit offset in IN, OUT or FEATURE report of the item */ uint16_t bitoffset; /* Bit offset in IN, OUT or FEATURE report of the item */
uint8_t type; /* Report item type */ uint8_t type; /* Report item type */
uint16_t flags; /* Item data flags */ uint16_t flags; /* Item data flags */
uint8_t id; /* Report ID this item belongs to (0 if only one report) */ 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_collectionpath_s *collectionpath; /* Collection path of the item */
struct hid_rptitem_attributes_s attrib; /* Report item attributes */ struct hid_rptitem_attributes_s attrib; /* Report item attributes */
uint32_t value; /* Current value of the report item */ uint32_t value; /* Current value of the report item */
uint32_t previous; /* Previous 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 /* HID Parser Report Size Structure. Type define for a report item size
@ -201,7 +203,9 @@ struct hid_rptsizeinfo_s
struct hid_rptinfo_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; uint8_t nitems;
struct hid_rptitem_s items[CONFIG_HID_MAXITEMS]; struct hid_rptitem_s items[CONFIG_HID_MAXITEMS];
@ -210,10 +214,10 @@ struct hid_rptinfo_s
struct hid_collectionpath_s collectionpaths[CONFIG_HID_MAXCOLLECTIONS]; 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 */ 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 */ 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 */ bool haverptid; /* Device has at least one REPORT ID in its HID report */
}; };
/* Callback routine for the HID Report Parser. This callback must be /* 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
#endif /* __INCLUDE_NUTTX_USB_HID_PARSER_H */ #endif /* __INCLUDE_NUTTX_USB_HID_PARSER_H */

View File

@ -224,7 +224,7 @@ void net_ipv6_pref2mask(uint8_t preflen, net_ipv6addr_t mask);
* data and len. * data and len.
* *
* Input Parameters: * Input Parameters:
* sum - Partial calculations carried over from a previous call to chksum(). * sum - Partial calculations carried over from a previous call to chksum.
* This should be zero on the first time that check sum is called. * This should be zero on the first time that check sum is called.
* data - Beginning of the data to include in the checksum. * data - Beginning of the data to include in the checksum.
* len - Length of the data to include in the checksum. * len - Length of the data to include in the checksum.
@ -254,7 +254,7 @@ uint16_t chksum(uint16_t sum, FAR const uint8_t *data, uint16_t len);
* *
* buf - A pointer to the buffer over which the checksum is to be computed. * buf - A pointer to the buffer over which the checksum is to be computed.
* *
* len - The length of the buffer over which the checksum is to be computed. * len - Length of the buffer over which the checksum is to be computed.
* *
* Returned Value: * Returned Value:
* The Internet checksum of the buffer. * The Internet checksum of the buffer.