You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2021/08/20 14:47:16 UTC

[incubator-nuttx] branch master updated (af72376 -> ccaea47)

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

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


    from af72376  fs: Remove magic field from partition_info_s
     new 1f93071  byteswap.h: add byteswap.h header file
     new ccaea47  endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER

The 2 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:
 .../libc/endian/lib_swap16.c => include/byteswap.h | 25 ++++++++++++++--------
 include/endian.h                                   |  4 ++++
 2 files changed, 20 insertions(+), 9 deletions(-)
 copy libs/libc/endian/lib_swap16.c => include/byteswap.h (81%)

[incubator-nuttx] 02/02: endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER

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

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

commit ccaea473f394e8c5d9ef761ff55daf78912653ce
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Thu Aug 5 19:44:31 2021 +0800

    endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER
    
    Change-Id: If072b69e37a89ccd6dc62e1d485b15703da029ac
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 include/endian.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/endian.h b/include/endian.h
index e0483d3..76cc93c 100644
--- a/include/endian.h
+++ b/include/endian.h
@@ -45,7 +45,9 @@
  */
 
 #define LITTLE_ENDIAN         1234
+#define __LITTLE_ENDIAN       1234
 #define BIG_ENDIAN            4321
+#define __BIG_ENDIAN          4321
 
 /* Common byte swapping macros */
 
@@ -72,6 +74,7 @@
 /* Big-endian byte order */
 
 #  define BYTE_ORDER          BIG_ENDIAN
+#  define __BYTE_ORDER        BIG_ENDIAN
 
 /* Big-endian byte order macros */
 
@@ -96,6 +99,7 @@
 /* Little-endian byte order */
 
 #  define BYTE_ORDER          LITTLE_ENDIAN
+#  define __BYTE_ORDER        __LITTLE_ENDIAN
 
 /* Little-endian byte order macros */
 

[incubator-nuttx] 01/02: byteswap.h: add byteswap.h header file

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

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

commit 1f93071370740d8e791179c83fadacc38406f4ae
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Thu Aug 5 19:42:01 2021 +0800

    byteswap.h: add byteswap.h header file
    
    Change-Id: I2b00618f608efbb8834328823b5e0eaa66f42aba
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 include/byteswap.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/include/byteswap.h b/include/byteswap.h
new file mode 100644
index 0000000..2e6f92c
--- /dev/null
+++ b/include/byteswap.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ * include/byteswap.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __INCLUDE_BYTES_SWAP_H
+#define __INCLUDE_BYTES_SWAP_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <endian.h>
+
+/****************************************************************************
+ * Preprocessor definitions
+ ****************************************************************************/
+
+#ifndef bswap_16
+#define bswap_16(x) __swap_uint16(x)
+#endif
+
+#ifndef bswap_32
+#define bswap_32(x) __swap_uint32(x)
+#endif
+
+#ifndef bswap_64
+#define bswap_64(x) __swap_uint64(x)
+#endif
+#endif