Exemplo n.º 1
0
static void wlan_callback(void* user_data, VM_WLAN_REQUEST_RESULT result_type)
{
    vm_log_debug("wlan result:%d", result_type);
    if(VM_WLAN_REQUEST_DONE == result_type)
    {
        g_wlan_job_id = vm_wlan_scan(wlan_scan_callback, NULL);
    }
}
Exemplo n.º 2
0
  static boolean mmiCall(void *userData)
  {
    LWiFiScanContext *pContext = (LWiFiScanContext*)userData;
    const VMINT job = vm_wlan_scan(&scanCallback, pContext);
    vm_log_info("vm_wlan_scan ret=%d", job);
    if (job > 0)
    {
      // started scan,
      // let Arduino thread wait for signal.
      return false;
    }
    else
    {
      // failed to scan, post signal to continue;
      // return true;
      return false;
    }

  }