1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Added WiFi Udp Implementation

This commit is contained in:
Mimmo La Fauci
2013-02-08 19:22:23 +01:00
parent a0c96bebdd
commit 863b47ad5e
13 changed files with 1510 additions and 1185 deletions

View File

@ -8,7 +8,7 @@ extern "C" {
}
// XXX: don't make assumptions about the value of MAX_SOCK_NUM.
int16_t WiFiClass::_state[MAX_SOCK_NUM] = { 0, 0, 0, 0 };
int16_t WiFiClass::_state[MAX_SOCK_NUM] = { NA_STATE, NA_STATE, NA_STATE, NA_STATE };
uint16_t WiFiClass::_server_port[MAX_SOCK_NUM] = { 0, 0, 0, 0 };
WiFiClass::WiFiClass()
@ -71,8 +71,7 @@ int WiFiClass::begin(char* ssid, uint8_t key_idx, const char *key)
{
delay(WL_DELAY_START_CONNECTION);
status = WiFiDrv::getConnectionStatus();
}
while ((( status == WL_IDLE_STATUS)||(status == WL_SCAN_COMPLETED))&&(--attempts>0));
}while ((( status == WL_IDLE_STATUS)||(status == WL_SCAN_COMPLETED))&&(--attempts>0));
}else{
status = WL_CONNECT_FAILED;
}