This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Compatibility with lwIP and ESP-IDF #13
Open
snej
wants to merge
10
commits into
darconeous:master
Choose a base branch
from
couchbasedeps:feature/lwIP
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8fb16eb
Compatibility with lwIP and ESP-IDF
snej b431d10
Fixed a logic error due to missing parens
snej e109fca
Xcode project: define DEBUG=1, not just DEBUG
snej 10d16d6
Xcode: Lower MACOSX_DEPLOYMENT_TARGET to 10.10
snej d4f5bb7
Added some missing cases to xxx_to_cstr fns
snej da3f2f9
Added nyoci_outbound_get_packet[_length]()
snej 380864c
Fixed a compiler warning in nyocictl
snej 37319a5
nyocictl: Added env var info to usage/help output
snej 87451c0
Updated CoAP constants in coap.h
snej c5526dd
Merge branch 'master' into feature/lwIP
snej File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,40 +34,46 @@ | |
|
||
#if !VERBOSE_DEBUG | ||
|
||
#define CSTR(x) (x) | ||
#define CSTR(x) (x) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather significant changes in the whitespace not be combined with material additions or changes to a file, unless it is unavoidable. It makes the diffs harder to read. That aside, I'm having trouble getting my brain to not be weirded out by the use of full indents, though. That's largely why I used single-space indents in |
||
|
||
#ifndef DEBUG_PRINTF | ||
#define DEBUG_PRINTF(...) do { } while(0) | ||
#endif | ||
#define NYOCI_DEBUG_OUT_FILE stdout | ||
#ifndef DEBUG_PRINTF | ||
#define DEBUG_PRINTF(...) do { } while(0) | ||
#endif | ||
#define NYOCI_DEBUG_OUT_FILE stdout | ||
|
||
#elif defined(__AVR__) | ||
#define NYOCI_DEBUG_OUT_FILE stdout | ||
#define NYOCI_DEBUG_OUT_FILE stdout | ||
|
||
#include <stdio.h> | ||
#include <avr/pgmspace.h> | ||
#define CSTR(x) PSTR(x) | ||
#define DEBUG_PRINTF(...) \ | ||
#include <stdio.h> | ||
#include <avr/pgmspace.h> | ||
#define CSTR(x) PSTR(x) | ||
#define DEBUG_PRINTF(...) \ | ||
do { fprintf_P(NYOCI_DEBUG_OUT_FILE, __VA_ARGS__); fputc( \ | ||
'\n', \ | ||
NYOCI_DEBUG_OUT_FILE); } while(0) | ||
'\n', \ | ||
NYOCI_DEBUG_OUT_FILE); } while(0) | ||
|
||
#else // __AVR__ | ||
#define NYOCI_DEBUG_OUT_FILE stderr | ||
#elif defined(ESP_PLATFORM) | ||
#include <esp_log.h> | ||
#define DEBUG_PRINTF(FMT, ...) ESP_LOGI("nyoci", FMT, ##__VA_ARGS__) | ||
#define NYOCI_DEBUG_OUT_FILE stderr | ||
#define CSTR(x) x | ||
|
||
#include <stdio.h> | ||
#define CSTR(x) (x) | ||
#if ASSERT_MACROS_USES_SYSLOG | ||
#include <syslog.h> | ||
#define DEBUG_PRINTF(...) syslog(7, __VA_ARGS__) | ||
#elif ASSERT_MACROS_USE_VANILLA_PRINTF | ||
#define DEBUG_PRINTF(...) \ | ||
do { printf(__VA_ARGS__); printf("\n"); } while(0) | ||
#else | ||
#define DEBUG_PRINTF(...) \ | ||
do { fprintf(NYOCI_DEBUG_OUT_FILE, __VA_ARGS__); fputc('\n', \ | ||
NYOCI_DEBUG_OUT_FILE); } while(0) | ||
#endif | ||
#define NYOCI_DEBUG_OUT_FILE stderr | ||
|
||
#include <stdio.h> | ||
#define CSTR(x) (x) | ||
#if ASSERT_MACROS_USES_SYSLOG | ||
#include <syslog.h> | ||
#define DEBUG_PRINTF(...) syslog(7, __VA_ARGS__) | ||
#elif ASSERT_MACROS_USE_VANILLA_PRINTF | ||
#define DEBUG_PRINTF(...) \ | ||
do { printf(__VA_ARGS__); printf("\n"); } while(0) | ||
#else | ||
#define DEBUG_PRINTF(...) \ | ||
do { fprintf(NYOCI_DEBUG_OUT_FILE, __VA_ARGS__); fputc('\n', \ | ||
NYOCI_DEBUG_OUT_FILE); } while(0) | ||
#endif | ||
|
||
#endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like all of the changes in this file, including the
errno
stuff. May be worth spinning out.