24#if !defined(MBEDTLS_CONFIG_FILE)
25#include "mbedtls/mbedtls_config.h"
27#include MBEDTLS_CONFIG_FILE
29#ifdef MBEDTLS_THREADING_ALT
30#include "threading_alt.h"
34#ifndef APPLICATION_VERSION
35#error Please define APPLICATION_VERSION to an appropriate value.
44 char hw_version_string[32] = { 0 };
49 snprintf(hw_version_string,
sizeof(hw_version_string),
"%s",
"Unknown");
52 printf(
"-----------------------------------\n");
54 printf(
" HW Version: %s\n", hw_version_string);
58 printf(
" BCF API version: %u.%u.%u\n",
64 printf(
" BCF build version: %s\n", bcf_metadata.
build_version);
68 printf(
" BCF board description: %s\n", bcf_metadata.
board_desc);
73 printf(
" !! BCF metadata retrival failed !!\n");
79 printf(
" !! Error occured whilst retrieving version info !!\n");
81 printf(
" Morselib version: %s\n",
version.morselib_version);
82 printf(
" Morse firmware version: %s\n",
version.morse_fw_version);
83 printf(
" Morse chip ID: 0x%04lx\n",
version.morse_chip_id);
84 printf(
" Morse chip name: %s\n",
version.morse_chip_id_string);
85 printf(
" Application version: %s\n", APPLICATION_VERSION);
86 printf(
"-----------------------------------\n");
97 printf(
"\n\nM2M Agent Example (Built " __DATE__
" " __TIME__
")\n\n");
101#ifdef MBEDTLS_THREADING_ALT
102 mbedtls_platform_threading_init();
107 .reg_db = get_regulatory_db(),
111 printf(
"M2M interface enabled\n");
struct mmagic_m2m_agent * mmagic_m2m_agent_init(const struct mmagic_m2m_agent_init_args *args)
Initialize the M2M agent.
bool mmhal_get_hardware_version(char *version_buffer, size_t version_buffer_length)
Reads information that can be used to identify the hardware platform, such as hardware ID and version...
#define MMOSAL_ASSERT(expr)
Assert that the given expression evaluates to true and abort execution if not.
#define MM_UNUSED(_x)
Casts the given expression to void to avoid "unused" warnings from the compiler.
enum mmwlan_status mmwlan_get_version(struct mmwlan_version *version)
Retrieve version information from morselib and the connected Morse transceiver.
enum mmwlan_status mmwlan_get_bcf_metadata(struct mmwlan_bcf_metadata *metadata)
Read the metadata from the board configuration file (BCF).
mmwlan_status
Enumeration of status return codes.
@ MMWLAN_SUCCESS
The operation was successful.
static void app_print_version_info(void)
Prints various version information.
void app_init(void)
Main entry point to the application.
char app_version[MMAGIC_SYS_MAX_APP_VERSION_LENGTH+1]
Application version string.
Structure for retrieving version information from the mmwlan subsystem.