Microsoft Azure IoTHub client libraries

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more

This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks

Committer:
AzureIoTClient
Date:
Thu Oct 04 09:15:49 2018 -0700
Revision:
93:7c0bbb86b167
Parent:
92:97148cf9aa2a
1.2.10

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 89:a2ed767a532e 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 89:a2ed767a532e 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 89:a2ed767a532e 3
AzureIoTClient 92:97148cf9aa2a 4 #include <stdlib.h>
AzureIoTClient 89:a2ed767a532e 5
AzureIoTClient 89:a2ed767a532e 6 #include "azure_c_shared_utility/platform.h"
AzureIoTClient 89:a2ed767a532e 7 #include "azure_c_shared_utility/xlogging.h"
AzureIoTClient 89:a2ed767a532e 8 #include "azure_c_shared_utility/macro_utils.h"
AzureIoTClient 89:a2ed767a532e 9 #include "iothub.h"
AzureIoTClient 89:a2ed767a532e 10
AzureIoTClient 93:7c0bbb86b167 11 int IoTHub_Init(void)
AzureIoTClient 89:a2ed767a532e 12 {
AzureIoTClient 89:a2ed767a532e 13 int result;
AzureIoTClient 89:a2ed767a532e 14 if (platform_init() != 0)
AzureIoTClient 89:a2ed767a532e 15 {
AzureIoTClient 89:a2ed767a532e 16 LogError("Platform initialization failed");
AzureIoTClient 89:a2ed767a532e 17 result = __FAILURE__;
AzureIoTClient 89:a2ed767a532e 18 }
AzureIoTClient 89:a2ed767a532e 19 else
AzureIoTClient 89:a2ed767a532e 20 {
AzureIoTClient 89:a2ed767a532e 21 result = 0;
AzureIoTClient 89:a2ed767a532e 22 }
AzureIoTClient 89:a2ed767a532e 23 return result;
AzureIoTClient 89:a2ed767a532e 24 }
AzureIoTClient 89:a2ed767a532e 25
AzureIoTClient 93:7c0bbb86b167 26 void IoTHub_Deinit(void)
AzureIoTClient 89:a2ed767a532e 27 {
AzureIoTClient 89:a2ed767a532e 28 platform_deinit();
AzureIoTClient 89:a2ed767a532e 29 }