You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/06/15 18:20:43 UTC

[incubator-nuttx] branch master updated (5e6d994 -> 4a72bcc)

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 5e6d994  net/socket/getsockopt.c:  Eliminate warning
     new 155903f  net/can/can.h: Add can_setsockopt and can_getsockopt prototypes.
     new c8d83e0  net/can/can_setsockopt&can_getsockopt.c: Initialiaze ret variable to eliminate any warning.
     new 4a72bcc  boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig: Refresh the config.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../rddrone-uavcan146/configs/nsh/defconfig        | 44 ++++++---------
 net/can/can.h                                      | 63 ++++++++++++++++++++++
 net/can/can_getsockopt.c                           |  2 +-
 net/can/can_setsockopt.c                           |  2 +-
 net/socket/getsockopt.c                            |  1 +
 net/socket/setsockopt.c                            |  1 +
 6 files changed, 82 insertions(+), 31 deletions(-)


[incubator-nuttx] 03/03: boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig: Refresh the config.

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4a72bcc488b344bec711b46af2a90e72278b1a28
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Mon Jun 15 19:40:54 2020 +0100

    boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig: Refresh the
    config.
---
 .../rddrone-uavcan146/configs/nsh/defconfig        | 44 ++++++++--------------
 1 file changed, 15 insertions(+), 29 deletions(-)

diff --git a/boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig b/boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig
index ef17982..d3eb25c 100644
--- a/boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig
+++ b/boards/arm/s32k1xx/rddrone-uavcan146/configs/nsh/defconfig
@@ -6,6 +6,8 @@
 # modifications.
 #
 # CONFIG_ARCH_FPU is not set
+# CONFIG_NET_ETHERNET is not set
+# CONFIG_NET_IPv4 is not set
 # CONFIG_NSH_ARGCAT is not set
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 # CONFIG_NSH_CMDPARMS is not set
@@ -37,6 +39,11 @@ CONFIG_LPUART1_TXBUFSIZE=64
 CONFIG_MAX_TASKS=16
 CONFIG_MAX_WDOGPARMS=2
 CONFIG_MOTOROLA_SREC=y
+CONFIG_NET=y
+CONFIG_NETDEV_IFINDEX=y
+CONFIG_NET_CAN=y
+CONFIG_NET_CAN_SOCK_OPTS=y
+CONFIG_NET_TIMESTAMP=y
 CONFIG_NFILE_DESCRIPTORS=8
 CONFIG_NFILE_STREAMS=8
 CONFIG_NSH_ARCHINIT=y
@@ -50,12 +57,20 @@ CONFIG_RAM_SIZE=126976
 CONFIG_RAM_START=0x1fff0000
 CONFIG_RAW_BINARY=y
 CONFIG_RR_INTERVAL=200
+CONFIG_RTC=y
+CONFIG_RTC_FREQUENCY=32768
+CONFIG_RTC_HIRES=y
+CONFIG_S32K1XX_FLEXCAN0=y
+CONFIG_S32K1XX_FLEXCAN1=y
 CONFIG_S32K1XX_LPI2C0=y
 CONFIG_S32K1XX_LPSPI0=y
 CONFIG_S32K1XX_LPUART0=y
 CONFIG_S32K1XX_LPUART1=y
+CONFIG_S32K1XX_RTC=y
+CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
+CONFIG_SIG_DEFAULT=y
 CONFIG_SPITOOL_DEFFREQ=400000
 CONFIG_SPITOOL_MAXBUS=0
 CONFIG_SPITOOL_PROGNAME="spi"
@@ -69,32 +84,3 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_CXXINITIALIZE=y
 CONFIG_SYSTEM_SPITOOL=y
 CONFIG_USER_ENTRYPOINT="nsh_main"
-CONFIG_S32K1XX_FLEXCAN0=y
-CONFIG_S32K1XX_FLEXCAN1=y
-CONFIG_NET=y
-CONFIG_NET_ETHERNET=n
-CONFIG_NET_IPv4=n
-CONFIG_ARCH_HAVE_NET=y
-CONFIG_NET_READAHEAD=y
-CONFIG_NSOCKET_DESCRIPTORS=8
-CONFIG_NET_NACTIVESOCKETS=16
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_CANPROTO_OPTIONS=y
-CONFIG_NET_CAN=y
-CONFIG_NET_CAN_HAVE_TX_DEADLINE=y
-CONFIG_CAN_CONNS=4
-CONFIG_NET_CAN_SOCK_OPTS=y
-CONFIG_NET_CAN_RAW_FILTER_MAX=32
-CONFIG_NET_TIMESTAMP=y
-CONFIG_NET_CMSG=y
-CONFIG_NETDEV_IFINDEX=y
-CONFIG_NSH_NETINIT=y
-CONFIG_SCHED_LPWORK=y
-CONFIG_SCHED_LPNTHREADS=1
-CONFIG_SCHED_LPWORKPRIORITY=100
-CONFIG_SCHED_LPWORKSTACKSIZE=2048
-CONFIG_S32K1XX_RTC=y
-CONFIG_RTC=y
-CONFIG_RTC_HIRES=y
-CONFIG_RTC_FREQUENCY=32768
-CONFIG_SIG_DEFAULT=y


[incubator-nuttx] 01/03: net/can/can.h: Add can_setsockopt and can_getsockopt prototypes.

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 155903fc54f4a04181f2d57075618646d3a4f885
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Mon Jun 15 18:57:13 2020 +0100

    net/can/can.h: Add can_setsockopt and can_getsockopt prototypes.
---
 net/can/can.h           | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
 net/socket/getsockopt.c |  1 +
 net/socket/setsockopt.c |  1 +
 3 files changed, 65 insertions(+)

diff --git a/net/can/can.h b/net/can/can.h
index cae3eb4..2d8bcdd 100644
--- a/net/can/can.h
+++ b/net/can/can.h
@@ -376,6 +376,69 @@ ssize_t psock_can_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg);
 void can_readahead_signal(FAR struct can_conn_s *conn);
 #endif
 
+/****************************************************************************
+ * Name: can_setsockopt
+ *
+ * Description:
+ *   can_setsockopt() sets the CAN-protocol option specified by the
+ *   'option' argument to the value pointed to by the 'value' argument for
+ *   the socket specified by the 'psock' argument.
+ *
+ *   See <netinet/can.h> for the a complete list of values of CAN protocol
+ *   options.
+ *
+ * Input Parameters:
+ *   psock     Socket structure of socket to operate on
+ *   option    identifies the option to set
+ *   value     Points to the argument value
+ *   value_len The length of the argument value
+ *
+ * Returned Value:
+ *   Returns zero (OK) on success.  On failure, it returns a negated errno
+ *   value to indicate the nature of the error.  See psock_setcockopt() for
+ *   the list of possible error values.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_NET_CANPROTO_OPTIONS
+int can_setsockopt(FAR struct socket *psock, int option,
+                   FAR const void *value, socklen_t value_len);
+#endif
+
+/****************************************************************************
+ * Name: can_getsockopt
+ *
+ * Description:
+ *   can_getsockopt() retrieves the value for the option specified by the
+ *   'option' argument for the socket specified by the 'psock' argument.  If
+ *   the size of the option value is greater than 'value_len', the value
+ *   stored in the object pointed to by the 'value' argument will be silently
+ *   truncated. Otherwise, the length pointed to by the 'value_len' argument
+ *   will be modified to indicate the actual length of the 'value'.
+ *
+ *   See <sys/socket.h> a complete list of values for the socket-level
+ *   'option' argument.  Protocol-specific options are are protocol specific
+ *   header files (such as netpacket/can.h for the case of the CAN protocol).
+ *
+ * Input Parameters:
+ *   psock     Socket structure of the socket to query
+ *   level     Protocol level to set the option
+ *   option    identifies the option to get
+ *   value     Points to the argument value
+ *   value_len The length of the argument value
+ *
+ * Returned Value:
+ *   Returns zero (OK) on success.  On failure, it returns a negated errno
+ *   value to indicate the nature of the error.  See psock_getsockopt() for
+ *   the complete list of appropriate return error codes.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_NET_CANPROTO_OPTIONS
+int can_getsockopt(FAR struct socket *psock, int option,
+                   FAR void *value, FAR socklen_t *value_len);
+#endif
+
 #undef EXTERN
 #ifdef __cplusplus
 }
diff --git a/net/socket/getsockopt.c b/net/socket/getsockopt.c
index fb5f7c9..7f0d598 100644
--- a/net/socket/getsockopt.c
+++ b/net/socket/getsockopt.c
@@ -52,6 +52,7 @@
 #include "tcp/tcp.h"
 #include "usrsock/usrsock.h"
 #include "utils/utils.h"
+#include "can/can.h"
 
 /****************************************************************************
  * Private Functions
diff --git a/net/socket/setsockopt.c b/net/socket/setsockopt.c
index da4b923..a5ab719 100644
--- a/net/socket/setsockopt.c
+++ b/net/socket/setsockopt.c
@@ -57,6 +57,7 @@
 #include "udp/udp.h"
 #include "usrsock/usrsock.h"
 #include "utils/utils.h"
+#include "can/can.h"
 
 /****************************************************************************
  * Public Functions


[incubator-nuttx] 02/03: net/can/can_setsockopt&can_getsockopt.c: Initialiaze ret variable to eliminate any warning.

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c8d83e0a8803dd93f42cf7ebee091768345ff854
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Mon Jun 15 19:39:41 2020 +0100

    net/can/can_setsockopt&can_getsockopt.c: Initialiaze ret variable to
    eliminate any warning.
---
 net/can/can_getsockopt.c | 2 +-
 net/can/can_setsockopt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/can/can_getsockopt.c b/net/can/can_getsockopt.c
index df6d0c9..67ab7c6 100644
--- a/net/can/can_getsockopt.c
+++ b/net/can/can_getsockopt.c
@@ -78,7 +78,7 @@ int can_getsockopt(FAR struct socket *psock, int option,
                    FAR void *value, FAR socklen_t *value_len)
 {
   FAR struct can_conn_s *conn;
-  int ret;
+  int ret = OK;
 
   DEBUGASSERT(psock != NULL && value != NULL && value_len != NULL &&
               psock->s_conn != NULL);
diff --git a/net/can/can_setsockopt.c b/net/can/can_setsockopt.c
index 3359e40..71595d7 100644
--- a/net/can/can_setsockopt.c
+++ b/net/can/can_setsockopt.c
@@ -73,7 +73,7 @@ int can_setsockopt(FAR struct socket *psock, int option,
                    FAR const void *value, socklen_t value_len)
 {
   FAR struct can_conn_s *conn;
-  int ret;
+  int ret = OK;
   int count = 0;
 
   DEBUGASSERT(psock != NULL && value != NULL && psock->s_conn != NULL);