Azure IoT common library
Dependents: STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more
Diff: azure_c_shared_utility/crt_abstractions.h
- Revision:
- 18:6d8a413a4d9a
- Parent:
- 11:77df6d7e65ae
- Child:
- 19:2e0811512ceb
diff -r 9051ba70fc73 -r 6d8a413a4d9a azure_c_shared_utility/crt_abstractions.h --- a/azure_c_shared_utility/crt_abstractions.h Sun Jan 08 11:12:54 2017 -0800 +++ b/azure_c_shared_utility/crt_abstractions.h Fri Jan 13 18:41:15 2017 -0800 @@ -107,6 +107,11 @@ MOCKABLE_FUNCTION(, int, mallocAndStrcpy_s, char**, destination, const char*, source); MOCKABLE_FUNCTION(, int, unsignedIntToString, char*, destination, size_t, destinationSize, unsigned int, value); MOCKABLE_FUNCTION(, int, size_tToString, char*, destination, size_t, destinationSize, size_t, value); + +/*following logic shall define the TOUPPER and ISDIGIT, we do that because the SDK is not happy with some Arduino implementation of it.*/ +#define TOUPPER(c) ((((c)>='a') && ((c)<='z'))?(c)-'a'+'A':c) +#define ISDIGIT(c) ((((c)>='0') && ((c)<='9'))?1:0) + /*following logic shall define the ISNAN macro*/ /*if runing on Microsoft Visual C compiler, than ISNAN shall be _isnan*/ /*else if running on C99 or C11, ISNAN shall be isnan*/