You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/02/19 02:35:45 UTC
[incubator-nuttx] branch master updated (43a9866 -> 7750de7)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 43a9866 lpc17xx_40xx/lpc17_40_i2c.c: Propagate I2C I/O errors
new 9fcca55 z80/inttypes.h: Add INT24_C and UINT24_C function macros
new 7750de7 stdint.h: Use conversion macros for the definition of MIN and MAX constants
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:
arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c | 2 +-
arch/z80/include/ez80/inttypes.h | 4 ++++
arch/z80/include/z180/inttypes.h | 2 ++
arch/z80/include/z8/inttypes.h | 2 ++
arch/z80/include/z80/inttypes.h | 2 ++
include/stdint.h | 22 +++++++++++-----------
6 files changed, 22 insertions(+), 12 deletions(-)
[incubator-nuttx] 01/02: z80/inttypes.h: Add INT24_C and UINT24_C
function macros
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 9fcca55ad6279a8724bee17e2f087a30d13ecbb8
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Wed Feb 17 19:03:10 2021 -0300
z80/inttypes.h: Add INT24_C and UINT24_C function macros
---
arch/z80/include/ez80/inttypes.h | 4 ++++
arch/z80/include/z180/inttypes.h | 2 ++
arch/z80/include/z8/inttypes.h | 2 ++
arch/z80/include/z80/inttypes.h | 2 ++
4 files changed, 10 insertions(+)
diff --git a/arch/z80/include/ez80/inttypes.h b/arch/z80/include/ez80/inttypes.h
index fbf9d9e..aa651cb 100644
--- a/arch/z80/include/ez80/inttypes.h
+++ b/arch/z80/include/ez80/inttypes.h
@@ -114,10 +114,12 @@
# define INT8_C(x) x
# define INT16_C(x) x
+# define INT24_C(x) x
# define INT32_C(x) x ## l
# define UINT8_C(x) x
# define UINT16_C(x) x
+# define UINT24_C(x) x
# define UINT32_C(x) x ## ul
#else
@@ -190,10 +192,12 @@
# define INT8_C(x) x
# define INT16_C(x) x
+# define INT24_C(x) x
# define INT32_C(x) x ## l
# define UINT8_C(x) x
# define UINT16_C(x) x
+# define UINT24_C(x) x
# define UINT32_C(x) x ## ul
#endif
diff --git a/arch/z80/include/z180/inttypes.h b/arch/z80/include/z180/inttypes.h
index 7ee00a3..81e72dc 100644
--- a/arch/z80/include/z180/inttypes.h
+++ b/arch/z80/include/z180/inttypes.h
@@ -112,10 +112,12 @@
#define INT8_C(x) x
#define INT16_C(x) x
+#define INT24_C(x) x
#define INT32_C(x) x ## l
#define UINT8_C(x) x
#define UINT16_C(x) x
+#define UINT24_C(x) x
#define UINT32_C(x) x ## ul
#endif /* __ARCH_Z80_INCLUDE_Z180_INTTYPES_H */
diff --git a/arch/z80/include/z8/inttypes.h b/arch/z80/include/z8/inttypes.h
index 2b157bd..5ea4610 100644
--- a/arch/z80/include/z8/inttypes.h
+++ b/arch/z80/include/z8/inttypes.h
@@ -112,10 +112,12 @@
#define INT8_C(x) x
#define INT16_C(x) x
+#define INT24_C(x) x
#define INT32_C(x) x ## l
#define UINT8_C(x) x
#define UINT16_C(x) x
+#define UINT24_C(x) x
#define UINT32_C(x) x ## ul
#endif /* __ARCH_Z80_INCLUDE_Z8_INTTYPES_H */
diff --git a/arch/z80/include/z80/inttypes.h b/arch/z80/include/z80/inttypes.h
index 52c2041..37495fd 100644
--- a/arch/z80/include/z80/inttypes.h
+++ b/arch/z80/include/z80/inttypes.h
@@ -112,10 +112,12 @@
#define INT8_C(x) x
#define INT16_C(x) x
+#define INT24_C(x) x
#define INT32_C(x) x ## l
#define UINT8_C(x) x
#define UINT16_C(x) x
+#define UINT24_C(x) x
#define UINT32_C(x) x ## ul
#endif /* __ARCH_Z80_INCLUDE_Z80_INTTYPES_H */
[incubator-nuttx] 02/02: stdint.h: Use conversion macros for the
definition of MIN and MAX constants
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 7750de72bba50e23e1ee5a9020cea9d4e7cbbd9e
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Wed Feb 17 19:04:31 2021 -0300
stdint.h: Use conversion macros for the definition of MIN and MAX constants
---
arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c | 2 +-
include/stdint.h | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c b/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c
index 3f454b4..8ea7c34 100644
--- a/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c
+++ b/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c
@@ -347,7 +347,7 @@ static int nrf52_settimeout(FAR struct watchdog_lowerhalf_s *lower,
if (timeout < 1 || timeout > WDT_MAXTIMEOUT)
{
- wderr("ERROR: Cannot represent timeout=%" PRId32 " > %d\n",
+ wderr("ERROR: Cannot represent timeout=%" PRId32 " > %" PRId32 "\n",
timeout, WDT_MAXTIMEOUT);
return -ERANGE;
}
diff --git a/include/stdint.h b/include/stdint.h
index bdc52b0..b5ac624 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -42,27 +42,27 @@
/* Limits of exact-width integer types */
#define INT8_MIN (-INT8_MAX - 1)
-#define INT8_MAX 127
-#define UINT8_MAX 255
+#define INT8_MAX INT8_C(127)
+#define UINT8_MAX UINT8_C(255)
#define INT16_MIN (-INT16_MAX - 1)
-#define INT16_MAX 32767
-#define UINT16_MAX 65535u
+#define INT16_MAX INT16_C(32767)
+#define UINT16_MAX UINT16_C(65535)
#ifdef __INT24_DEFINED
# define INT24_MIN (-INT24_MAX - 1)
-# define INT24_MAX 8388607
-# define UINT24_MAX 16777215u
+# define INT24_MAX INT24_C(8388607)
+# define UINT24_MAX UINT24_C(16777215)
#endif
#define INT32_MIN (-INT32_MAX - 1)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295u
+#define INT32_MAX INT32_C(2147483647)
+#define UINT32_MAX UINT32_C(4294967295)
#ifdef __INT64_DEFINED
-# define INT64_MIN (-INT64_MAX - 1ll)
-# define INT64_MAX 9223372036854775807ll
-# define UINT64_MAX 18446744073709551615ull
+# define INT64_MIN (-INT64_MAX - 1)
+# define INT64_MAX INT64_C(9223372036854775807)
+# define UINT64_MAX UINT64_C(18446744073709551615)
#endif
/* Limits of minimum-width integer types */