Fix nxstyle warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-08-23 01:15:21 +08:00 committed by patacongo
parent ae356001cf
commit b5f429c88b
24 changed files with 247 additions and 207 deletions

View File

@ -1,4 +1,4 @@
/****************************************************************************
/***************************************************************************
* drivers/mtd/gd25.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -41,9 +41,9 @@
#include <nuttx/spi/spi.h>
#include <nuttx/mtd/mtd.h>
/**************************************************************************
/***************************************************************************
* Configuration
**************************************************************************/
***************************************************************************/
#ifndef CONFIG_GD25_SPIMODE
# define CONFIG_GD25_SPIMODE SPIDEV_MODE0
@ -53,12 +53,11 @@
# define CONFIG_GD25_SPIFREQUENCY 20000000
#endif
/**************************************************************************
/***************************************************************************
* GD25 Instructions
**************************************************************************/
***************************************************************************/
/* Command Value Description */
/* */
#define GD25_WREN 0x06 /* Write enable */
#define GD25_WRDI 0x04 /* Write Disable */
@ -78,9 +77,9 @@
#define GD25_JEDEC_ID 0x9f /* JEDEC ID read */
#define GD25_4BEN 0xb7 /* Enable 4-byte Mode */
/**************************************************************************
/***************************************************************************
* GD25 Registers
**************************************************************************/
***************************************************************************/
/* JEDEC Read ID register values */
@ -111,11 +110,11 @@
#define GD25_DUMMY 0x00
/**************************************************************************
/***************************************************************************
* Chip Geometries
**************************************************************************/
***************************************************************************/
/* All members of the family support uniform 4K-byte sectors and 256 byte pages */
/* All members of the family support uniform 4KB sectors and 256B pages */
#define GD25_SECTOR_SHIFT 12 /* Sector size 1 << 12 = 4Kb */
#define GD25_SECTOR_SIZE (1 << 12) /* Sector size 1 << 12 = 4Kb */
@ -124,13 +123,13 @@
#define GD25_ERASED_STATE 0xff /* State of FLASH when erased */
/**************************************************************************
/***************************************************************************
* Private Types
**************************************************************************/
***************************************************************************/
/* This type represents the state of the MTD device. The struct mtd_dev_s must
* appear at the beginning of the definition so that you can freely cast
* between pointers to struct mtd_dev_s and struct gd25_dev_s.
/* This type represents the state of the MTD device. The struct mtd_dev_s
* must appear at the beginning of the definition so that you can freely
* cast between pointers to struct mtd_dev_s and struct gd25_dev_s.
*/
struct gd25_dev_s
@ -143,9 +142,9 @@ struct gd25_dev_s
bool addr_4byte; /* True: Use Four-byte address */
};
/**************************************************************************
/***************************************************************************
* Private Function Prototypes
**************************************************************************/
***************************************************************************/
/* Helpers */
@ -190,13 +189,13 @@ static ssize_t gd25_write(FAR struct mtd_dev_s *dev, off_t offset,
size_t nbytes, FAR const uint8_t *buffer);
#endif
/**************************************************************************
/***************************************************************************
* Private Functions
**************************************************************************/
***************************************************************************/
/**************************************************************************
/***************************************************************************
* Name: gd25_purdid
**************************************************************************/
***************************************************************************/
static inline void gd25_purdid(FAR struct gd25_dev_s *priv)
{
@ -206,9 +205,9 @@ static inline void gd25_purdid(FAR struct gd25_dev_s *priv)
up_udelay(20);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_pd
**************************************************************************/
***************************************************************************/
static inline void gd25_pd(FAR struct gd25_dev_s *priv)
{
@ -217,9 +216,9 @@ static inline void gd25_pd(FAR struct gd25_dev_s *priv)
SPI_SELECT(priv->spi, SPIDEV_FLASH(priv->spi_devid), false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_lock
**************************************************************************/
***************************************************************************/
static void gd25_lock(FAR struct spi_dev_s *spi)
{
@ -231,18 +230,18 @@ static void gd25_lock(FAR struct spi_dev_s *spi)
SPI_SETFREQUENCY(spi, CONFIG_GD25_SPIFREQUENCY);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_unlock
**************************************************************************/
***************************************************************************/
static inline void gd25_unlock(FAR struct spi_dev_s *spi)
{
SPI_LOCK(spi, false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_readid
**************************************************************************/
***************************************************************************/
static inline int gd25_readid(FAR struct gd25_dev_s *priv)
{
@ -341,9 +340,9 @@ out:
return ret;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_unprotect
**************************************************************************/
***************************************************************************/
#ifndef CONFIG_GD25_READONLY
static void gd25_unprotect(FAR struct gd25_dev_s *priv)
@ -381,9 +380,9 @@ static void gd25_unprotect(FAR struct gd25_dev_s *priv)
}
#endif
/**************************************************************************
/***************************************************************************
* Name: gd25_waitwritecomplete
**************************************************************************/
***************************************************************************/
static uint8_t gd25_waitwritecomplete(FAR struct gd25_dev_s *priv)
{
@ -404,9 +403,9 @@ static uint8_t gd25_waitwritecomplete(FAR struct gd25_dev_s *priv)
return status;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_rdsr
**************************************************************************/
***************************************************************************/
static inline uint8_t gd25_rdsr(FAR struct gd25_dev_s *priv, uint32_t id)
{
@ -424,9 +423,9 @@ static inline uint8_t gd25_rdsr(FAR struct gd25_dev_s *priv, uint32_t id)
return status;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_4ben
**************************************************************************/
***************************************************************************/
static inline void gd25_4ben(FAR struct gd25_dev_s *priv)
{
@ -435,9 +434,9 @@ static inline void gd25_4ben(FAR struct gd25_dev_s *priv)
SPI_SELECT(priv->spi, SPIDEV_FLASH(priv->spi_devid), false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_wren
**************************************************************************/
***************************************************************************/
static inline void gd25_wren(FAR struct gd25_dev_s *priv)
{
@ -446,9 +445,9 @@ static inline void gd25_wren(FAR struct gd25_dev_s *priv)
SPI_SELECT(priv->spi, SPIDEV_FLASH(priv->spi_devid), false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_wrdi
**************************************************************************/
***************************************************************************/
static inline void gd25_wrdi(FAR struct gd25_dev_s *priv)
{
@ -457,9 +456,9 @@ static inline void gd25_wrdi(FAR struct gd25_dev_s *priv)
SPI_SELECT(priv->spi, SPIDEV_FLASH(priv->spi_devid), false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_is_erased
**************************************************************************/
***************************************************************************/
static bool gd25_is_erased(FAR struct gd25_dev_s *priv, off_t address,
off_t size)
@ -499,9 +498,9 @@ static bool gd25_is_erased(FAR struct gd25_dev_s *priv, off_t address,
return true;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_sectorerase
**************************************************************************/
***************************************************************************/
static void gd25_sectorerase(FAR struct gd25_dev_s *priv, off_t sector)
{
@ -549,9 +548,9 @@ static void gd25_sectorerase(FAR struct gd25_dev_s *priv, off_t sector)
SPI_SELECT(priv->spi, SPIDEV_FLASH(priv->spi_devid), false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_chiperase
**************************************************************************/
***************************************************************************/
static inline int gd25_chiperase(FAR struct gd25_dev_s *priv)
{
@ -574,9 +573,9 @@ static inline int gd25_chiperase(FAR struct gd25_dev_s *priv)
return OK;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_byteread
**************************************************************************/
***************************************************************************/
static void gd25_byteread(FAR struct gd25_dev_s *priv, FAR uint8_t *buffer,
off_t address, size_t nbytes)
@ -627,9 +626,9 @@ static void gd25_byteread(FAR struct gd25_dev_s *priv, FAR uint8_t *buffer,
SPI_SELECT(priv->spi, SPIDEV_FLASH(priv->spi_devid), false);
}
/**************************************************************************
/***************************************************************************
* Name: gd25_pagewrite
**************************************************************************/
***************************************************************************/
#ifndef CONFIG_GD25_READONLY
static void gd25_pagewrite(FAR struct gd25_dev_s *priv,
@ -682,9 +681,9 @@ static void gd25_pagewrite(FAR struct gd25_dev_s *priv,
}
#endif
/**************************************************************************
/***************************************************************************
* Name: gd25_bytewrite
**************************************************************************/
***************************************************************************/
#if defined(CONFIG_MTD_BYTE_WRITE) && !defined(CONFIG_GD25_READONLY)
static inline void gd25_bytewrite(FAR struct gd25_dev_s *priv,
@ -732,9 +731,9 @@ static inline void gd25_bytewrite(FAR struct gd25_dev_s *priv,
}
#endif /* defined(CONFIG_MTD_BYTE_WRITE) && !defined(CONFIG_GD25_READONLY) */
/**************************************************************************
/***************************************************************************
* Name: gd25_erase
**************************************************************************/
***************************************************************************/
static int gd25_erase(FAR struct mtd_dev_s *dev, off_t startblock,
size_t nblocks)
@ -766,9 +765,9 @@ static int gd25_erase(FAR struct mtd_dev_s *dev, off_t startblock,
#endif
}
/**************************************************************************
/***************************************************************************
* Name: gd25_bread
**************************************************************************/
***************************************************************************/
static ssize_t gd25_bread(FAR struct mtd_dev_s *dev, off_t startblock,
size_t nblocks, FAR uint8_t *buffer)
@ -787,9 +786,9 @@ static ssize_t gd25_bread(FAR struct mtd_dev_s *dev, off_t startblock,
return nbytes;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_bwrite
**************************************************************************/
***************************************************************************/
static ssize_t gd25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock,
size_t nblocks, FAR const uint8_t *buffer)
@ -814,9 +813,9 @@ static ssize_t gd25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock,
#endif
}
/**************************************************************************
/***************************************************************************
* Name: gd25_read
**************************************************************************/
***************************************************************************/
static ssize_t gd25_read(FAR struct mtd_dev_s *dev, off_t offset,
size_t nbytes, FAR uint8_t *buffer)
@ -837,9 +836,9 @@ static ssize_t gd25_read(FAR struct mtd_dev_s *dev, off_t offset,
return nbytes;
}
/**************************************************************************
/***************************************************************************
* Name: gd25_write
**************************************************************************/
***************************************************************************/
#ifdef CONFIG_MTD_BYTE_WRITE
static ssize_t gd25_write(FAR struct mtd_dev_s *dev, off_t offset,
@ -915,9 +914,9 @@ static ssize_t gd25_write(FAR struct mtd_dev_s *dev, off_t offset,
}
#endif
/**************************************************************************
/***************************************************************************
* Name: gd25_ioctl
**************************************************************************/
***************************************************************************/
static int gd25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
{
@ -967,19 +966,19 @@ static int gd25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
return ret;
}
/**************************************************************************
/***************************************************************************
* Public Functions
**************************************************************************/
***************************************************************************/
/**************************************************************************
/***************************************************************************
* Name: gd25_initialize
*
* Description:
* Create an initialize MTD device instance. MTD devices are not registered
* Create an initialize MTD device instance. MTD devices aren't registered
* in the file system, but are created as instances that can be bound to
* other functions (such as a block or character driver front end).
*
**************************************************************************/
***************************************************************************/
FAR struct mtd_dev_s *gd25_initialize(FAR struct spi_dev_s *spi,
uint32_t spi_devid)

View File

@ -40,8 +40,9 @@
#define BANK_SELECT 14
/* Transmit Control Register */
/* BANK 0 */
/* Transmit Control Register
* BANK 0
*/
#define TCR_REG 0x0000
#define TCR_ENABLE 0x0001 /* When 1 we can transmit */
@ -61,8 +62,9 @@
#define TCR_DEFAULT (TCR_ENABLE | TCR_PAD_EN)
/* EPH Status Register */
/* BANK 0 */
/* EPH Status Register
* BANK 0
*/
#define EPH_STATUS_REG 0x0002
#define ES_TX_SUC 0x0001 /* Last TX was successful */
@ -81,8 +83,9 @@
#define ES_TXUNRN 0x8000 /* Tx Underrun */
#define ES_ERRORS (ES_TXUNRN | ES_LOSTCARR | ES_LATCOL | ES_SQET | ES_16COL)
/* Receive Control Register */
/* BANK 0 */
/* Receive Control Register
* BANK 0
*/
#define RCR_REG 0x0004
#define RCR_RX_ABORT 0x0001 /* Set if a rx frame was aborted */
@ -103,19 +106,22 @@
#endif
#define RCR_CLEAR 0x0 /* set it to a base state */
/* Counter Register */
/* BANK 0 */
/* Counter Register
* BANK 0
*/
#define COUNTER_REG 0x0006
/* Memory Information Register */
/* BANK 0 */
/* Memory Information Register
* BANK 0
*/
#define MIR_REG 0x0008
#define MIR_FREE_MASK 0xff00
/* Receive/Phy Control Register */
/* BANK 0 */
/* Receive/Phy Control Register
* BANK 0
*/
#define RPC_REG 0x000a
#define RPC_SPEED 0x2000 /* When 1 PHY is in 100Mbps mode. */
@ -137,13 +143,15 @@
/* Bank 0 0x000c is reserved */
/* Bank Select Register */
/* All Banks */
/* Bank Select Register
* All Banks
*/
#define BSR_REG 0x000e
/* Configuration Reg */
/* BANK 1 */
/* Configuration Reg
* BANK 1
*/
#define CONFIG_REG 0x0100
#define CONFIG_EXT_PHY 0x0200 /* 1=external MII, 0=internal Phy */
@ -156,25 +164,29 @@
#define CONFIG_DEFAULT (CONFIG_EPH_POWER_EN)
#define CONFIG_CLEAR 0
/* Base Address Register */
/* BANK 1 */
/* Base Address Register
* BANK 1
*/
#define BASE_REG 0x0102
/* Individual Address Registers */
/* BANK 1 */
/* Individual Address Registers
* BANK 1
*/
#define ADDR0_REG 0x0104
#define ADDR1_REG 0x0106
#define ADDR2_REG 0x0108
/* General Purpose Register */
/* BANK 1 */
/* General Purpose Register
* BANK 1
*/
#define GP_REG 0x010a
/* Control Register */
/* BANK 1 */
/* Control Register
* BANK 1
*/
#define CTL_REG 0x010c
#define CTL_RCV_BAD 0x4000 /* When 1 bad CRC packets are received */
@ -189,8 +201,9 @@
#define CTL_DEFAULT (CTL_AUTO_RELEASE)
#define CTL_CLEAR 0
/* MMU Command Register */
/* BANK 2 */
/* MMU Command Register
* BANK 2
*/
#define MMU_CMD_REG 0x0200
#define MC_BUSY 1 /* When 1 the last release has not completed */
@ -203,33 +216,38 @@
#define MC_ENQUEUE (6<<5) /* Enqueue the packet for transmit */
#define MC_RSTTXFIFO (7<<5) /* Reset the TX FIFOs */
/* Packet Number Register */
/* BANK 2 */
/* Packet Number Register
* BANK 2
*/
#define PN_REG 0x0202
/* Allocation Result Register */
/* BANK 2 */
/* Allocation Result Register
* BANK 2
*/
#define AR_REG 0x0203
#define AR_FAILED 0x80 /* Allocation Failed */
/* TX FIFO Ports Register */
/* BANK 2 */
/* TX FIFO Ports Register
* BANK 2
*/
#define TXFIFO_REG 0x0204
#define TXFIFO_TEMPTY 0x80 /* TX FIFO Empty */
/* RX FIFO Ports Register */
/* BANK 2 */
/* RX FIFO Ports Register
* BANK 2
*/
#define RXFIFO_REG 0x0205
#define RXFIFO_REMPTY 0x80 /* RX FIFO Empty */
#define FIFO_REG 0x0204
/* Pointer Register */
/* BANK 2 */
/* Pointer Register
* BANK 2
*/
#define PTR_REG 0x0206
#define PTR_RCV 0x8000 /* 1=Receive area, 0=Transmit area */
@ -237,18 +255,21 @@
#define PTR_READ 0x2000 /* When 1 the operation is a read */
#define PTR_NOTEMPTY 0x0800 /* When 1 _do not_ write fifo DATA REG */
/* Data Register */
/* BANK 2 */
/* Data Register
* BANK 2
*/
#define DATA_REG 0x0208
/* Interrupt Status/Acknowledge Register */
/* BANK 2 */
/* Interrupt Status/Acknowledge Register
* BANK 2
*/
#define INT_REG 0x020c
/* Interrupt Mask Register */
/* BANK 2 */
/* Interrupt Mask Register
* BANK 2
*/
#define IM_REG 0x020d
#define IM_MDINT 0x80 /* PHY MI Register 18 Interrupt */
@ -260,16 +281,18 @@
#define IM_TX_INT 0x02 /* Transmit Interrupt */
#define IM_RCV_INT 0x01 /* Receive Interrupt */
/* Multicast Table Registers */
/* BANK 3 */
/* Multicast Table Registers
* BANK 3
*/
#define MCAST_REG1 0x0300
#define MCAST_REG2 0x0302
#define MCAST_REG3 0x0304
#define MCAST_REG4 0x0306
/* Management Interface Register (MII) */
/* BANK 3 */
/* Management Interface Register (MII)
* BANK 3
*/
#define MII_REG 0x0308
#define MII_MSK_CRS100 0x4000 /* Disables CRS100 detection during tx half dup */
@ -278,22 +301,25 @@
#define MII_MDI 0x0002 /* MII Input, pin MDI */
#define MII_MDO 0x0001 /* MII Output, pin MDO */
/* Revision Register */
/* BANK 3 */
/* ( hi: chip id low: rev # ) */
/* Revision Register
* BANK 3
* ( hi: chip id low: rev # )
*/
#define REV_REG 0x030a
/* Early RCV Register */
/* BANK 3 */
/* this is NOT on SMC9192 */
/* Early RCV Register
* BANK 3
* this is NOT on SMC9192
*/
#define ERCV_REG 0x030c
#define ERCV_RCV_DISCRD 0x0080 /* When 1 discards a packet being received */
#define ERCV_THRESHOLD 0x001f /* ERCV Threshold Mask */
/* External Register */
/* BANK 7 */
/* External Register
* BANK 7
*/
#define EXT_REG 0x0700
@ -305,8 +331,9 @@
#define CHIP_91100FD 8
#define CHIP_91111FD 9
/* Transmit status bits */
/* Same as ES_xxx */
/* Transmit status bits
* Same as ES_xxx
*/
/* Transmit control bits */

View File

@ -90,7 +90,8 @@ static int uart_rpmsg_setup(FAR struct uart_dev_s *dev);
static void uart_rpmsg_shutdown(FAR struct uart_dev_s *dev);
static int uart_rpmsg_attach(FAR struct uart_dev_s *dev);
static void uart_rpmsg_detach(FAR struct uart_dev_s *dev);
static int uart_rpmsg_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
static int uart_rpmsg_ioctl(FAR struct file *filep,
int cmd, unsigned long arg);
static void uart_rpmsg_rxint(FAR struct uart_dev_s *dev, bool enable);
static bool uart_rpmsg_rxflowcontrol(FAR struct uart_dev_s *dev,
unsigned int nbuffered, bool upper);

View File

@ -33,7 +33,7 @@
#define SYSLOG_RPMSG_RESUME 3
/****************************************************************************
* Private Types
* Public Types
****************************************************************************/
begin_packed_struct struct syslog_rpmsg_header_s

View File

@ -146,8 +146,9 @@ static void syslog_rpmsg_ns_unbind(FAR struct rpmsg_endpoint *ept)
kmm_free(priv);
}
static int syslog_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept, FAR void *data,
size_t len, uint32_t src, FAR void *priv_)
static int syslog_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept,
FAR void *data, size_t len,
uint32_t src, FAR void *priv_)
{
FAR struct syslog_rpmsg_server_s *priv = priv_;
FAR struct syslog_rpmsg_header_s *header = data;
@ -168,7 +169,8 @@ static int syslog_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept, FAR void *data,
if (priv->nextpos)
{
syslog_rpmsg_write(priv->tmpbuf, priv->nextpos, msg->data, printed);
syslog_rpmsg_write(priv->tmpbuf, priv->nextpos,
msg->data, printed);
priv->nextpos = 0;
}
else

View File

@ -331,8 +331,8 @@ int up_alarm_cancel(FAR struct timespec *ts)
* Provided by platform-specific code and called from the RTOS base code.
*
* Input Parameters:
* ts - The time in the future at the alarm is expected to occur. When
* the alarm occurs the timer logic will call nxsched_alarm_expiration().
* ts - The time in the future at the alarm is expected to occur. When the
* alarm occurs the timer logic will call nxsched_alarm_expiration().
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on

View File

@ -60,15 +60,15 @@ void up_rtc_set_lowerhalf(FAR struct rtc_lowerhalf_s *lower)
#endif
}
/************************************************************************************
/****************************************************************************
* Name: up_rtc_time
*
* Description:
* Get the current time in seconds. This is similar to the standard time()
* function. This interface is only required if the low-resolution RTC/counter
* hardware implementation selected. It is only used by the RTOS during
* initialization to set up the system time when CONFIG_RTC is set but neither
* CONFIG_RTC_HIRES nor CONFIG_RTC_DATETIME are set.
* Get the current time in seconds. This is similar to the standard time()
* function. This interface is only required if the low-resolution RTC/
* counter hardware implementation selected. It is only used by the RTOS
* during initialization to set up the system time when CONFIG_RTC is set
* but neither CONFIG_RTC_HIRES nor CONFIG_RTC_DATETIME are set.
*
* Input Parameters:
* None
@ -76,7 +76,7 @@ void up_rtc_set_lowerhalf(FAR struct rtc_lowerhalf_s *lower)
* Returned Value:
* The current time in seconds.
*
************************************************************************************/
****************************************************************************/
#ifndef CONFIG_RTC_HIRES
time_t up_rtc_time(void)
@ -97,13 +97,13 @@ time_t up_rtc_time(void)
}
#endif
/************************************************************************************
/****************************************************************************
* Name: up_rtc_gettime
*
* Description:
* Get the current time from the high resolution RTC clock/counter. This interface
* is only supported by the high-resolution RTC/counter hardware implementation.
* It is used to replace the system timer.
* Get the current time from the high resolution RTC clock/counter. This
* interface is only supported by the high-resolution RTC/counter hardware
* implementation. It is used to replace the system timer.
*
* Input Parameters:
* tp - The location to return the high resolution time value.
@ -111,7 +111,7 @@ time_t up_rtc_time(void)
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
************************************************************************************/
****************************************************************************/
#ifdef CONFIG_RTC_HIRES
int up_rtc_gettime(FAR struct timespec *tp)
@ -134,20 +134,20 @@ int up_rtc_gettime(FAR struct timespec *tp)
}
#endif
/************************************************************************************
/****************************************************************************
* Name: up_rtc_getdatetime
*
* Description:
* Get the current date and time from the date/time RTC. This interface
* is only supported by the date/time RTC hardware implementation.
* It is used to replace the system timer. It is only used by the RTOS during
* initialization to set up the system time when CONFIG_RTC and CONFIG_RTC_DATETIME
* are selected (and CONFIG_RTC_HIRES is not).
* It is used to replace the system timer. It is only used by the RTOS
* during initialization to set up the system time when CONFIG_RTC and
* CONFIG_RTC_DATETIME are selected (and CONFIG_RTC_HIRES is not).
*
* NOTE: Some date/time RTC hardware is capability of sub-second accuracy. That
* sub-second accuracy is lost in this interface. However, since the system time
* is reinitialized on each power-up/reset, there will be no timing inaccuracy in
* the long run.
* NOTE: Some date/time RTC hardware is capability of sub-second accuracy.
* That sub-second accuracy is lost in this interface. However, since the
* system time is reinitialized on each power-up/reset, there will be no
* timing inaccuracy in the long run.
*
* Input Parameters:
* tp - The location to return the high resolution time value.
@ -155,7 +155,7 @@ int up_rtc_gettime(FAR struct timespec *tp)
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
************************************************************************************/
****************************************************************************/
#ifdef CONFIG_RTC_DATETIME
int up_rtc_getdatetime(FAR struct tm *tp)
@ -177,20 +177,20 @@ int up_rtc_getdatetime(FAR struct tm *tp)
}
#endif
/************************************************************************************
/****************************************************************************
* Name: up_rtc_getdatetime_with_subseconds
*
* Description:
* Get the current date and time from the date/time RTC. This interface
* is only supported by the date/time RTC hardware implementation.
* It is used to replace the system timer. It is only used by the RTOS during
* initialization to set up the system time when CONFIG_RTC and CONFIG_RTC_DATETIME
* are selected (and CONFIG_RTC_HIRES is not).
* It is used to replace the system timer. It is only used by the RTOS
* during initialization to set up the system time when CONFIG_RTC and
* CONFIG_RTC_DATETIME are selected (and CONFIG_RTC_HIRES is not).
*
* NOTE: This interface exposes sub-second accuracy capability of RTC hardware.
* This interface allow maintaining timing accuracy when system time needs constant
* resynchronization with RTC, for example on MCU with low-power state that
* stop system timer.
* NOTE: This interface exposes sub-second accuracy capability of RTC
* hardware. This interface allow maintaining timing accuracy when system
* time needs constant resynchronization with RTC, for example on MCU with
* low-power state that stop system timer.
*
* Input Parameters:
* tp - The location to return the high resolution time value.
@ -199,7 +199,7 @@ int up_rtc_getdatetime(FAR struct tm *tp)
* Returned Value:
* Zero (OK) on success; a negated errno on failure
*
************************************************************************************/
****************************************************************************/
#if defined(CONFIG_RTC_DATETIME) && defined(CONFIG_ARCH_HAVE_RTC_SUBSECONDS)
int up_rtc_getdatetime_with_subseconds(FAR struct tm *tp, FAR long *nsec)
@ -222,12 +222,12 @@ int up_rtc_getdatetime_with_subseconds(FAR struct tm *tp, FAR long *nsec)
}
#endif
/************************************************************************************
/****************************************************************************
* Name: up_rtc_settime
*
* Description:
* Set the RTC to the provided time. All RTC implementations must be able to
* set their time based on a standard timespec.
* Set the RTC to the provided time. All RTC implementations must be able
* to set their time based on a standard timespec.
*
* Input Parameters:
* tp - the time to use
@ -235,7 +235,7 @@ int up_rtc_getdatetime_with_subseconds(FAR struct tm *tp, FAR long *nsec)
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
************************************************************************************/
****************************************************************************/
int up_rtc_settime(FAR const struct timespec *tp)
{

View File

@ -416,7 +416,7 @@ int up_timer_start(FAR const struct timespec *ts)
}
#endif
/********************************************************************************
/****************************************************************************
* Name: up_critmon_*
*
* Description:
@ -433,7 +433,7 @@ int up_timer_start(FAR const struct timespec *ts)
*
* The second interface simple converts an elapsed time into well known
* units.
********************************************************************************/
****************************************************************************/
#ifdef CONFIG_SCHED_CRITMONITOR
uint32_t up_critmon_gettime(void)

View File

@ -45,7 +45,7 @@ extern "C"
#endif
/****************************************************************************
* Public Functions
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
@ -132,7 +132,7 @@ void up_invalidate_icache_all(void);
# define up_invalidate_icache_all()
#endif
/****************************************************************************
/****************************************************************************
* Name: up_enable_dcache
*
* Description:

View File

@ -96,8 +96,8 @@ int up_relocateadd(FAR const Elf_Rela *rel,
* size - The exception index section size.
*
* Returned Value:
* Zero (OK) if the initialization was successful. Otherwise, a negated errno
* value indicating the cause of the failure.
* Zero (OK) if the initialization was successful. Otherwise, a negated
* errno value indicating the cause of the failure.
*
****************************************************************************/

View File

@ -46,7 +46,7 @@ extern "C"
struct partition_s
{
char name[NAME_MAX+1];
char name[NAME_MAX + 1];
size_t index;
size_t firstblock;
size_t nblocks;

View File

@ -269,7 +269,8 @@ static inline void list_delete(struct list_node *item)
item->prev = item->next = 0;
}
static inline FAR struct list_node *list_remove_head(FAR struct list_node *list)
static inline FAR struct list_node *
list_remove_head(FAR struct list_node *list)
{
if (list->next != list)
{
@ -283,7 +284,8 @@ static inline FAR struct list_node *list_remove_head(FAR struct list_node *list)
}
}
static inline FAR struct list_node *list_remove_tail(FAR struct list_node *list)
static inline FAR struct list_node *
list_remove_tail(FAR struct list_node *list)
{
if (list->prev != list)
{
@ -297,7 +299,8 @@ static inline FAR struct list_node *list_remove_tail(FAR struct list_node *list)
}
}
static inline FAR struct list_node *list_peek_head(FAR struct list_node *list)
static inline FAR struct list_node *
list_peek_head(FAR struct list_node *list)
{
if (list->next != list)
{
@ -309,7 +312,8 @@ static inline FAR struct list_node *list_peek_head(FAR struct list_node *list)
}
}
static inline FAR struct list_node *list_peek_tail(FAR struct list_node *list)
static inline FAR struct list_node *
list_peek_tail(FAR struct list_node *list)
{
if (list->prev != list)
{
@ -334,8 +338,8 @@ static inline FAR struct list_node *list_prev(FAR struct list_node *list,
}
}
static inline FAR struct list_node *list_prev_wrap(FAR struct list_node *list,
FAR struct list_node *item)
static inline FAR struct list_node *
list_prev_wrap(FAR struct list_node *list, FAR struct list_node *item)
{
if (item->prev != list)
{
@ -364,8 +368,8 @@ static inline FAR struct list_node *list_next(FAR struct list_node *list,
}
}
static inline FAR struct list_node *list_next_wrap(FAR struct list_node *list,
FAR struct list_node *item)
static inline FAR struct list_node *
list_next_wrap(FAR struct list_node *list, FAR struct list_node *item)
{
if (item->next != list)
{
@ -399,4 +403,4 @@ static inline size_t list_length(FAR struct list_node *list)
return cnt;
}
#endif /*__INCLUDE_NUTTX_LIST_H */
#endif /* __INCLUDE_NUTTX_LIST_H */

View File

@ -21,7 +21,7 @@
#ifndef __INCLUDE_NUTTX_NET_LAN91C111_H
#define __INCLUDE_NUTTX_NET_LAN91C111_H
/****************************************************************************'
/****************************************************************************
* Included Files
****************************************************************************/
@ -29,7 +29,7 @@
#include <stdint.h>
/****************************************************************************'
/****************************************************************************
* Public Function Prototypes
****************************************************************************/

View File

@ -68,4 +68,4 @@ void rpmsg_unregister_callback(FAR void *priv,
#endif
#endif /* CONFIG_RPTUN */
#endif /*__INCLUDE_NUTTX_RPTUN_OPENAMP_H */
#endif /* __INCLUDE_NUTTX_RPTUN_OPENAMP_H */

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/timers/arch_rtc.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,7 +16,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_TIMERS_ARCH_RTC_H
#define __INCLUDE_NUTTX_TIMERS_ARCH_RTC_H

View File

@ -53,7 +53,8 @@ int pthread_attr_getstack(FAR pthread_attr_t *attr,
{
int ret;
linfo("attr=0x%p stackaddr=0x%p stacksize=0x%p\n", attr, stackaddr, stacksize);
linfo("attr=0x%p stackaddr=0x%p stacksize=0x%p\n",
attr, stackaddr, stacksize);
if (!attr || !stackaddr || !stacksize)
{

View File

@ -55,7 +55,8 @@ int pthread_attr_setstack(FAR pthread_attr_t *attr,
{
int ret;
linfo("attr=0x%p stackaddr=0x%p stacksize=%ld\n", attr, stackaddr, stacksize);
linfo("attr=0x%p stackaddr=0x%p stacksize=%ld\n",
attr, stackaddr, stacksize);
if (!attr || !stackaddr || stacksize < PTHREAD_STACK_MIN)
{

View File

@ -121,12 +121,12 @@ icmpv6_linkipaddr_8(FAR const void *mac_, net_ipv6addr_t ipaddr)
*
* Description:
* Generate the device link scope ipv6 address as below:
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address IEEE 48-bit MAC
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
* fe80 0000 0000 0000 xxxx xxff fexx xxxx 6-byte normal address IEEE 48-bit MAC
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1B short address IEEE 48b MAC
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2B short address IEEE 48b MAC
* fe80 0000 0000 0000 xxxx xxff fexx xxxx 6B normal address IEEE 48b MAC
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8B extended address IEEE EUI-64
*
* Input Parameters:
* dev - The device driver structure containing the link layer address

View File

@ -99,7 +99,8 @@ int ipv4_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
#ifdef NET_TCP_HAVE_STACK
case SOCK_STREAM:
{
FAR struct tcp_conn_s *tcp_conn = (FAR struct tcp_conn_s *)psock->s_conn;
FAR struct tcp_conn_s *tcp_conn =
(FAR struct tcp_conn_s *)psock->s_conn;
outaddr->sin_port = tcp_conn->rport; /* Already in network byte order */
ripaddr = tcp_conn->u.ipv4.raddr;
@ -110,7 +111,8 @@ int ipv4_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
#ifdef NET_UDP_HAVE_STACK
case SOCK_DGRAM:
{
FAR struct udp_conn_s *udp_conn = (FAR struct udp_conn_s *)psock->s_conn;
FAR struct udp_conn_s *udp_conn =
(FAR struct udp_conn_s *)psock->s_conn;
outaddr->sin_port = udp_conn->rport; /* Already in network byte order */
ripaddr = udp_conn->u.ipv4.raddr;

View File

@ -98,7 +98,8 @@ int ipv6_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
#ifdef NET_TCP_HAVE_STACK
case SOCK_STREAM:
{
FAR struct tcp_conn_s *tcp_conn = (FAR struct tcp_conn_s *)psock->s_conn;
FAR struct tcp_conn_s *tcp_conn =
(FAR struct tcp_conn_s *)psock->s_conn;
outaddr->sin6_port = tcp_conn->lport; /* Already in network byte order */
ripaddr = &tcp_conn->u.ipv6.raddr;
@ -109,7 +110,8 @@ int ipv6_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
#ifdef NET_UDP_HAVE_STACK
case SOCK_DGRAM:
{
FAR struct udp_conn_s *udp_conn = (FAR struct udp_conn_s *)psock->s_conn;
FAR struct udp_conn_s *udp_conn =
(FAR struct udp_conn_s *)psock->s_conn;
outaddr->sin6_port = udp_conn->lport; /* Already in network byte order */
ripaddr = &udp_conn->u.ipv6.raddr;

View File

@ -199,7 +199,8 @@ static int do_accept_request(FAR struct usrsock_conn_s *conn,
* Parameters:
* psock Reference to the listening socket structure
* addr Receives the address of the connecting client
* addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
* addrlen Input: allocated size of 'addr',
* Return: returned size of 'addr'
* newsock Location to return the accepted socket information.
*
* Returned Value:

View File

@ -172,7 +172,7 @@ int usrsock_getpeername(FAR struct socket *psock,
{
/* Invalid state or closed by daemon. */
ninfo("usockid=%d; usrsock_getpeername() with uninitialized usrsock.\n",
ninfo("usockid=%d; usrsock_getpeername() with uninitialized usrsock\n",
conn->usockid);
ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :

View File

@ -137,7 +137,7 @@ static int do_ioctl_request(FAR struct usrsock_conn_s *conn, int cmd,
* Name: usrsock_ioctl
*
* Description:
* The usrsock_ioctl() function performs network device specific operations.
* This function performs network device specific operations.
*
* Parameters:
* psock A pointer to a NuttX-specific, internal socket structure

View File

@ -76,9 +76,9 @@
* to indicate the error.
*
* EINVAL - The which argument does not correspond to an predefined ID.
* EINVAL - A value structure specified a microsecond value less than zero or
* greater than or equal to 1000 million, and the it_value member of that
* structure did not specify zero seconds and nanoseconds.
* EINVAL - A value structure specified a microsecond value less than zero
* or greater than or equal to 1000 million, and the it_value member of
* that structure did not specify zero seconds and nanoseconds.
*
* Assumptions:
*