StdPJ/Core/Src/APP/BSP/ug96/ug96.c
/**
  * @brief  Set UART Configuration on the Quectel modem and on STM32.
  * @param  Obj: pointer to module handle
  * @param  pconf: pointer to UART config structure
  * @retval Operation Status.
  */
@brief  Set UART Configuration on the Quectel modem and on STM32.
@param  Obj: pointer to module handle
@param  pconf: pointer to UART config structure
@retval Operation Status.
@brief Set UART Configuration on the Quectel modem and on STM32 . @param Obj : pointer to module handle @param pconf : pointer to UART config structure @retval Operation Status .
UG96_Return_t  UG96_SetUARTBaudrate(Ug96Object_t *Obj, UG96_UARTConfig_t *pconf)
{
  UG96_Return_t ret = UG96_RETURN_ERROR;
  snprintf(CmdString, 17,"AT+IPR=%lu\r\n", pconf->BaudRate);
  ret = (UG96_Return_t) AT_ExecuteCommand(Obj, UG96_TOUT_300, (uint8_t *)CmdString, RET_OK | RET_ERROR);
  Obj->fops.IO_Baudrate(pconf->BaudRate);
  return ret;
}
UG96_Return_t UG96_SetUARTBaudrate ( Ug96Object_t * Obj , UG96_UARTConfig_t * pconf ) { UG96_Return_t ret = UG96_RETURN_ERROR ; snprintf ( CmdString , 17 , " \r \n " , pconf -> BaudRate ) ; ret = ( UG96_Return_t ) AT_ExecuteCommand ( Obj , UG96_TOUT_300 , ( uint8_t * ) CmdString , RET_OK | RET_ERROR ) ; Obj -> fops . IO_Baudrate ( pconf -> BaudRate ) ; return ret ; }
@brief  Set UART Configuration on the Quectel modem and on STM32.
@brief Set UART Configuration on the Quectel modem and on STM32 .
/* change the UART baudrate on UG96 module */ /* change the UART baudrate on STM32 microcontroller accordingly */