include: Fix nxstyle errors

error: Long line found
This commit is contained in:
simbit18 2023-05-03 16:11:05 +02:00 committed by Xiang Xiao
parent e7df243a4a
commit b1404f486e
15 changed files with 363 additions and 322 deletions

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/fcntl.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,23 +16,23 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_FCNTL_H
#define __INCLUDE_FCNTL_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
/* open flag settings for open() (and related APIs) */
@ -162,9 +162,9 @@
# define posix_fallocate64 posix_fallocate
#endif
/********************************************************************************
/****************************************************************************
* Public Type Definitions
********************************************************************************/
****************************************************************************/
/* struct flock is the third argument for F_GETLK, F_SETLK and F_SETLKW */
@ -177,9 +177,9 @@ struct flock
pid_t l_pid; /* PID of process blocking our lock (F_GETLK only) */
};
/********************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
@ -190,9 +190,9 @@ extern "C"
#define EXTERN extern
#endif
/********************************************************************************
/****************************************************************************
* Public Data
********************************************************************************/
****************************************************************************/
/* POSIX-like File System Interfaces */

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/limits.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_LIMITS_H
#define __INCLUDE_LIMITS_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@ -31,11 +31,11 @@
#include <arch/limits.h>
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
/* Default values for user configurable limits **********************************/
/* Default values for user configurable limits ******************************/
/* Maximum number of bytes in a filename (not including terminating null). */
@ -62,7 +62,7 @@
#define MB_LEN_MAX 4
/* Configurable limits required by POSIX ****************************************
/* Configurable limits required by POSIX ************************************
*
* Required for all implementations:
*
@ -74,15 +74,18 @@
* _POSIX_NAME_MAX Number of bytes in a file or pathname component
* _POSIX_NGROUPS_MAX Number supplementary group IDs
* _POSIX_OPEN_MAX Number of files a task can have open at once
* _POSIX_PATH_MAX Number of bytes in a full pathname (including NULL)
* _POSIX_PATH_MAX Number of bytes in a full pathname
* (including NULL)
* _POSIX_PIPE_BUF Number of bytes for atomic write into pipe
* _POSIX_SSIZE_MAX Largest filesystem write; also max value of ssize_t
* _POSIX_SSIZE_MAX Largest filesystem write; also max value
* of ssize_t
* _POSIX_STREAM_MAX Number of std I/O streams open at once
* _POSIX_TZNAME_MAX Max number of bytes of a timezone name
*
* Required for sigqueue
*
* _POSIX_RTSIG_MAX Number of realtime signals reserved for application
* _POSIX_RTSIG_MAX Number of realtime signals reserved
* for application
* _POSIX_SIGQUEUE_MAX Max number signals a task can queue
*
* Required for POSIX timers
@ -107,9 +110,9 @@
* _POSIX_SEM_VALUE_MAX Max value a semaphore may have
*
* Required for symbolic links
* _POSIX_SYMLOOP_MAX Maximum number of symbolic links that can be
* reliably traversed in the resolution of a pathname
* in the absence of a loop.
* _POSIX_SYMLOOP_MAX Maximum number of symbolic links that can be
* reliably traversed in the resolution of a pathname
* in the absence of a loop.
*
*/

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/mqueue.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,27 +16,27 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_MQUEUE_H
#define __INCLUDE_MQUEUE_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <sys/types.h>
#include <signal.h>
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
#define MQ_NONBLOCK O_NONBLOCK
/********************************************************************************
/****************************************************************************
* Public Type Declarations
********************************************************************************/
****************************************************************************/
/* Message queue attributes */
@ -52,9 +52,9 @@ struct mq_attr
typedef int mqd_t;
/********************************************************************************
/****************************************************************************
* Public Data
********************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -64,9 +64,9 @@ extern "C"
#define EXTERN extern
#endif
/********************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************/
****************************************************************************/
mqd_t mq_open(FAR const char *mq_name, int oflags, ...);
int mq_close(mqd_t mqdes);

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/analog/comp.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_ANALOG_COMP_H
#define __INCLUDE_NUTTX_ANALOG_COMP_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
@ -40,15 +40,15 @@
# define CONFIG_DEV_COMP_NPOLLWAITERS 2
#endif
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
struct comp_dev_s;
struct comp_callback_s
{
/* This method is called from the lower half, platform-specific COMP logic when
* comparator output state changes.
/* This method is called from the lower half, platform-specific COMP logic
* when comparator output state changes.
*
* Input Parameters:
* dev - The COMP device structure that was previously registered by
@ -64,8 +64,8 @@ struct comp_callback_s
struct comp_ops_s
{
/* Bind the upper-half driver callbacks to the lower-half implementation. This
* must be called early in order to receive COMP event notifications.
/* Bind the upper-half driver callbacks to the lower-half implementation.
* This must be called early in order to receive COMP event notifications.
*/
CODE int (*ao_bind)(FAR struct comp_dev_s *dev,
@ -73,8 +73,8 @@ struct comp_ops_s
/* Configure the COMP. This method is called the first time that the COMP
* device is opened. This will occur when the port is first opened.
* This setup includes configuring and attaching COMP interrupts. Interrupts
* are all disabled upon return.
* This setup includes configuring and attaching COMP interrupts.
* Interrupts are all disabled upon return.
*/
CODE int (*ao_setup)(FAR struct comp_dev_s *dev);
@ -92,7 +92,8 @@ struct comp_ops_s
/* All ioctl calls will be routed through this method */
CODE int (*ao_ioctl)(FAR struct comp_dev_s *dev, int cmd, unsigned long arg);
CODE int (*ao_ioctl)(FAR struct comp_dev_s *dev,
int cmd, unsigned long arg);
};
struct comp_dev_s
@ -116,9 +117,9 @@ struct comp_dev_s
FAR void *ad_priv; /* Used by the arch-specific logic */
};
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
#if defined(__cplusplus)
extern "C"

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/analog/opamp.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_ANALOG_OPAMP_H
#define __INCLUDE_NUTTX_ANALOG_OPAMP_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
@ -35,22 +35,23 @@
#include <nuttx/fs/fs.h>
#include <nuttx/mutex.h>
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
struct opamp_dev_s;
struct opamp_ops_s
{
/* Configure the OPAMP. This method is called the first time that the OPAMP
* device is opened. This will occur when the port is first opened.
* This setup includes configuring and attaching OPAMP interrupts. Interrupts
* are all disabled upon return.
* This setup includes configuring and attaching OPAMP interrupts.
* Interruptsare all disabled upon return.
*/
CODE int (*ao_setup)(FAR struct opamp_dev_s *dev);
/* Disable the OPAMP. This method is called when the OPAMP device is closed.
/* Disable the OPAMP. This method is called when the OPAMP device
* is closed.
* This method reverses the operation of the setup method.
* Works only if OPAMP device is not locked.
*/
@ -59,7 +60,8 @@ struct opamp_ops_s
/* All ioctl calls will be routed through this method */
CODE int (*ao_ioctl)(FAR struct opamp_dev_s *dev, int cmd, unsigned long arg);
CODE int (*ao_ioctl)(FAR struct opamp_dev_s *dev,
int cmd, unsigned long arg);
};
struct opamp_dev_s
@ -77,9 +79,9 @@ struct opamp_dev_s
FAR void *ad_priv; /* Used by the arch-specific logic */
};
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
#if defined(__cplusplus)
extern "C"

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/binfmt/ieee695.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,24 +16,24 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_BINFMT_IEEE695_H
#define __INCLUDE_NUTTX_BINFMT_IEEE695_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* IEEE695 Record Types *************************************************************/
/* IEEE695 Record Types *****************************************************/
#define IEEE695_RECTYPE_THEADR 0x80 /* Translator Header Record */
#define IEEE695_RECTYPE_LHEADR 0x82 /* Library Module Header Record */
@ -130,8 +130,8 @@
#define IEEE695_COMENT_CMDLINE 0xff /* Command line (Microsoft QuickC) */
/* 0xc0-0xff Reserved for user-defined comment classes */
/* OMF extensions to the comment class. This class consists of a set of records,
* identified by subtype (first byte of commentary string).
/* OMF extensions to the comment class. This class consists of a set
* of records, identified by subtype (first byte of commentary string).
*/
#define IEEE695_OMFEXT_IMPDEF 0x01 /* Import definition record */
@ -143,16 +143,18 @@
#define IEEE695_OMFEXT_PRECOMP 0x07
/* 0x08-0xff Reserved */
/* Link pass separator. This record conveys information to the linker about the
* organization of the file. The value of the first byte of the commentary string
* specifies the comment subtype. Currently, a single subtype is defined:
/* Link pass separator. This record conveys information to the linker about
* the organization of the file. The value of the first byte of the
* commentary string specifies the comment subtype.
* Currently, a single subtype is defined:
*
* Note: This comment class may become obsolete with the advent of COMDAT records.
* Note: This comment class may become obsolete with the advent of
* COMDAT records.
*/
#define IEEE695_COMENT_PASS2 0x01 /* Records generated from Pass 2 of the linker */
/* Standard Functions, Identifiers and Commands *************************************/
/* Standard Functions, Identifiers and Commands *****************************/
/* Standard functions */
@ -316,7 +318,8 @@
#define IEEE695_SYMATTR_CONSTANT 16 /* Constant (see additional attributes below */
#define IEEE695_SYMATTR_STATIC 19 /* Static symbol generated by assembler */
/* Constant Symbol Attributes. Constant symbols have four additional arguments:
/* Constant Symbol Attributes.
* Constant symbols have four additional arguments:
*
* 1. Symbol class
* 2. Public/local indicator (optional). One means public.
@ -332,9 +335,11 @@
#define IEEE695_SYMCLASS_PASCAL 3 /* Pascal CONST constant */
#define IEEE695_SYMCLASS_DEFINE 4 /* C #define constant */
/* Helper Macros ********************************************************************/
/* Helper Macros ************************************************************/
/* These macros extract un-aligned, little-endian values from the object file */
/* These macros extract un-aligned, little-endian values
* from the object file
*/
#define IEEE695_GETUINT16(p) \
(((uint16_t)(*(FAR uint8_t *)(p)) << 8) | \
@ -355,9 +360,9 @@
#define IEEE695_MAX_RECLEN 1024
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/* This structure describes one IEEE 605 record. The actual size of the
* data[] array is the value of the 'len' field plus one to account to a
@ -415,9 +420,9 @@ struct ieee695_modend_s
uint8_t mdata[1]; /* Module data begins here */
};
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
#if defined(__cplusplus)
#define EXTERN extern "C"
@ -427,9 +432,9 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
/****************************************************************************
* Public Functions Definitions
************************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/can/can.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_CAN_CAN_H
#define __INCLUDE_NUTTX_CAN_CAN_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
@ -44,39 +44,41 @@
#ifdef CONFIG_CAN
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* Configuration ********************************************************************/
/* Configuration ************************************************************/
/* CONFIG_CAN - Enables CAN support (MCU-specific selections are also required. For
* STM32, as an example, one or both of CONFIG_STM32_CAN1 or CONFIG_STM32_CAN2
* must also be defined)
/* CONFIG_CAN - Enables CAN support
* (MCU-specific selections are also required. For STM32, as an example,
* one or both of CONFIG_STM32_CAN1 or CONFIG_STM32_CAN2
* must also be defined).
* CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default
* Standard 11-bit IDs.
* CONFIG_CAN_FD - Enable support for CAN FD mode. For the upper half driver, this
* just means handling encoded DLC values (for values of DLC > 9).
* CONFIG_CAN_FD - Enable support for CAN FD mode.
* For the upper half driver, this just means handling encoded DLC values
* (for values of DLC > 9).
* CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages.
* Default: 8
* CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests.
* Default: 4
* CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback
* mode for testing. If the driver does support loopback mode, the setting
* will enable it. (If the driver does not, this setting will have no effect).
* The loopback mode may be changed later by ioctl() if the driver supports the
* CANIOC_SET_CONNMODES ioctl command.
* CONFIG_CAN_TXREADY - Add support for the can_txready() callback. This is needed
* only for CAN hardware the supports an separate H/W TX message FIFO. The call
* back is needed to keep the S/W FIFO and the H/W FIFO in sync. Work queue
* support is needed for this feature.
* CONFIG_CAN_TXREADY_HIPRI or CONFIG_CAN_TXREADY_LOPRI - Selects which work queue
* will be used for the can_txready() processing.
* will enable it. (If the driver does not, this setting will have
* no effect). The loopback mode may be changed later by ioctl()
* if the driver supports the CANIOC_SET_CONNMODES ioctl command.
* CONFIG_CAN_TXREADY - Add support for the can_txready() callback.
* This is needed only for CAN hardware the supports an separate
* H/W TX message FIFO. The call back is needed to keep the S/W FIFO and
* the H/W FIFO in sync. Work queue support is needed for this feature.
* CONFIG_CAN_TXREADY_HIPRI or CONFIG_CAN_TXREADY_LOPRI - Selects which
* work queue will be used for the can_txready() processing.
*/
/* Default configuration settings that may be overridden in the NuttX configuration
* file or in the board configuration file. The configured size is limited to 255
* to fit into a uint8_t.
/* Default configuration settings that may be overridden in the NuttX
* configuration file or in the board configuration file.
* The configured size is limited to 255 to fit into a uint8_t.
*/
#if !defined(CONFIG_CAN_FIFOSIZE)
@ -93,18 +95,19 @@
# define CONFIG_CAN_NPENDINGRTR 255
#endif
/* Ioctl Commands *******************************************************************/
/* Ioctl Commands ***********************************************************/
/* Ioctl commands supported by the upper half CAN driver.
*
* CANIOC_RTR:
* Description: Send the given message as a remote request. On successful
* return, the passed message structure is updated with
* the contents of the received message; i.e. the message
* ID and the standard/extended ID indication bit stay the
* same, but the DLC and data bits are updated with the
* contents of the received message. If no response is
* received after the specified timeout, ioctl will return.
* Description: Send the given message as a remote request.
* On successful return, the passed message structure
* is updated with the contents of the received message;
* i.e. the message ID and the standard/extended
* ID indication bit stay the same, but the DLC and data
* bits are updated with the contents of the
* received message. If no response is received after
* the specified timeout, ioctl will return.
*
* Note: Lower-half drivers that do not implement
* CONFIG_CAN_USE_RTR and implement co_remoterequest
@ -116,7 +119,8 @@
* is returned with the errno variable set to indicate the
* nature of the error (for example, ETIMEDOUT)
*
* Ioctl commands that may or may not be supported by the lower half CAN driver.
* Ioctl commands that may or may not be supported
* by the lower half CAN driver.
*
* CANIOC_ADD_STDFILTER:
* Description: Add an address filter for a standard 11 bit address.
@ -175,7 +179,8 @@
* CANIOC_GET_CONNMODES:
* Description: Get the current bus connection modes
* Argument: A pointer to a write-able instance of struct
* canioc_connmodes_s in which the new bus modes will be returned.
* canioc_connmodes_s in which the new bus modes
* will be returned.
* Returned Value: Zero (OK) is returned on success. Otherwise -1 (ERROR)
* is returned with the errno variable set to indicate the
* nature of the error.
@ -184,7 +189,8 @@
* CANIOC_SET_CONNMODES:
* Description: Set new bus connection modes values
* Argument: A pointer to a read-able instance of struct
* canioc_connmodes_s in which the new bus modes are provided.
* canioc_connmodes_s in which the new bus modes
* are provided.
* Returned Value: Zero (OK) is returned on success. Otherwise -1 (ERROR)
* is returned with the errno variable set to indicate the
* nature of the error.
@ -234,32 +240,33 @@
#define CAN_NCMDS 12 /* Ten common commands */
/* User defined ioctl commands are also supported. These will be forwarded
* by the upper-half CAN driver to the lower-half CAN driver via the co_ioctl()
* method of the CAN lower-half interface. However, the lower-half driver
* must reserve a block of commands as follows in order prevent IOCTL
* command numbers from overlapping.
* by the upper-half CAN driver to the lower-half CAN driver via the
* co_ioctl() method of the CAN lower-half interface.
* However, the lower-half driver must reserve a block of commands
* as follows in order prevent IOCTL command numbers from overlapping.
*
* This is generally done as follows. The first reservation for CAN driver A would
* look like:
* This is generally done as follows. The first reservation for CAN driver A
* would look like:
*
* CAN_A_FIRST (CAN_FIRST + CAN_NCMDS) <- First command
* CAN_A_NCMDS 42 <- Number of commands
* CAN_A_FIRST (CAN_FIRST + CAN_NCMDS) <- First command
* CAN_A_NCMDS 42 <- Number of commands
*
* IOCTL commands for CAN driver A would then be defined in a CAN A header file like:
* IOCTL commands for CAN driver A would then be defined in a
* CAN A header file like:
*
* CANIOC_A_CMD1 _CANIOC(CAN_A_FIRST+0)
* CANIOC_A_CMD2 _CANIOC(CAN_A_FIRST+1)
* CANIOC_A_CMD3 _CANIOC(CAN_A_FIRST+2)
* CANIOC_A_CMD1 _CANIOC(CAN_A_FIRST+0)
* CANIOC_A_CMD2 _CANIOC(CAN_A_FIRST+1)
* CANIOC_A_CMD3 _CANIOC(CAN_A_FIRST+2)
* ...
* CANIOC_A_CMD42 _CANIOC(CAN_A_FIRST+41)
* CANIOC_A_CMD42 _CANIOC(CAN_A_FIRST+41)
*
* The next reservation would look like:
*
* CAN_B_FIRST (CAN_A_FIRST + CAN_A_NCMDS) <- Next command
* CAN_B_NCMDS 77 <- Number of commands
* CAN_B_FIRST (CAN_A_FIRST + CAN_A_NCMDS) <- Next command
* CAN_B_NCMDS 77 <- Number of commands
*/
/* Convenience macros ***************************************************************/
/* Convenience macros *******************************************************/
#define dev_reset(dev) dev->cd_ops->co_reset(dev)
#define dev_setup(dev) dev->cd_ops->co_setup(dev)
@ -272,7 +279,7 @@
#define dev_txready(dev) dev->cd_ops->co_txready(dev)
#define dev_txempty(dev) dev->cd_ops->co_txempty(dev)
/* CAN message support **************************************************************/
/* CAN message support ******************************************************/
#ifdef CONFIG_CAN_FD
# define CAN_MAXDATALEN 64
@ -285,10 +292,12 @@
#define CAN_MSGLEN(nbytes) (sizeof(struct can_msg_s) - CAN_MAXDATALEN + (nbytes))
/* CAN Error Indications ************************************************************/
/* CAN Error Indications ****************************************************/
#ifdef CONFIG_CAN_ERRORS
/* Bit settings in the ch_id field of the CAN error message (when ch_error is set) */
/* Bit settings in the ch_id field of the CAN error message
* (when ch_error is set)
*/
# define CAN_ERROR_TXTIMEOUT (1 << 0) /* Bit 0: TX timeout */
# define CAN_ERROR_LOSTARB (1 << 1) /* Bit 1: Lost arbitration (See CAN_ERROR0_* definitions) */
@ -302,8 +311,8 @@
# define CAN_ERROR_INTERNAL (1 << 9) /* Bit 9: Stack internal error (See CAN_ERROR5_* definitions) */
/* Bit 10: Available */
/* The remaining definitions described the error report payload that follows the
* CAN header.
/* The remaining definitions described the error report payload that follows
* the CAN header.
*/
# define CAN_ERROR_DLC (8) /* DLC of error report */
@ -336,7 +345,9 @@
# define CAN_ERROR2_ACTIVE (1 << 6) /* Bit 6: Active error announcement */
# define CAN_ERROR2_TX (1 << 7) /* Bit 7: Error occurred on transmission */
/* Data[3]: Error in CAN protocol. This provides the loation of the error. */
/* Data[3]: Error in CAN protocol.
* This provides the loation of the error.
*/
# define CAN_ERROR3_UNSPEC 0x00 /* Unspecified error */
# define CAN_ERROR3_SOF 0x01 /* start of frame */
@ -383,11 +394,11 @@
#endif /* CONFIG_CAN_ERRORS */
/* CAN filter support ***************************************************************/
/* CAN filter support *******************************************************/
/* Some CAN hardware supports a notion of prioritizing messages that match filters.
* Only two priority levels are currently supported and are encoded as defined
* below:
/* Some CAN hardware supports a notion of prioritizing messages
* that match filters. Only two priority levels are currently supported
* and are encoded as defined below:
*/
#define CAN_MSGPRIO_LOW 0
@ -399,50 +410,56 @@
#define CAN_FILTER_DUAL 1 /* Dual address match */
#define CAN_FILTER_RANGE 2 /* Match a range of addresses */
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/* CAN-message Format (without Extended ID support)
*
* One based CAN-message is represented with a maximum of 10 bytes. A message is
* composed of at least the first 2 bytes (when there are no data bytes present).
* One based CAN-message is represented with a maximum of 10 bytes.
* A message is composed of at least the first 2 bytes
* (when there are no data bytes present).
*
* Bytes 0-1: Bits 0-3: Data Length Code (DLC)
* Bit 4: Remote Transmission Request (RTR)
* Bit 5: 1=Message ID is a bit-encoded error report (See NOTE)
* Bit 5: 1=Message ID is a bit-encoded error report
* (See NOTE)
* Bits 6-7: Unused
* Bytes 1-2: Bits 0-10: The 11-bit CAN identifier This message ID is a bit
* encoded error set if ch_error is set (See NOTE).
* Bytes 1-2: Bits 0-10: The 11-bit CAN identifier This message ID
* is a bit encoded error set if ch_error is set
* (See NOTE).
* Bits 11-15: Unused
* Bytes 3-10: CAN data
*
* CAN-message Format (with Extended ID support)
*
* One CAN-message consists of a maximum of 13 bytes. A message is composed of at
* least the first 5 bytes (when there are no data bytes).
* One CAN-message consists of a maximum of 13 bytes. A message is
* composed of at least the first 5 bytes (when there are no data bytes).
*
* Bytes 0-3: Bits 0-28: Hold 11- or 29-bit CAN ID in host byte order. This
* message ID is a bit encoded error set if ch_error
* is set (See NOTE).
* Bytes 0-3: Bits 0-28: Hold 11- or 29-bit CAN ID in host byte order.
* This message ID is a bit encoded error
* set if ch_error is set (See NOTE).
* Bits 29-31: Unused
* Byte 4: Bits 0-3: Data Length Code (DLC)
* Bit 4: Remote Transmission Request (RTR)
* Bit 5: 1=Message ID is a bit-encoded error report (See NOTE)
* Bit 5: 1=Message ID is a bit-encoded error report
* (See NOTE)
* Bit 6: Extended ID indication
* Bit 7: Unused
* Bytes 5-12: CAN data Size determined by DLC
*
* NOTE: The error indication if valid only on message reports received from the
* CAN driver; it is ignored on transmission. When the error bit is set, the
* message ID is an encoded set of error indications (see CAN_ERROR_* definitions).
* NOTE: The error indication if valid only on message reports received from
* the CAN driver; it is ignored on transmission. When the error bit is set,
* the message ID is an encoded set of error indications
* (see CAN_ERROR_* definitions).
* A more detailed report of certain errors then follows in message payload.
* CONFIG_CAN_ERRORS=y is required in order to receive error reports.
*
* The struct can_msg_s holds this information in a user-friendly, unpacked form.
* This is the form that is used at the read() and write() driver interfaces. The
* message structure is actually variable length -- the true length is given by
* the CAN_MSGLEN macro.
* The struct can_msg_s holds this information in a user-friendly,
* unpacked form.
* This is the form that is used at the read() and write() driver interfaces.
* The message structure is actually variable length the true length
* is given by the CAN_MSGLEN macro.
*/
#ifdef CONFIG_CAN_EXTID
@ -517,7 +534,9 @@ struct can_txfifo_s
struct can_msg_s tx_buffer[CONFIG_CAN_FIFOSIZE];
};
/* The following structure define the logic to handle one RTR message transaction */
/* The following structure define the logic to handle
* one RTR message transaction
*/
struct can_rtrwait_s
{
@ -525,9 +544,9 @@ struct can_rtrwait_s
FAR struct can_msg_s *cr_msg; /* This is where the RTR response goes */
};
/* This structure defines all of the operations provided by the architecture specific
* logic. All fields must be provided with non-NULL function pointers by the
* caller of can_register().
/* This structure defines all of the operations provided by the architecture
* specific logic. All fields must be provided with non-NULL
* function pointers by the caller of can_register().
*/
struct can_dev_s;
@ -563,7 +582,8 @@ struct can_ops_s
/* All ioctl calls will be routed through this method */
CODE int (*co_ioctl)(FAR struct can_dev_s *dev, int cmd, unsigned long arg);
CODE int (*co_ioctl)(FAR struct can_dev_s *dev,
int cmd, unsigned long arg);
/* Send a remote request. Lower-half drivers should NOT implement this if
* they support sending RTR messages with the regular send function
@ -586,7 +606,8 @@ struct can_ops_s
/* Return true if all message have been sent. If for example, the CAN
* hardware implements FIFOs, then this would mean the transmit FIFO is
* empty. This method is called when the driver needs to make sure that
* all characters are "drained" from the TX hardware before calling co_shutdown().
* all characters are "drained" from the TX hardware before
* calling co_shutdown().
*/
CODE bool (*co_txempty)(FAR struct can_dev_s *dev);
@ -710,9 +731,9 @@ struct canioc_stdfilter_s
uint8_t sf_prio; /* See CAN_MSGPRIO_* definitions */
};
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
@ -723,17 +744,17 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
/****************************************************************************
* Name: can_register
*
* Description:
* Register a CAN driver.
*
************************************************************************************/
****************************************************************************/
int can_register(FAR const char *path, FAR struct can_dev_s *dev);
/************************************************************************************
/****************************************************************************
* Name: can_receive
*
* Description:
@ -747,12 +768,12 @@ int can_register(FAR const char *path, FAR struct can_dev_s *dev);
* Returned Value:
* OK on success; a negated errno on failure.
*
************************************************************************************/
****************************************************************************/
int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
FAR uint8_t *data);
/************************************************************************************
/****************************************************************************
* Name: can_txdone
*
* Description:
@ -822,11 +843,11 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
* through can_write(). Interrupts are expected be disabled when called
* from the CAN interrupt handler.
*
************************************************************************************/
****************************************************************************/
int can_txdone(FAR struct can_dev_s *dev);
/************************************************************************************
/****************************************************************************
* Name: can_txready
*
* Description:
@ -855,8 +876,9 @@ int can_txdone(FAR struct can_dev_s *dev);
*
* If the CAN hardware supports a H/W FIFO, can_txdone() is not called
* when the transfer is complete, but rather when the transfer is queued in
* the H/W FIFO. When the H/W FIFO becomes full, then dev_txready() will
* report false and the number of queued messages in the S/W FIFO will grow.
* the H/W FIFO. When the H/W FIFO becomes full, then dev_txready()
* will report false and the number of queued messages in the
* S/W FIFO will grow.
*
* There is no mechanism in this case to inform the upper half driver when
* the hardware is again available, when there is again space in the H/W
@ -880,7 +902,7 @@ int can_txdone(FAR struct can_dev_s *dev);
* Interrupts are disabled. This function may execute in the context of
* and interrupt handler.
*
************************************************************************************/
****************************************************************************/
#ifdef CONFIG_CAN_TXREADY
int can_txready(FAR struct can_dev_s *dev);

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/input/mouse.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.
*
************************************************************************************/
****************************************************************************/
/* The mouse driver exports a standard character driver interface. By
* convention, the mouse driver is registered as an input device at
@ -30,15 +30,15 @@
#ifndef __INCLUDE_NUTTX_INPUT_MOUSE_H
#define __INCLUDE_NUTTX_INPUT_MOUSE_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* These definitions provide the meaning of all of the bits that may be
* reported in the struct mouse_report_s buttons.
@ -48,13 +48,13 @@
#define MOUSE_BUTTON_2 (1 << 1) /* True: Right mouse button pressed */
#define MOUSE_BUTTON_3 (1 << 2) /* True: Middle mouse button pressed */
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/* This structure contains information about the current mouse button states and
* mouse position. Positional units are device specific and determined by mouse
* configuration settings.
/* This structure contains information about the current mouse button states
* and mouse position. Positional units are device specific and determined
* by mouse configuration settings.
*/
struct mouse_report_s
@ -68,9 +68,9 @@ struct mouse_report_s
#endif
};
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -80,9 +80,9 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
#undef EXTERN
#ifdef __cplusplus

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/wireless/cellular/cellular.h
* Cellular network device commands
*
@ -17,14 +17,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_WIRELESS_CELLULAR_CELLULAR_H
#define __INCLUDE_NUTTX_WIRELESS_CELLULAR_CELLULAR_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@ -34,18 +34,18 @@
#include <net/if.h>
#include <nuttx/fs/ioctl.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* Sizing parameters */
#define IFCELLDEVPARAMSIZ 136 /* Big enough to store cellelur net paramters */
#define IFCELLDEVPARAMSIZ 136 /* Big enough to store cellular net paramters */
/* Network Driver IOCTL Commands ****************************************************/
/* Network Driver IOCTL Commands ********************************************/
/* Use of these IOCTL commands requires a socket descriptor created by the socket()
* interface.
/* Use of these IOCTL commands requires a socket descriptor created
* by the socket() interface.
*/
#define SIOCSCELLNETDEV _CELLIOC(0x0000) /* Set info in dev */
@ -56,9 +56,9 @@
#define ifr_cellinfo icellr_ifru.icellru_info;
#define ifr_celldata icellr_ifru.ioctl_param;
/************************************************************************************
/****************************************************************************
* Public Type Definitions
************************************************************************************/
****************************************************************************/
struct cellnetinfo_s
{

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/wireless/wireless.h
* Wireless network IOCTL commands
*
@ -17,18 +17,18 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
/* This file includes common definitions to be used in all wireless network drivers
* (when applicable).
/* This file includes common definitions to be used in all
* wireless network drivers (when applicable).
*/
#ifndef __INCLUDE_NUTTX_WIRELESS_WIRELESS_H
#define __INCLUDE_NUTTX_WIRELESS_WIRELESS_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@ -38,14 +38,14 @@
#include <net/if.h>
#include <nuttx/fs/ioctl.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* Network Driver IOCTL Commands ****************************************************/
/* Network Driver IOCTL Commands ********************************************/
/* Use of these IOCTL commands requires a socket descriptor created by the socket()
* interface.
/* Use of these IOCTL commands requires a socket descriptor created
* by the socket() interface.
*/
/* Wireless identification */
@ -185,7 +185,7 @@
(cmd) == SIOCGIWESSID || \
(cmd) == SIOCSIWESSID)
/* ------------------------------ WIRELESS EVENTS --------------------------------- */
/* --------------------------- WIRELESS EVENTS --------------------------- */
/* Those are *NOT* ioctls, do not issue request on them !!! */
@ -228,7 +228,7 @@
#define IWEVFIRST 0x8c00
#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
/* Other Common Wireless Definitions ************************************************/
/* Other Common Wireless Definitions ****************************************/
/* Maximum size of the ESSID and NICKN strings */
@ -404,21 +404,22 @@
#define IW_PTA_PRIORITY_WLAN_HIGH 3
#define IW_PTA_PRIORITY_WLAN_MAXIMIZED 4
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/* TODO:
*
* - Add struct iw_range for use with IOCTL commands that need exchange mode data
* that could not fit in iwreq.
* - Add struct iw_range for use with IOCTL commands that need exchange
* mode data that could not fit in iwreq.
* - Private IOCTL data support (struct iw_priv_arg)
* - Quality
* - WPA support.
* - Wireless events.
* - Various flag definitions.
*
* These future additions will all need to be compatible with BSD/Linux definitions.
* These future additions will all need to be compatible
* with BSD/Linux definitions.
*/
/* Generic format for most parameters that fit in a int32_t */
@ -431,8 +432,8 @@ struct iw_param
uint16_t flags; /* Optional flags */
};
/* Large data reference. For all data larger than 16 octets, we need to use a
* pointer to memory allocated in user space.
/* Large data reference. For all data larger than 16 octets,
* we need to use a pointer to memory allocated in user space.
*/
struct iw_point
@ -492,8 +493,8 @@ struct iw_missed
uint32_t beacon; /* Missed beacons/superframe */
};
/* This union defines the data payload of an ioctl, and is used in struct iwreq
* below.
/* This union defines the data payload of an ioctl
* and is used in struct iwreq below.
*/
union iwreq_data
@ -523,8 +524,9 @@ union iwreq_data
struct iw_point data; /* Other large parameters */
};
/* This is the structure used to exchange data in wireless IOCTLs. This structure
* is the same as 'struct ifreq', but defined for use with wireless IOCTLs.
/* This is the structure used to exchange data in wireless IOCTLs.
* This structure is the same as 'struct ifreq', but defined for
* use with wireless IOCTLs.
*/
struct iwreq

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/pthread.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_PTHREAD_H
#define __INCLUDE_PTHREAD_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <nuttx/config.h> /* Default settings */
#include <nuttx/compiler.h> /* Compiler settings, noreturn_function */
@ -50,9 +50,9 @@
# include <arch/spinlock.h>
#endif
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
/* Standard POSIX switches */
@ -71,25 +71,26 @@
/* Values for the mutext type attribute:
*
* PTHREAD_MUTEX_NORMAL: This type of mutex does not detect deadlock. A thread
* attempting to relock this mutex without first unlocking it will deadlock.
* Attempting to unlock a mutex locked by a different thread results in
* undefined behavior. Attempting to unlock an unlocked mutex results in
* undefined behavior.
* PTHREAD_MUTEX_NORMAL: This type of mutex does not detect deadlock.
* A thread attempting to relock this mutex without first unlocking
* it will deadlock. Attempting to unlock a mutex locked by a different
* thread results in undefined behavior. Attempting to unlock an unlocked
* mutex results in undefined behavior.
* PTHREAD_MUTEX_ERRORCHECK
* This type of mutex provides error checking. A thread attempting to relock
* this mutex without first unlocking it will return with an error. A thread
* attempting to unlock a mutex which another thread has locked will return
* with an error. A thread attempting to unlock an unlocked mutex will return
* with an error.
* This type of mutex provides error checking. A thread attempting
* to relock this mutex without first unlocking it will return with
* an error. A thread attempting to unlock a mutex which another thread
* has locked will return with an error. A thread attempting to unlock
* an unlocked mutex will return with an error.
* PTHREAD_MUTEX_RECURSIVE
* A thread attempting to relock this mutex without first unlocking it will
* succeed in locking the mutex. The relocking deadlock which can occur with
* mutexes of type PTHREAD_MUTEX_NORMAL cannot occur with this type of mutex.
* Multiple locks of this mutex require the same number of unlocks to release
* the mutex before another thread can acquire the mutex. A thread attempting
* to unlock a mutex which another thread has locked will return with an error.
* A thread attempting to unlock an unlocked mutex will return with an error.
* succeed in locking the mutex. The relocking deadlock which can occur
* with mutexes of type PTHREAD_MUTEX_NORMAL cannot occur with this type
* of mutex. Multiple locks of this mutex require the same number
* of unlocks to release the mutex before another thread can acquire
* the mutex. A thread attempting to unlock a mutex which another thread
* has locked will return with an error. A thread attempting to unlock
* an unlocked mutex will return with an error.
* PTHREAD_MUTEX_DEFAULT
* An implementation is allowed to map this mutex to one of the other mutex
* types.
@ -186,9 +187,9 @@
#define _PTHREAD_MFLAGS_INCONSISTENT (1 << 1) /* Mutex is in an inconsistent state */
#define _PTHREAD_MFLAGS_NRECOVERABLE (1 << 2) /* Inconsistent mutex has been unlocked */
/********************************************************************************
/****************************************************************************
* Public Type Definitions
********************************************************************************/
****************************************************************************/
#ifdef __cplusplus
extern "C"
@ -426,12 +427,12 @@ typedef CODE void (*pthread_cleanup_t)(FAR void *arg);
struct sched_param; /* Defined in sched.h */
/********************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************/
****************************************************************************/
/* Initializes a thread attributes object (attr) with default values for all of
* the individual attributes used by a given implementation.
/* Initializes a thread attributes object (attr) with default values
* for all of the individual attributes used by a given implementation.
*/
int pthread_attr_init(FAR pthread_attr_t *attr);
@ -443,7 +444,8 @@ int pthread_attr_destroy(FAR pthread_attr_t *attr);
/* Set or obtain the default scheduling algorithm */
int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy);
int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, FAR int *policy);
int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr,
FAR int *policy);
int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
FAR const struct sched_param *param);
int pthread_attr_getschedparam(FAR const pthread_attr_t *attr,
@ -537,7 +539,9 @@ void pthread_cleanup_push(pthread_cleanup_t routine, FAR void *arg);
int pthread_join(pthread_t thread, FAR pthread_addr_t *value);
/* A thread may tell the scheduler that its processor can be made available. */
/* A thread may tell the scheduler that its processor
* can be made available.
*/
void pthread_yield(void);
@ -725,22 +729,22 @@ int pthread_atfork(CODE void (*prepare)(void),
}
#endif
/********************************************************************************
/****************************************************************************
* Minimal Type Definitions
********************************************************************************/
****************************************************************************/
#else /* __INCLUDE_PTHREAD_H */
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <sys/types.h>
#include <stdbool.h>
/********************************************************************************
/****************************************************************************
* Public Type Definitions
********************************************************************************/
****************************************************************************/
/* Avoid circular dependencies by assuring that simple type definitions are
* available in any inclusion ordering.

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/sched.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_SCHED_H
#define __INCLUDE_SCHED_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@ -33,11 +33,11 @@
#include <strings.h>
#include <time.h>
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
/* Task Management Definitions **************************************************/
/* Task Management Definitions **********************************************/
/* POSIX-like scheduling policies */
@ -51,7 +51,7 @@
#define SS_REPL_MAX CONFIG_SCHED_SPORADIC_MAXREPL
/* Cancellation definitions *****************************************************/
/* Cancellation definitions *************************************************/
/* Cancellation states used by task_setcancelstate() */
@ -63,11 +63,11 @@
#define TASK_CANCEL_DEFERRED (0)
#define TASK_CANCEL_ASYNCHRONOUS (1)
/* Pthread definitions **********************************************************/
/* Pthread definitions ******************************************************/
#define PTHREAD_KEYS_MAX CONFIG_TLS_NELEM
/* CPU affinity mask helpers ****************************************************/
/* CPU affinity mask helpers ************************************************/
/* These are not standard but are defined for Linux compatibility */
@ -178,9 +178,9 @@
#endif /* CONFIG_SMP */
/********************************************************************************
/****************************************************************************
* Public Type Definitions
********************************************************************************/
****************************************************************************/
/* This is the POSIX-like scheduling parameter structure */
@ -199,9 +199,9 @@ struct sched_param
#endif
};
/********************************************************************************
/****************************************************************************
* Public Data
********************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
@ -213,9 +213,9 @@ extern "C"
#define EXTERN extern
#endif
/********************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************/
****************************************************************************/
/* Task Control Interfaces (non-standard) */

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/signal.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_SIGNAL_H
#define __INCLUDE_SIGNAL_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
@ -31,9 +31,9 @@
#include <stdint.h>
#include <time.h>
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
/* Signal set management definitions and macros. */
@ -170,7 +170,9 @@
#define SIGSYS 31
/* sigprocmask() "how" definitions. Only one of the following can be specified: */
/* sigprocmask() "how" definitions.
* Only one of the following can be specified:
*/
#define SIG_BLOCK 1 /* Block the given signals */
#define SIG_UNBLOCK 2 /* Unblock the given signals */
@ -236,9 +238,9 @@
#define tkill(tid, signo) tgkill((pid_t)-1, tid, signo)
/********************************************************************************
/****************************************************************************
* Public Types
********************************************************************************/
****************************************************************************/
/* This defines a set of 32 signals (numbered 0 through 31).
* REVISIT: Signal 0 is, however, not generally usable since that value has
@ -266,9 +268,9 @@ union sigval
FAR void *sival_ptr; /* Pointer value */
};
/* This structure contains elements that define a queue signal. The following is
* used to attach a signal to a message queue to notify a task when a message is
* available on a queue
/* This structure contains elements that define a queue signal.
* The following is used to attach a signal to a message queue
* to notify a task when a message is available on a queue.
*/
typedef CODE void (*sigev_notify_function_t)(union sigval value);
@ -336,9 +338,9 @@ struct sigaction
#define sa_handler sa_u._sa_handler
#define sa_sigaction sa_u._sa_sigaction
/********************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/sys/file.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_SYS_FILE_H
#define __INCLUDE_SYS_FILE_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <unistd.h>
#include <fcntl.h>

View File

@ -1,4 +1,4 @@
/********************************************************************************
/****************************************************************************
* include/time.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_TIME_H
#define __INCLUDE_TIME_H
/********************************************************************************
/****************************************************************************
* Included Files
********************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
@ -31,14 +31,14 @@
#include <sys/types.h>
#include <stdint.h>
/********************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************/
****************************************************************************/
/* Clock tick of the system (frequency Hz).
*
* NOTE: This symbolic name CLK_TCK has been removed from the standard. It is
* replaced with CLOCKS_PER_SEC. Both are defined here.
* NOTE: This symbolic name CLK_TCK has been removed from the standard.
* It is replaced with CLOCKS_PER_SEC. Both are defined here.
*
* The default value is 100Hz, but this default setting can be overridden by
* defining the clock interval in microseconds as CONFIG_USEC_PER_TICK in the
@ -102,9 +102,9 @@
#define timelocal mktime
#define strftime_l(s, m, f, t, l) strftime(s, m, f, t)
/********************************************************************************
/****************************************************************************
* Public Types
********************************************************************************/
****************************************************************************/
/* Scalar types */
@ -162,9 +162,9 @@ struct itimerspec
struct sigevent;
/********************************************************************************
/****************************************************************************
* Public Data
********************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
@ -192,9 +192,9 @@ extern "C"
EXTERN FAR char *tzname[2];
#endif
/********************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************/
****************************************************************************/
clock_t clock(void);