-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
100 additions
and
25 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CFLAGS += -g -Wall -Wextra | ||
CFLAGS += -g -Wall -Wextra -I. | ||
|
||
OBJECTS = \ | ||
main.o \ | ||
|
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#ifndef SBMP_CONFIG_H | ||
#define SBMP_CONFIG_H | ||
|
||
/* --- Configuration ------------------- */ | ||
|
||
|
||
#ifndef SBMP_LOGGING | ||
/** | ||
* @brief Enable logging. | ||
* | ||
* Logging functions are WEAK stubs in sbmp_logging. | ||
* | ||
* Disable logging to free up memory taken by the messages. | ||
*/ | ||
#define SBMP_LOGGING 1 | ||
#endif | ||
|
||
|
||
#ifndef SBMP_USE_MALLOC | ||
/** | ||
* @brief Enable malloc if NULL is passed. | ||
* | ||
* This lets you malloc() the struct / buffer if you pass NULL | ||
* to the init functions. | ||
* | ||
* Disable malloc to free up memory taken by the malloc routine. | ||
* If disabled, init funcs will return NULL if NULL is passed | ||
* as argument. | ||
*/ | ||
#define SBMP_USE_MALLOC 1 | ||
#endif | ||
|
||
|
||
#ifndef SBMP_HAS_CRC32 | ||
/** | ||
* @brief Add support for CRC32 | ||
* | ||
* Disabling CRC32 will reduce program size (for small micros). | ||
* If CRC32 is disabled, XOR will be used as the preferred checksum | ||
* method. | ||
* | ||
* Received CRC32'd messages will be accepted without checking. | ||
* | ||
* If handshake is used, the peer will detect that CRC32 is not | ||
* supported here, and should start using XOR. | ||
*/ | ||
#define SBMP_HAS_CRC32 1 | ||
#endif | ||
|
||
|
||
/* ---------- MALLOC --------------- */ | ||
|
||
#ifndef sbmp_malloc | ||
# define sbmp_malloc malloc | ||
#endif | ||
|
||
#ifndef sbmp_free | ||
# define sbmp_free free | ||
#endif | ||
|
||
#ifndef sbmp_calloc | ||
# define sbmp_calloc calloc | ||
#endif | ||
|
||
/* ------------------------------------- */ | ||
|
||
|
||
#endif // SBMP_CONFIG_H |
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