/* Check whether the module is connected to an access point.  */
uint8_t ES_WIFI_IsConnected(ES_WIFIObject_t *Obj)
/* Check whether the module is connected to an access point.  */
uint8_t ES_WIFI_IsConnected(ES_WIFIObject_t *Obj)
{
  ES_WIFI_Status_t ret ;
  LOCK_WIFI();
  sprintf((char*)Obj->CmdData,"CS\r");
  ret = AT_ExecuteCommand(Obj, Obj->CmdData, Obj->CmdData);
  if(ret == ES_WIFI_STATUS_OK)
  {
    AT_ParseIsConnected((char *)Obj->CmdData, &(Obj->NetSettings.IsConnected));
  }
  UNLOCK_WIFI();
  return Obj->NetSettings.IsConnected;
}