Microchip® Advanced Software Framework

common/components/wifi/winc3400/time_client_example/main.c File Reference

WINC3400 Time Client Example.

Copyright (c) 2017-2019 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "main.h"
#include <string.h>
#include "bsp/include/nm_bsp.h"
#include "driver/include/m2m_wifi.h"
#include "socket/include/socket.h"

Macros

#define STRING_EOL   "\r\n"
 
#define STRING_HEADER
 

Functions

static void configure_console (void)
 Configure UART console. More...
 
int main (void)
 Main application function. More...
 
static void wifi_cb (uint8_t u8MsgType, void *pvMsg)
 Callback to get the Wi-Fi status update. More...
 

Variables

static bool gbConnectedWifi = false
 Wi-Fi status variable. More...
 

#define STRING_EOL   "\r\n"
#define STRING_HEADER
Value:
"-- WINC3400 time client example --"STRING_EOL \
"-- "BOARD_NAME " --"STRING_EOL \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define BOARD_NAME
Definition: fatfs_access_example.c:112
#define STRING_EOL
Definition: common/components/wifi/winc3400/time_client_example/main.c:97

Referenced by main().

static void configure_console ( void  )
static

Configure UART console.

References uart_rs232_options::baudrate, stdio_serial_init(), and sysclk_enable_peripheral_clock().

Referenced by main().

int main ( void  )
static void wifi_cb ( uint8_t  u8MsgType,
void *  pvMsg 
)
static

Callback to get the Wi-Fi status update.

Parameters
[in]u8MsgTypeType of Wi-Fi notification.
[in]pvMsgA pointer to a buffer containing the notification parameters.

References gbConnectedWifi, M2M_WIFI_CH_ALL, m2m_wifi_connect(), M2M_WIFI_CONNECTED, M2M_WIFI_DISCONNECTED, M2M_WIFI_REQ_DHCP_CONF, M2M_WIFI_RESP_CON_STATE_CHANGED, M2M_WIFI_RESP_GET_SYS_TIME, MAIN_WLAN_AUTH, MAIN_WLAN_PSK, MAIN_WLAN_SSID, tstrM2mWifiStateChanged::u8CurrState, tstrSystemTime::u8Hour, tstrSystemTime::u8Minute, and tstrSystemTime::u8Second.

Referenced by main().

bool gbConnectedWifi = false
static

Wi-Fi status variable.

Referenced by wifi_cb().