StdPJ/Core/Src/APP/BSP/ug96/ug96.c
/**
  * @brief  Leave a PDP Access point.
  * @param  Obj: pointer to module handle
  * @param  ContextID : range is 1-20 (max three are connected simultaneously)
  * @retval Operation Status.
  */
@brief  Leave a PDP Access point.
@param  Obj: pointer to module handle
@param  ContextID : range is 1-20 (max three are connected simultaneously)
@retval Operation Status.
@brief Leave a PDP Access point . @param Obj : pointer to module handle @param ContextID : range is 1 - 20 ( max three are connected simultaneously ) @retval Operation Status .
UG96_Return_t  UG96_Deactivate(Ug96Object_t *Obj, uint8_t ContextID)
{
  UG96_Return_t ret = UG96_RETURN_ERROR;
  snprintf(CmdString, 24,"AT+QIDEACT=%d\r\n", ContextID);
  ret = (UG96_Return_t) AT_ExecuteCommand(Obj, UG96_TOUT_40000, (uint8_t *)CmdString, RET_OK | RET_ERROR);
  if(ret == UG96_RETURN_OK)
  {
     Obj->APContextState[ContextID-1] = UG96_AP_CONFIGURED;
     Obj->APsActive--;
  }
#ifdef UG96_DBG
  printf("                UG96_Deactivate() PDP Access point, ret value: %d \n", ret);
#endif
  return ret;
}
UG96_Return_t UG96_Deactivate ( Ug96Object_t * Obj , uint8_t ContextID ) { UG96_Return_t ret = UG96_RETURN_ERROR ; snprintf ( CmdString , 24 , " \r \n " , ContextID ) ; ret = ( UG96_Return_t ) AT_ExecuteCommand ( Obj , UG96_TOUT_40000 , ( uint8_t * ) CmdString , RET_OK | RET_ERROR ) ; if ( ret == UG96_RETURN_OK ) { Obj -> APContextState [ ContextID - 1 ] = UG96_AP_CONFIGURED ; Obj -> APsActive -- ; } #ifdef UG96_DBG printf ( " \n " , ret ) ; #endif return ret ; }
@brief  Leave a PDP Access point.
@brief Leave a PDP Access point .