include :nuttx: nxstyle error fix

Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-01-28 14:28:18 +01:00 committed by Xiang Xiao
parent bd372724cc
commit fe4be428f5
12 changed files with 139 additions and 110 deletions

View File

@ -44,6 +44,7 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* All 7-bit ASCII codes */ /* All 7-bit ASCII codes */
#define ASCII_NUL 0x00 /* Null character (^@) */ #define ASCII_NUL 0x00 /* Null character (^@) */

View File

@ -1,8 +1,8 @@
/************************************************************************************ /****************************************************************************
* include/nuttx/can/can.h * include/nuttx/can/can.h
* *
* Copyright (C) 2008, 2009, 2011-2012, 2015-2017, 2019 Gregory Nutt. All rights * Copyright (C) 2008, 2009, 2011-2012, 2015-2017, 2019 Gregory Nutt.
* reserved. * All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -32,14 +32,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************************************/ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_CAN_CAN_H #ifndef __INCLUDE_NUTTX_CAN_CAN_H
#define __INCLUDE_NUTTX_CAN_CAN_H #define __INCLUDE_NUTTX_CAN_CAN_H
/************************************************************************************ /****************************************************************************
* Included Files * Included Files
************************************************************************************/ ****************************************************************************/
#ifdef CONFIG_CAN_TXREADY #ifdef CONFIG_CAN_TXREADY
# include <nuttx/wqueue.h> # include <nuttx/wqueue.h>
@ -49,19 +49,21 @@
#ifdef CONFIG_NET_CAN #ifdef CONFIG_NET_CAN
/************************************************************************************ /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************************/ ****************************************************************************/
/* Ioctl Commands *******************************************************************/ /* Ioctl Commands ***********************************************************/
/* Ioctl commands supported by the upper half CAN driver. /* Ioctl commands supported by the upper half CAN driver.
* *
* CANIOC_RTR: * CANIOC_RTR:
* Description: Send the remote transmission request and wait for the response. * Description: Send the remote transmission request and wait for the
* response.
* Argument: A reference to struct canioc_rtr_s * Argument: A reference to struct canioc_rtr_s
* *
* 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: * CANIOC_ADD_STDFILTER:
* Description: Add an address filter for a standard 11 bit address. * Description: Add an address filter for a standard 11 bit address.
@ -120,7 +122,8 @@
* CANIOC_GET_CONNMODES: * CANIOC_GET_CONNMODES:
* Description: Get the current bus connection modes * Description: Get the current bus connection modes
* Argument: A pointer to a write-able instance of struct * 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) * Returned Value: Zero (OK) is returned on success. Otherwise -1 (ERROR)
* is returned with the errno variable set to indicate the * is returned with the errno variable set to indicate the
* nature of the error. * nature of the error.
@ -129,7 +132,8 @@
* CANIOC_SET_CONNMODES: * CANIOC_SET_CONNMODES:
* Description: Set new bus connection modes values * Description: Set new bus connection modes values
* Argument: A pointer to a read-able instance of struct * 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) * Returned Value: Zero (OK) is returned on success. Otherwise -1 (ERROR)
* is returned with the errno variable set to indicate the * is returned with the errno variable set to indicate the
* nature of the error. * nature of the error.
@ -159,29 +163,30 @@
#define CAN_NCMDS 10 /* Ten common commands */ #define CAN_NCMDS 10 /* Ten common commands */
/* User defined ioctl commands are also supported. These will be forwarded /* 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() * by the upper-half CAN driver to the lower-half CAN driver via the
* method fo the CAN lower-half interface. However, the lower-half driver * co_ioctl() method fo the CAN lower-half interface.
* must reserve a block of commands as follows in order prevent IOCTL * However, the lower-half driver must reserve a block of commands as follows
* command numbers from overlapping. * in order prevent IOCTL command numbers from overlapping.
* *
* This is generally done as follows. The first reservation for CAN driver A would * This is generally done as follows. The first reservation for CAN driver A
* look like: * would look like:
* *
* CAN_A_FIRST (CAN_FIRST + CAN_NCMDS) <- First command * CAN_A_FIRST (CAN_FIRST + CAN_NCMDS) <- First command
* CAN_A_NCMDS 42 <- Number of commands * 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_CMD1 _CANIOC(CAN_A_FIRST+0)
* CANIOC_A_CMD2 _CANIOC(CAN_A_FIRST+1) * CANIOC_A_CMD2 _CANIOC(CAN_A_FIRST+1)
* CANIOC_A_CMD3 _CANIOC(CAN_A_FIRST+2) * 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: * The next reservation would look like:
* *
* CAN_B_FIRST (CAN_A_FIRST + CAN_A_NCMDS) <- Next command * CAN_B_FIRST (CAN_A_FIRST + CAN_A_NCMDS) <- Next command
* CAN_B_NCMDS 77 <- Number of commands * CAN_B_NCMDS 77 <- Number of commands
*/ */
/* CAN payload length and DLC definitions according to ISO 11898-1 */ /* CAN payload length and DLC definitions according to ISO 11898-1 */
@ -196,18 +201,20 @@
/* Defined bits for canfd_frame.flags /* Defined bits for canfd_frame.flags
* *
* The use of struct canfd_frame implies the Extended Data Length (EDL) bit to * The use of struct canfd_frame implies the Extended Data Length (EDL) bit
* be set in the CAN frame bitstream on the wire. The EDL bit switch turns * to be set in the CAN frame bitstream on the wire. The EDL bit switch turns
* the CAN controllers bitstream processor into the CAN FD mode which creates * the CAN controllers bitstream processor into the CAN FD mode which creates
* two new options within the CAN FD frame specification: * two new options within the CAN FD frame specification:
* *
* Bit Rate Switch - to indicate a second bitrate is/was used for the payload * Bit Rate Switch - to indicate a second bitrate is/was used for the payload
* Error State Indicator - represents the error state of the transmitting node * Error State Indicator - represents the error state of the transmitting
* node
* *
* As the CANFD_ESI bit is internally generated by the transmitting CAN * As the CANFD_ESI bit is internally generated by the transmitting CAN
* controller only the CANFD_BRS bit is relevant for real CAN controllers when * controller only the CANFD_BRS bit is relevant for real CAN controllers
* building a CAN FD frame for transmission. Setting the CANFD_ESI bit can make * when building a CAN FD frame for transmission. Setting the CANFD_ESI bit
* sense for virtual CAN interfaces to test applications with echoed frames. * can make sense for virtual CAN interfaces to test applications with echoed
* frames.
*/ */
#define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ #define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */
@ -215,9 +222,9 @@
#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */ #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
/************************************************************************************ /****************************************************************************
* Public Types * Public Types
************************************************************************************/ ****************************************************************************/
typedef FAR void *CAN_HANDLE; typedef FAR void *CAN_HANDLE;
@ -297,9 +304,9 @@ struct can_filter
canid_t can_mask; canid_t can_mask;
}; };
/************************************************************************************ /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
************************************************************************************/ ****************************************************************************/
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)

View File

@ -60,8 +60,8 @@
* mq_timedreceive() putmsg() sigsuspend() * mq_timedreceive() putmsg() sigsuspend()
* *
* Each of the above function must call enter_cancellation_point() on entry * Each of the above function must call enter_cancellation_point() on entry
* in order to establish the cancellation point and leave_cancellation_point() * in order to establish the cancellation point and
* on exit. These functions are described below. * leave_cancellation_point() on exit. These functions are described below.
* *
****************************************************************************/ ****************************************************************************/

View File

@ -48,6 +48,7 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Macros for testing which OS services are available at this phase of /* Macros for testing which OS services are available at this phase of
* initialization. * initialization.
*/ */
@ -111,6 +112,7 @@ EXTERN uint8_t g_nx_initstate; /* See enum nx_initstate_e */
int CONFIG_USER_ENTRYPOINT(int argc, char *argv[]); int CONFIG_USER_ENTRYPOINT(int argc, char *argv[]);
/* Functions contained in nx_task.c *****************************************/ /* Functions contained in nx_task.c *****************************************/
/* OS entry point called by boot logic */ /* OS entry point called by boot logic */
void nx_start(void) noreturn_function; void nx_start(void) noreturn_function;

View File

@ -43,7 +43,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions Definitions
****************************************************************************/ ****************************************************************************/
#undef EXTERN #undef EXTERN
@ -81,9 +81,9 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev);
* Input Parameters: * Input Parameters:
* minor - The MMC/SD minor device number. The MMC/SD device will be * minor - The MMC/SD minor device number. The MMC/SD device will be
* registered as /dev/mmcsdN where N is the minor number * registered as /dev/mmcsdN where N is the minor number
* slotno - The slot number to use. This is only meaningful for architectures * slotno - The slot number to use. This is only meaningful for
* that support multiple MMC/SD slots. This value must be in the range * architectures that support multiple MMC/SD slots. This value must be
* {0, ..., CONFIG_MMCSD_NSLOTS}. * in the range {0, ..., CONFIG_MMCSD_NSLOTS}.
* spi - And instance of an SPI interface obtained by called the * spi - And instance of an SPI interface obtained by called the
* appropriate xyz_spibus_initialize() function for the MCU "xyz" with * appropriate xyz_spibus_initialize() function for the MCU "xyz" with
* the appropriate port number. * the appropriate port number.
@ -91,7 +91,9 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev);
****************************************************************************/ ****************************************************************************/
struct spi_dev_s; /* See nuttx/spi/spi.h */ struct spi_dev_s; /* See nuttx/spi/spi.h */
int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi); int mmcsd_spislotinitialize(int minor,
int slotno,
FAR struct spi_dev_s *spi);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)

View File

@ -64,7 +64,8 @@ extern "C"
* Verify that the file is an ELF module binary and, if so, load the * Verify that the file is an ELF module binary and, if so, load the
* module into kernel memory and initialize it for use. * module into kernel memory and initialize it for use.
* *
* NOTE: modlib_setsymtab had to have been called in board-specific OS logic * NOTE:
* modlib_setsymtab had to have been called in board-specific OS logic
* prior to calling this function from application logic (perhaps via * prior to calling this function from application logic (perhaps via
* boardctl(BOARDIOC_OS_SYMTAB). Otherwise, insmod will be unable to * boardctl(BOARDIOC_OS_SYMTAB). Otherwise, insmod will be unable to
* resolve symbols in the OS module. * resolve symbols in the OS module.

View File

@ -55,6 +55,7 @@
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* CONFIG_PAGING_PAGESIZE - The size of one managed page. This must be a /* CONFIG_PAGING_PAGESIZE - The size of one managed page. This must be a
* value supported by the processor's memory management unit. The * value supported by the processor's memory management unit. The
* following may need to be extended to support additional page sizes at * following may need to be extended to support additional page sizes at
@ -96,9 +97,9 @@
* from the beginning of this region for vectors or for a page table. * from the beginning of this region for vectors or for a page table.
* In such cases, either (1) CONFIG_PAGING_LOCKED_P/VBASE might take that * In such cases, either (1) CONFIG_PAGING_LOCKED_P/VBASE might take that
* into consideration to prevent overlapping the locked memory region * into consideration to prevent overlapping the locked memory region
* and the system data at the beginning of SRAM, (2) you extend CONFIG_PAGING_NLOCKED * and the system data at the beginning of SRAM, (2) you extend
* include these pages at the beginning of memory and map let them be * CONFIG_PAGING_NLOCKED include these pages at the beginning
* mapped read-only. * of memory and map let them be mapped read-only.
*/ */
#if defined(CONFIG_PAGING_LOCKED_PBASE) && defined(CONFIG_PAGING_LOCKED_VBASE) #if defined(CONFIG_PAGING_LOCKED_PBASE) && defined(CONFIG_PAGING_LOCKED_VBASE)
@ -117,13 +118,13 @@
#endif #endif
/* CONFIG_PAGING_NPPAGED - This is the number of physical pages available to /* CONFIG_PAGING_NPPAGED - This is the number of physical pages available to
* support the paged text region. * support the paged text region.
* CONFIG_PAGING_NVPAGED - This actual size of the virtual paged text region (in * CONFIG_PAGING_NVPAGED - This actual size of the virtual paged text region
* pages). This is also the number of virtual pages required to span * (in pages). This is also the number of virtual pages required to span
* the entire paged region. The on-demand paging feature is intended to * the entire paged region. The on-demand paging feature is intended to
* support only the case where the virtual paged text area is much larger * support only the case where the virtual paged text area is much larger
* the available physical pages. Otherwise, why would you enable on-demand * the available physical pages. Otherwise, why would you enable on-demand
* paging? * paging?
*/ */
#if CONFIG_PAGING_NPPAGED >= CONFIG_PAGING_NVPAGED #if CONFIG_PAGING_NPPAGED >= CONFIG_PAGING_NVPAGED
@ -201,22 +202,22 @@
#endif #endif
/* CONFIG_PAGING_DEFPRIO - The default, minimum priority of the page fill /* CONFIG_PAGING_DEFPRIO - The default, minimum priority of the page fill
* worker thread. The priority of the page fill work thread will be boosted * worker thread. The priority of the page fill work thread will be
* boosted dynamically so that it matches the priority of the task on behalf * boosted boosted dynamically so that it matches the priority of the
* of which it performs the fill. This defines the minimum priority that * task on behalf of which it performs the fill. This defines the
* will be used. Default: 50. * minimum priority that will be used. Default: 50.
* CONFIG_PAGING_STACKSIZE - Defines the size of the allocated stack * CONFIG_PAGING_STACKSIZE - Defines the size of the allocated stack
* for the page fill worker thread. Default: 1024. * for the page fill worker thread. Default: 1024.
* CONFIG_PAGING_BLOCKINGFILL - The architecture specific up_fillpage() * CONFIG_PAGING_BLOCKINGFILL - The architecture specific up_fillpage()
* function may be blocking or non-blocking. If defined, this setting * function may be blocking or non-blocking. If defined, this setting
* indicates that the up_fillpage() implementation will block until the * indicates that the up_fillpage() implementation will block until
* transfer is completed. Default: Undefined (non-blocking). * the transfer is completed. Default: Undefined (non-blocking).
* CONFIG_PAGING_WORKPERIOD - The page fill worker thread will wake periodically * CONFIG_PAGING_WORKPERIOD - The page fill worker thread will wake
* even if there is no mapping to do. This selection controls that wake-up * periodically even if there is no mapping to do. This selection controls
* period (in microseconds). This wake-up a failsafe that will handle any * that wake-up period (in microseconds). This wake-up a failsafe that
* cases where a single is lost (that would really be a bug and shouldn't * will handle any cases where a single is lost (that would really be a bug
* happen!) and also supports timeouts for case of non-blocking, asynchronous * and shouldn't happen!) and also supports timeouts for case of
* fills (see CONFIG_PAGING_TIMEOUT_TICKS). * non-blocking, asynchronous fills (see CONFIG_PAGING_TIMEOUT_TICKS).
* CONFIG_PAGING_TIMEOUT_TICKS - If defined, the implementation will monitor * CONFIG_PAGING_TIMEOUT_TICKS - If defined, the implementation will monitor
* the (asynchronous) page fill logic. If the fill takes longer than this * the (asynchronous) page fill logic. If the fill takes longer than this
* number if microseconds, then a fatal error will be declared. * number if microseconds, then a fatal error will be declared.
@ -329,9 +330,9 @@ void pg_miss(void);
* tcb - A reference to the task control block of the task that we believe * tcb - A reference to the task control block of the task that we believe
* needs to have a page fill. Architecture-specific logic can * needs to have a page fill. Architecture-specific logic can
* retrieve page fault information from the architecture-specific * retrieve page fault information from the architecture-specific
* context information in this TCB and can consult processor resources * context information in this TCB and can consult processor
* (page tables or TLBs or ???) to determine if the fill still needs * resources (page tables or TLBs or ???) to determine if the fill
* to be performed or not. * still needs to be performed or not.
* *
* Returned Value: * Returned Value:
* This function will return true if the mapping is in place and false * This function will return true if the mapping is in place and false
@ -368,11 +369,12 @@ bool up_checkmapping(FAR struct tcb_s *tcb);
* NOTE 2: If an in-use page is un-mapped, it may be necessary to flush the * NOTE 2: If an in-use page is un-mapped, it may be necessary to flush the
* instruction cache in some architectures. * instruction cache in some architectures.
* *
* NOTE 3: Allocating and filling a page is a two step process. up_allocpage() * NOTE 3: Allocating and filling a page is a two step process.
* allocates the page, and up_fillpage() fills it with data from some non- * up_allocpage() allocates the page, and up_fillpage() fills it with data
* volatile storage device. This distinction is made because up_allocpage() * from some non- volatile storage device. This distinction is made because
* can probably be implemented in board-independent logic whereas up_fillpage() * up_allocpage() can probably be implemented in board-independent logic
* probably must be implemented as board-specific logic. * whereas up_fillpage() probably must be implemented as board-specific
* logic.
* *
* NOTE 4: The initial mapping of vpage should be read-able and write- * NOTE 4: The initial mapping of vpage should be read-able and write-
* able (but not cached). No special actions will be required of * able (but not cached). No special actions will be required of
@ -412,11 +414,12 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage);
* This callback is assumed to occur from an interrupt level when the * This callback is assumed to occur from an interrupt level when the
* device driver completes the fill operation. * device driver completes the fill operation.
* *
* NOTE 1: Allocating and filling a page is a two step process. up_allocpage() * NOTE 1: Allocating and filling a page is a two step process.
* allocates the page, and up_fillpage() fills it with data from some non- * up_allocpage() allocates the page, and up_fillpage() fills it with data
* volatile storage device. This distinction is made because up_allocpage() * from some non- volatile storage device. This distinction is made because
* can probably be implemented in board-independent logic whereas up_fillpage() * up_allocpage() can probably be implemented in board-independent logic
* probably must be implemented as board-specific logic. * whereas up_fillpage() probably must be implemented as board-specific
* logic.
* *
* NOTE 2: The initial mapping of vpage will be read-able, write-able, * NOTE 2: The initial mapping of vpage will be read-able, write-able,
* but non-cacheable. No special actions will be required of * but non-cacheable. No special actions will be required of
@ -445,7 +448,8 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage);
* Assumptions: * Assumptions:
* - This function is called from the normal tasking context (but * - This function is called from the normal tasking context (but
* interrupts siabled). The implementation must take whatever actions * interrupts siabled). The implementation must take whatever actions
* are necessary to assure that the operation is safe within this context. * are necessary to assure that the operation is safe within this
* context.
* - Upon return, the caller will sleep waiting for the page fill callback * - Upon return, the caller will sleep waiting for the page fill callback
* to occur. The callback function will perform the wakeup. * to occur. The callback function will perform the wakeup.
* *

View File

@ -51,7 +51,9 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* CONFIG_MM_PGALLOC - Enable page allocator support /* CONFIG_MM_PGALLOC - Enable page allocator support
* CONFIG_MM_PGSIZE - The page size. Must be one of {1024, 2048, * CONFIG_MM_PGSIZE - The page size. Must be one of {1024, 2048,
* 4096, 8192, or 16384}. This is easily extensible, but only those * 4096, 8192, or 16384}. This is easily extensible, but only those

View File

@ -61,7 +61,7 @@ extern "C"
#endif #endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
@ -78,7 +78,7 @@ size_t up_progmem_neraseblocks(void);
* Name: up_progmem_isuniform * Name: up_progmem_isuniform
* *
* Description: * Description:
* Is program memory uniform or erase page and read/write page size differs? * Is program memory uniform or erase page and read/write page size differs?
* *
****************************************************************************/ ****************************************************************************/
@ -98,7 +98,7 @@ size_t up_progmem_pagesize(size_t page);
* Name: up_progmem_erasesize * Name: up_progmem_erasesize
* *
* Description: * Description:
* Return erase block size. Must be a multiple of the read/write page size. * Return erase block size. Must be a multiple of the read/write page size.
* *
****************************************************************************/ ****************************************************************************/
@ -111,11 +111,12 @@ size_t up_progmem_erasesize(size_t block);
* Address to read/write page conversion * Address to read/write page conversion
* *
* Input Parameters: * Input Parameters:
* addr - Address with or without flash offset (absolute or aligned to page0) * addr - Address with or without flash offset
* (absolute or aligned to page0)
* *
* Returned Value: * Returned Value:
* Page or negative value on error. The following errors are reported * Page or negative value on error.
* (errno is not set!): * The following errors are reported (errno is not set!):
* *
* -EFAULT: On invalid address * -EFAULT: On invalid address
* *
@ -149,8 +150,8 @@ size_t up_progmem_getaddress(size_t page);
* block - The erase block index to be erased. * block - The erase block index to be erased.
* *
* Returned Value: * Returned Value:
* block size or negative value on error. The following errors are reported * block size or negative value on error.
* (errno is not set!): * The following errors are reported (errno is not set!):
* *
* -EFAULT: On invalid page * -EFAULT: On invalid page
* -EIO: On unsuccessful erase * -EIO: On unsuccessful erase
@ -193,7 +194,8 @@ ssize_t up_progmem_ispageerased(size_t page);
* the address be aligned inside the page boundaries. * the address be aligned inside the page boundaries.
* *
* Input Parameters: * Input Parameters:
* addr - Address with or without flash offset (absolute or aligned to page0) * addr - Address with or without flash offset
* (absolute or aligned to page0)
* buf - Pointer to buffer * buf - Pointer to buffer
* count - Number of bytes to write * count - Number of bytes to write
* *

View File

@ -327,7 +327,7 @@
/* Illegal Request KCQ values */ /* Illegal Request KCQ values */
#define SCSI_KCQIR_PARMLISTLENGTHERROR 0x051a00 /* Illegal Request - parm list length error */ #define SCSI_KCQIR_PARMLISTLENGTHERROR 0x051a00 /* Illegal Request - parm list length error */
#define SCSI_KCQIR_INVALIDCOMMAND 0x052000 /* Illegal Request - invalid/unsupported command code */ #define SCSI_KCQIR_INVALIDCOMMAND 0x052000 /* Illegal Request - invalid/unsupported command code */
#define SCSI_KCQIR_LBAOUTOFRANGE 0x052100 /* Illegal Request - LBA out of range */ #define SCSI_KCQIR_LBAOUTOFRANGE 0x052100 /* Illegal Request - LBA out of range */
#define SCSI_KCQIR_INVALIDFIELDINCBA 0x052400 /* Illegal Request - invalid field in CDB (Command Descriptor Block) */ #define SCSI_KCQIR_INVALIDFIELDINCBA 0x052400 /* Illegal Request - invalid field in CDB (Command Descriptor Block) */
#define SCSI_KCQIR_INVALIDLUN 0x052500 /* Illegal Request - invalid LUN */ #define SCSI_KCQIR_INVALIDLUN 0x052500 /* Illegal Request - invalid LUN */
@ -475,6 +475,7 @@
#define SCSIRESP_INQUIRYFLAGS6_IUS 0x01 /* Bit 0: IUS */ #define SCSIRESP_INQUIRYFLAGS6_IUS 0x01 /* Bit 0: IUS */
/* Sense data */ /* Sense data */
/* Sense data response codes */ /* Sense data response codes */
#define SCSIRESP_SENSEDATA_CURRENTFIXED 0x70 /* Byte 1 is always the response code */ #define SCSIRESP_SENSEDATA_CURRENTFIXED 0x70 /* Byte 1 is always the response code */
@ -705,7 +706,7 @@ struct scsiresp_inquiry_s
uint8_t version7[2]; /* 70-71: Version Descriptor 7 */ uint8_t version7[2]; /* 70-71: Version Descriptor 7 */
uint8_t version8[2]; /* 72-73: Version Descriptor 8 */ uint8_t version8[2]; /* 72-73: Version Descriptor 8 */
uint8_t reserved2[22]; /* 74-95: Reserved */ uint8_t reserved2[22]; /* 74-95: Reserved */
/* 96-: Vendor-specific parameters may follow */ /* 96-: Vendor-specific parameters may follow */
}; };
#define SCSIRESP_INQUIRY_SIZEOF 36 /* Minimum size */ #define SCSIRESP_INQUIRY_SIZEOF 36 /* Minimum size */
@ -787,7 +788,7 @@ struct scsicmd_read6_s
uint8_t opcode; /* 0: 0x08 */ uint8_t opcode; /* 0: 0x08 */
uint8_t mslba; /* 1: Bits 5-7: reserved; Bits 0-6: MS Logical Block Address (LBA) */ uint8_t mslba; /* 1: Bits 5-7: reserved; Bits 0-6: MS Logical Block Address (LBA) */
uint8_t lslba[2]; /* 2-3: LS Logical Block Address (LBA) */ uint8_t lslba[2]; /* 2-3: LS Logical Block Address (LBA) */
uint8_t xfrlen; /* 4: Transfer length (in contiguous logical blocks)*/ uint8_t xfrlen; /* 4: Transfer length (in contiguous logical blocks) */
uint8_t control; /* 5: Control */ uint8_t control; /* 5: Control */
}; };
#define SCSICMD_READ6_SIZEOF 6 #define SCSICMD_READ6_SIZEOF 6
@ -994,7 +995,7 @@ struct scsicmd_verify12_s
#define SCSICMD_VERIFY12_SIZEOF 12 #define SCSICMD_VERIFY12_SIZEOF 12
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions Definitions
****************************************************************************/ ****************************************************************************/
#undef EXTERN #undef EXTERN

View File

@ -51,7 +51,7 @@
****************************************************************************/ ****************************************************************************/
/* struct symbtab_s describes one entry in the symbol table. A symbol table /* struct symbtab_s describes one entry in the symbol table. A symbol table
* is a fixed size array of struct symtab_s. The information is intentionally * is a fixed size array of struct symtab_s. The information is intentionally
* minimal and supports only: * minimal and supports only:
* *
* 1. Function pointers as sym_values. Of other kinds of values need to be * 1. Function pointers as sym_values. Of other kinds of values need to be
@ -71,7 +71,7 @@ struct symtab_s
}; };
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions Definitions
****************************************************************************/ ****************************************************************************/
#undef EXTERN #undef EXTERN
@ -123,9 +123,9 @@ symtab_findorderedbyname(FAR const struct symtab_s *symtab,
* *
* Description: * Description:
* Find the symbol in the symbol table whose value closest (but not greater * Find the symbol in the symbol table whose value closest (but not greater
* than), the provided value. This version assumes that table is not ordered * than), the provided value. This version assumes that table is not
* with respect to symbol name and, hence, access time will be linear with * ordered with respect to symbol name and, hence, access time will be
* respect to nsyms. * linear with respect to nsyms.
* *
* Returned Value: * Returned Value:
* A reference to the symbol table entry if an entry with the matching * A reference to the symbol table entry if an entry with the matching

View File

@ -1,4 +1,4 @@
/******************************************************************************************** /****************************************************************************
* include/nuttx/vt100.h * include/nuttx/vt100.h
* VT100 Escape Sequences * VT100 Escape Sequences
* *
@ -32,20 +32,20 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
********************************************************************************************/ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_VT100_H #ifndef __INCLUDE_NUTTX_VT100_H
#define __INCLUDE_NUTTX_VT100_H #define __INCLUDE_NUTTX_VT100_H
/******************************************************************************************** /****************************************************************************
* Included Files * Included Files
********************************************************************************************/ ****************************************************************************/
#include <nuttx/ascii.h> #include <nuttx/ascii.h>
/******************************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
********************************************************************************************/ ****************************************************************************/
#define VT100_SETNL {ASCII_ESC, '[', '2', '0', 'h'} /* Set new line mode */ #define VT100_SETNL {ASCII_ESC, '[', '2', '0', 'h'} /* Set new line mode */
#define VT100_SETAPPL {ASCII_ESC, '[', '?', '1', 'h'} /* Set cursor key to application */ #define VT100_SETAPPL {ASCII_ESC, '[', '?', '1', 'h'} /* Set cursor key to application */
@ -129,11 +129,14 @@
#define VT100_CURSORLF(n) {ASCII_ESC, '[', (n), 'D'} /* Move cursor left n lines */ #define VT100_CURSORLF(n) {ASCII_ESC, '[', (n), 'D'} /* Move cursor left n lines */
#define VT100_CURSORHOME {ASCII_ESC, '[', 'H'} /* Move cursor to upper left corner */ #define VT100_CURSORHOME {ASCII_ESC, '[', 'H'} /* Move cursor to upper left corner */
#define VT100_CURSORHOME_ {ASCII_ESC, '[', ';', 'H'} /* Move cursor to upper left corner */ #define VT100_CURSORHOME_ {ASCII_ESC, '[', ';', 'H'} /* Move cursor to upper left corner */
#define VT100_CURSORPOS(v,h) {ASCII_ESC, '[', (v), ';', (h), 'H'} /* Move cursor to screen location v,h */ #define VT100_CURSORPOS(v,h) {ASCII_ESC, '[', (v), ';', (h), 'H'} /* Move cursor to screen location v,h */
#define VT100_HVHOME {ASCII_ESC, '[', 'f'} /* Move cursor to upper left corner */ #define VT100_HVHOME {ASCII_ESC, '[', 'f'} /* Move cursor to upper left corner */
#define VT100_HVHOME_ {ASCII_ESC, '[', ';', 'f'} /* Move cursor to upper left corner */ #define VT100_HVHOME_ {ASCII_ESC, '[', ';', 'f'} /* Move cursor to upper left corner */
#define VT100_HVPOS(v,h) {ASCII_ESC, '[', (v), ';', (h), 'f'} /* Move cursor to screen location v,h */ #define VT100_HVPOS(v,h) {ASCII_ESC, '[', (v), ';', (h), 'f'} /* Move cursor to screen location v,h */
#define VT100_INDEX {ASCII_ESC, 'D'} /* Move/scroll window up one line */ #define VT100_INDEX {ASCII_ESC, 'D'} /* Move/scroll window up one line */
#define VT100_REVINDEX {ASCII_ESC, 'M'} /* Move/scroll window down one line */ #define VT100_REVINDEX {ASCII_ESC, 'M'} /* Move/scroll window down one line */
#define VT100_NEXTLINE {ASCII_ESC, 'E'} /* Move to next line */ #define VT100_NEXTLINE {ASCII_ESC, 'E'} /* Move to next line */
@ -165,18 +168,22 @@
#define VT100_TERMNOK {ASCII_ESC, '[', '3', 'n'} /* Response: terminal is not OK */ #define VT100_TERMNOK {ASCII_ESC, '[', '3', 'n'} /* Response: terminal is not OK */
#define VT100_GETCURSOR {ASCII_ESC, '[', '6', 'n'} /* Get cursor position */ #define VT100_GETCURSOR {ASCII_ESC, '[', '6', 'n'} /* Get cursor position */
#define VT100_CURSORPOSAT {ASCII_ESC, '[', (v), ';', (h), 'R'} /* Response: cursor is at v,h */ #define VT100_CURSORPOSAT {ASCII_ESC, '[', (v), ';', (h), 'R'} /* Response: cursor is at v,h */
#define VT100_IDENT {ASCII_ESC, '[', 'c'} /* Identify what terminal type */ #define VT100_IDENT {ASCII_ESC, '[', 'c'} /* Identify what terminal type */
#define VT100_IDENT_ {ASCII_ESC, '[', '0', 'c'} /* Identify what terminal type */ #define VT100_IDENT_ {ASCII_ESC, '[', '0', 'c'} /* Identify what terminal type */
#define VT100_GETTYPE {ASCII_ESC, '[', '?', '1', ';', (n), '0', 'c'} /* Response: terminal type code n */ #define VT100_GETTYPE {ASCII_ESC, '[', '?', '1', ';', (n), '0', 'c'} /* Response: terminal type code n */
#define VT100_RESET RIS {ASCII_ESC, 'c'} /* Reset terminal to initial state */ #define VT100_RESET RIS {ASCII_ESC, 'c'} /* Reset terminal to initial state */
#define VT100_ALIGN {ASCII_ESC, '#', '8'} /* Screen alignment display */ #define VT100_ALIGN {ASCII_ESC, '#', '8'} /* Screen alignment display */
#define VT100_TESTPU {ASCII_ESC, '[', '2', ';', '1', 'y'} /* Confidence power up test */ #define VT100_TESTPU {ASCII_ESC, '[', '2', ';', '1', 'y'} /* Confidence power up test */
#define VT100_TESTLB {ASCII_ESC, '[', '2', ';', '2', 'y'} /* Confidence loopback test */ #define VT100_TESTLB {ASCII_ESC, '[', '2', ';', '2', 'y'} /* Confidence loopback test */
#define VT100_TESTPUREP {ASCII_ESC, '[', '2', ';', '9', 'y'} /* Repeat power up test */ #define VT100_TESTPUREP {ASCII_ESC, '[', '2', ';', '9', 'y'} /* Repeat power up test */
#define VT100_TESTLBREP {ASCII_ESC, '[', '2', ';', '1', '0', 'y'} /* Repeat loopback test */ #define VT100_TESTLBREP {ASCII_ESC, '[', '2', ';', '1', '0', 'y'} /* Repeat loopback test */
#define VT100_LEDSOFF {ASCII_ESC, '[', '0', 'q'} /* Turn off all four leds */ #define VT100_LEDSOFF {ASCII_ESC, '[', '0', 'q'} /* Turn off all four leds */
@ -288,12 +295,12 @@
#define VT100_NUMERIC_ENTER {ASCII_CR} #define VT100_NUMERIC_ENTER {ASCII_CR}
#define VT100_ALT_ENTER {ASCII_ESC, 'O', 'M'} #define VT100_ALT_ENTER {ASCII_ESC, 'O', 'M'}
/******************************************************************************************** /****************************************************************************
* Public Data * Public Data
********************************************************************************************/ ****************************************************************************/
/******************************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
********************************************************************************************/ ****************************************************************************/
#endif /* __INCLUDE_NUTTX_VT100_H */ #endif /* __INCLUDE_NUTTX_VT100_H */