| 1 |
// Copyright (C) Firmwave Ltd., All rights reserved. |
| 2 |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| 3 |
|
| 4 |
#include "azure_c_shared_utility/platform.h" |
| 5 |
#include "azure_c_shared_utility/xio.h" |
| 6 |
#include "azure_c_shared_utility/tlsio_cyclonessl.h" |
| 7 |
#include "azure_c_shared_utility/threadapi.h" |
| 8 |
|
| 9 |
#include "debug.h" |
| 10 |
|
| 11 |
int platform_init(void) |
| 12 |
{ |
| 13 |
//TODO Add proper network events synchronization |
| 14 |
ThreadAPI_Sleep(10000); |
| 15 |
return 0; |
| 16 |
} |
| 17 |
|
| 18 |
const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) |
| 19 |
{ |
| 20 |
return tlsio_cyclonessl_get_interface_description(); |
| 21 |
} |
| 22 |
|
| 23 |
STRING_HANDLE platform_get_platform_info(PLATFORM_INFO_OPTION options) |
| 24 |
{ |
| 25 |
// No applicable options, so ignoring parameter |
| 26 |
(void)options; |
| 27 |
|
| 28 |
// Expected format: "(<runtime name>; <operating system name>; <platform>)" |
| 29 |
|
| 30 |
return STRING_construct("(native; freertos; undefined)"); |
| 31 |
} |
| 32 |
|
| 33 |
void platform_deinit(void) |
| 34 |
{ |
| 35 |
TRACE_INFO("Deinitializing platform \r\n"); |
| 36 |
while(1) {}; |
| 37 |
} |