WINC1500 Mode Change Example.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include "main.h"
#include "driver/include/m2m_wifi.h"
#include "driver/source/nmasic.h"
Macros | |
#define | DELAY_FOR_MODE_CHANGE (500) |
#define | HOLD_TIME_IN_MODE (30000) |
#define | STRING_EOL "\r\n" |
#define | STRING_HEADER |
Functions | |
static void | configure_console (void) |
Configure UART console. More... | |
static int8_t | enable_disable_ap_mode (void) |
AP mode. More... | |
int | main (void) |
Main application function. More... | |
Variables | |
static struct usart_module | cdc_uart_module |
UART module for debug. More... | |
#define DELAY_FOR_MODE_CHANGE (500) |
Referenced by main().
#define HOLD_TIME_IN_MODE (30000) |
Referenced by enable_disable_ap_mode().
#define STRING_EOL "\r\n" |
#define STRING_HEADER |
Referenced by main().
|
static |
Configure UART console.
References usart_config::baudrate, cdc_uart_module, EDBG_CDC_MODULE, EDBG_CDC_SERCOM_MUX_SETTING, EDBG_CDC_SERCOM_PINMUX_PAD0, EDBG_CDC_SERCOM_PINMUX_PAD1, EDBG_CDC_SERCOM_PINMUX_PAD2, EDBG_CDC_SERCOM_PINMUX_PAD3, usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, usart_enable(), and usart_get_config_defaults().
Referenced by main().
|
static |
AP mode.
Initializes the AP mode for a while and terminate.
References tstrM2MAPConfig::au8DHCPServerIP, tstrM2MAPConfig::au8SSID, HOLD_TIME_IN_MODE, M2M_SUCCESS, m2m_wifi_disable_ap(), m2m_wifi_enable_ap(), MAIN_WLAN_AP_CHANNEL, MAIN_WLAN_AUTH, MAIN_WLAN_SSID, nm_bsp_sleep(), tstrM2MAPConfig::u8ListenChannel, and tstrM2MAPConfig::u8SecType.
Referenced by main().
int main | ( | void | ) |
Main application function.
Application entry point.
Station mode. Device started as station mode basically.
AP mode. On and off AP mode.
References configure_console(), DELAY_FOR_MODE_CHANGE, enable_disable_ap_mode(), M2M_SUCCESS, m2m_wifi_init(), nm_bsp_init(), nm_bsp_sleep(), STRING_HEADER, and system_init().
|
static |
UART module for debug.
Referenced by configure_console().