Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:43bbf986ce1e, committed 2019-01-24
- Comitter:
- tkanas
- Date:
- Thu Jan 24 22:38:10 2019 +0000
- Parent:
- 2:97bb7423c76f
- Commit message:
- debugging;
Changed in this revision
| dbg.h | Show annotated file Show diff for this revision Revisions of this file |
| inet.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/dbg.h Fri Jan 18 15:56:43 2019 +0000
+++ b/dbg.h Thu Jan 24 22:38:10 2019 +0000
@@ -13,11 +13,11 @@
#ifdef DEBUG
#define DBG(...) fprintf(stderr,"%s:%d ",__FILE__,__LINE__); fprintf(stderr,__VA_ARGS__); fprintf(stderr,"\r\n");
#define DBGX(...) fprintf(stderr,__VA_ARGS__);
- #define DBGLX(...) fprintf(stderr,"%s:%d ",__FILE__,__LINE__); fprintf(stderr,__VA_ARGS__);
+ //#define DBGLX(...) fprintf(stderr,"%s:%d ",__FILE__,__LINE__); fprintf(stderr,__VA_ARGS__);
// #define DBG_PDU() printBin();
#else
#define DBG(...) {};
#define DBGX(...) {};
- #define DBGLX(...) {};
- #define DBG_PDU() {};
+ //#define DBGLX(...) {};
+ //#define DBG_PDU() {};
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inet.h Thu Jan 24 22:38:10 2019 +0000
@@ -0,0 +1,20 @@
+
+uint16_t htons (uint16_t x) {
+#if BYTE_ORDER == BIG_ENDIAN
+ return x;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+ return __bswap_16 (x);
+#else
+# error "What kind of system is this?"
+#endif
+}
+
+uint16_t ntohs (uint16_t x) {
+#if BYTE_ORDER == BIG_ENDIAN
+ return x;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+ return __bswap_16 (x);
+#else
+# error "What kind of system is this?"
+#endif
+}
\ No newline at end of file