Skip to content

Commit

Permalink
1.0.34 release
Browse files Browse the repository at this point in the history
  • Loading branch information
az-iot-builder-01 committed Jun 2, 2017
1 parent 261a643 commit d91bacb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=AzureIoTUtility
version=1.0.33
version=1.0.34
author=Microsoft
maintainer=Microsoft <[email protected]>
sentence=Azure C shared utility library for Arduino. For the Arduino MKR1000 or Zero and WiFi Shield 101, Adafruit Huzzah and Feather M0, or SparkFun Thing.
Expand Down
2 changes: 1 addition & 1 deletion src/AzureIoTUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#include "azure_c_shared_utility/lock.h"
#include "azure_c_shared_utility/threadapi.h"

#define AzureIoTUtilityVersion "1.0.33"
#define AzureIoTUtilityVersion "1.0.34"

#endif //AZUREIOTUTILITY_H
31 changes: 13 additions & 18 deletions src/azure_c_shared_utility/xlogging.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@
#ifndef XLOGGING_H
#define XLOGGING_H

#include "azure_c_shared_utility/agenttime.h"
#include "azure_c_shared_utility/optimize_size.h"

#if defined(ESP8266_RTOS)
#include "c_types.h"
#endif

#if defined(ARDUINO_ARCH_ESP8266)
#include "esp8266/azcpgmspace.h"
#endif

#ifdef __cplusplus
#include <cstdio>
extern "C" {
#else
#include <stdio.h>
#endif /* __cplusplus */

#include "azure_c_shared_utility/agenttime.h"
#include "azure_c_shared_utility/optimize_size.h"

#ifdef TIZENRT
#undef LOG_INFO
#endif
Expand Down Expand Up @@ -55,7 +64,6 @@ typedef void(*LOGGER_LOG_GETLASTERROR)(const char* file, const char* func, int l
#define UNUSED(x) (void)(x)

#elif defined(ESP8266_RTOS)
#include "c_types.h"
#define LogInfo(FORMAT, ...) do { \
static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = FORMAT; \
printf(flash_str, ##__VA_ARGS__); \
Expand Down Expand Up @@ -83,7 +91,6 @@ const char* __localFORMAT = PSTR(FORMAT);
On the other hand, vsprintf does not support the pinned 'format' and os_printf does not work with va_list,
so we compacted the log in the macro LogInfo.
*/
#include "esp8266/azcpgmspace.h"
#define LOG(log_category, log_options, FORMAT, ...) { \
const char* __localFORMAT = PSTR(FORMAT); \
os_printf(__localFORMAT, ##__VA_ARGS__); \
Expand Down Expand Up @@ -156,24 +163,12 @@ extern LOGGER_LOG_GETLASTERROR xlogging_get_log_function_GetLastError(void);
#define LogError(FORMAT, ...) do{ LOG(AZ_LOG_ERROR, LOG_LINE, FORMAT, ##__VA_ARGS__); }while((void)0,0)
#endif

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

extern void xlogging_set_log_function(LOGGER_LOG log_function);
extern LOGGER_LOG xlogging_get_log_function(void);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* ARDUINO_ARCH_ESP8266 */


#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/**
* @brief Print the memory content byte pre byte in hexadecimal and as a char it the byte correspond to any printable ASCII chars.
*
Expand All @@ -189,7 +184,7 @@ extern "C" {
extern void xlogging_dump_buffer(const void* buf, size_t size);

#ifdef __cplusplus
}
} // extern "C"
#endif /* __cplusplus */

#endif /* XLOGGING_H */

0 comments on commit d91bacb

Please sign in to comment.