mirror of
https://github.com/apache/nuttx.git
synced 2026-09-15 07:01:05 +00:00
Merge remote-tracking branch 'origin/master' into composite
This commit is contained in:
commit
a4cd90d4ef
72 changed files with 7190 additions and 297 deletions
|
|
@ -250,7 +250,9 @@
|
|||
|
||||
/* GCC supports both types double and long long */
|
||||
|
||||
#ifndef __clang__
|
||||
# define CONFIG_HAVE_LONG_LONG 1
|
||||
#endif
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_HAVE_DOUBLE 1
|
||||
# define CONFIG_HAVE_LONG_DOUBLE 1
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
/************************************************************************************
|
||||
* include/nuttx/input/keypad.h
|
||||
*
|
||||
* Copyright (C) 2012 Denis Carikli.
|
||||
* Author: Denis Carikli <GNUtoo@no-log.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_INPUT_KEYPAD_H
|
||||
#define __INCLUDE_NUTTX_INPUT_KEYPAD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
int keypad_kbdinit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_INPUT_KEYPAD_H */
|
||||
|
||||
|
|
@ -99,7 +99,26 @@
|
|||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The ICMP and IP headers */
|
||||
struct icmp_hdr_s
|
||||
{
|
||||
/* ICMP header */
|
||||
|
||||
uint8_t type; /* Defines the format of the ICMP message */
|
||||
uint8_t icode; /* Further qualifies the ICMP messsage */
|
||||
uint16_t icmpchksum; /* Checksum of ICMP header and data */
|
||||
|
||||
/* All ICMP packets have an 8-byte header and variable-sized data section.
|
||||
* The first 4 bytes of the header have fixed format, while the last 4 bytes
|
||||
* depend on the type/code of that ICMP packet.
|
||||
*/
|
||||
|
||||
/* ICMP_ECHO_REQUEST and ICMP_ECHO_REPLY data */
|
||||
|
||||
uint16_t id; /* Used to match requests with replies */
|
||||
uint16_t seqno; /* " " "" " " " " " " " " */
|
||||
};
|
||||
|
||||
/* The ICMP and IPv4 headers */
|
||||
|
||||
struct icmp_iphdr_s
|
||||
{
|
||||
|
|
@ -122,8 +141,9 @@ struct icmp_iphdr_s
|
|||
uint8_t icode; /* Further qualifies the ICMP messsage */
|
||||
uint16_t icmpchksum; /* Checksum of ICMP header and data */
|
||||
|
||||
/* Data following the ICMP header contains the data specific to the
|
||||
* message type indicated by the Type and Code fields.
|
||||
/* All ICMP packets have an 8-byte header and variable-sized data section.
|
||||
* The first 4 bytes of the header have fixed format, while the last 4 bytes
|
||||
* depend on the type/code of that ICMP packet.
|
||||
*/
|
||||
|
||||
/* ICMP_ECHO_REQUEST and ICMP_ECHO_REPLY data */
|
||||
|
|
|
|||
|
|
@ -127,7 +127,20 @@
|
|||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The ICMP and IP headers */
|
||||
/* The ICMPv6 header */
|
||||
|
||||
struct icmpv6_hdr_s
|
||||
{
|
||||
uint8_t type; /* Defines the format of the ICMP message */
|
||||
uint8_t code; /* Further qualifies the ICMP messages */
|
||||
uint16_t chksum; /* Checksum of ICMP header and data */
|
||||
|
||||
/* Data following the ICMP header contains the data specific to the
|
||||
* message type indicated by the Type and Code fields.
|
||||
*/
|
||||
};
|
||||
|
||||
/* The ICMPv6 and IPv6 headers */
|
||||
|
||||
struct icmpv6_iphdr_s
|
||||
{
|
||||
|
|
|
|||
|
|
@ -137,11 +137,6 @@ struct socketlist
|
|||
};
|
||||
#endif
|
||||
|
||||
/* Callback from netdev_foreach() */
|
||||
|
||||
struct net_driver_s; /* Forward reference. Defined in nuttx/net/netdev.h */
|
||||
typedef int (*netdev_callback_t)(FAR struct net_driver_s *dev, FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
|
@ -1177,6 +1172,7 @@ int net_vfcntl(int sockfd, int cmd, va_list ap);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct net_driver_s; /* Forward reference */
|
||||
int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype);
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -1199,28 +1195,6 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype);
|
|||
|
||||
int netdev_unregister(FAR struct net_driver_s *dev);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_foreach
|
||||
*
|
||||
* Description:
|
||||
* Enumerate each registered network device.
|
||||
*
|
||||
* NOTE: netdev semaphore held throughout enumeration.
|
||||
*
|
||||
* Parameters:
|
||||
* callback - Will be called for each registered device
|
||||
* arg - User argument passed to callback()
|
||||
*
|
||||
* Returned Value:
|
||||
* 0:Enumeration completed 1:Enumeration terminated early by callback
|
||||
*
|
||||
* Assumptions:
|
||||
* Called from normal user mode
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int netdev_foreach(netdev_callback_t callback, FAR void *arg);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,9 +95,16 @@
|
|||
# define TCP_STOPPED 0x10 /* Bit 4: stopped */
|
||||
/* Bit 5-7: Unused, but not available */
|
||||
|
||||
/* TCP header sizes */
|
||||
/* TCP header sizes
|
||||
*
|
||||
* The minimum size header is 5 words and the maximum is 15 words thus
|
||||
* giving the minimum size of 20 bytes and maximum of 60 bytes, allowing for
|
||||
* up to 40 bytes of options in the header.
|
||||
*/
|
||||
|
||||
#define TCP_HDRLEN 20 /* Size of TCP header */
|
||||
#define TCP_HDRLEN 20 /* Size of TCP header (minimum) */
|
||||
#define TCP_OPT_HDRLEN(n) (20 + ((n) << 2)) /* Size of TCP header w/options */
|
||||
#define TCP_MAX_HDRLEN 60 /* Maximum size of TCP header */
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
# define IPv4TCP_HDRLEN (TCP_HDRLEN + IPv4_HDRLEN) /* Size of IPv4 + TCP header */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue