Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SNICInterface mbed-rtos mbed
Fork of murataDemo by
Diff: main.cpp
- Revision:
- 31:c42d189364b4
- Parent:
- 30:de5a32932408
- Child:
- 32:67402fe56150
--- a/main.cpp Thu Apr 02 06:03:05 2015 +0000
+++ b/main.cpp Thu Apr 09 01:28:01 2015 +0000
@@ -35,7 +35,8 @@
C_SNIC_WifiInterface wifi( D1, D0, NC, NC, D3 );
-
+// callback function used by scan()
+// this function will be called on every network scanned
void scanCallbackFn(tagSCAN_RESULT_T *scan_result)
{
printf("\r\n");
@@ -48,7 +49,7 @@
printf("ssid = %s \r\n" ,scan_result->ssid);
}
-
+// main loop
int main()
{
// for built in debug printouts
@@ -130,7 +131,7 @@
status.ssid );
}
- // scan for wifi
+ // scan for wifi, results will be called in callback function
check = wifi.scan(NULL,NULL,scanCallbackFn);
if(check != 0) {
printf("scan failed! \r\n");
