76#include "mm_app_regdb.h"
93 printf(
"Link is up. Time: %lu ms", time_ms);
94 printf(
", IP: %s", link_status->
ip_addr);
95 printf(
", Netmask: %s", link_status->
netmask);
96 printf(
", Gateway: %s\n", link_status->
gateway);
100 printf(
"Link is down. Time: %lu ms\n", time_ms);
114 printf(
"\n\nMorse Emmet Demo (Built " __DATE__
" " __TIME__
")\n\n");
133 printf(
"Error initializing network interface.\n");
static void link_status_callback(const struct mmipal_link_status *link_status)
Link status callback.
void app_init(void)
Main entry point to the application.
void emmet_start(void)
Start Emmet.
enum mmwlan_status emmet_set_reg_db(const struct mmwlan_regulatory_db *reg_db)
Set the regulatory database for Emmet to use.
void emmet_init(void)
Initialize Emmet.
enum mmipal_status mmipal_init(const struct mmipal_init_args *args)
Initialize the IP stack and enable the MMWLAN interface.
#define MMIPAL_INIT_ARGS_DEFAULT
Default values for mmipal_init_args.
void mmipal_set_link_status_callback(mmipal_link_status_cb_fn_t fn)
Sets the callback function to be invoked on link status changes.
@ MMIPAL_LINK_UP
Link is up.
@ MMIPAL_SUCCESS
Completed successfully.
#define MMOSAL_ASSERT(expr)
Assert that the given expression evaluates to true and abort execution if not.
uint32_t mmosal_get_time_ms(void)
Get the system time in milliseconds.
enum mmwlan_status mmwlan_boot(const struct mmwlan_boot_args *args)
Boot the Morse Micro transceiver and leave it in an idle state.
#define MMWLAN_BOOT_ARGS_INIT
Initializer for mmwlan_boot_args.
void mmwlan_init(void)
Initialize the MMWLAN subsystem.
enum mmwlan_status mmwlan_set_channel_list(const struct mmwlan_s1g_channel_list *channel_list)
Set the list of channels that are supported by the regulatory domain in which the device resides.
Morse Micro application helper routines for initializing/de-initializing the Wireless LAN interface a...
void app_print_version_info(void)
Prints various version information.
const struct mmwlan_s1g_channel_list * load_channel_list(void)
Looks up country code and returns appropriate channel list.
void load_mmipal_init_args(struct mmipal_init_args *args)
Loads the provided structure with initialization parameters read from config store.
Initialize arguments structure.
Structure representing the current status of the link.
mmipal_ip_addr_t netmask
Current netmask.
mmipal_ip_addr_t ip_addr
Current IP address.
mmipal_ip_addr_t gateway
Current gateway IP address.
enum mmipal_link_state link_state
State of the link (up/down).
Arguments data structure for mmwlan_boot().