StdPJ/Core/Src/APP/BSP/ug96/ug96.c
/**
  * @brief  Register UG96 BusIO external functions.
  * @param  Obj: pointer to module handle
  * @retval Operation Status.
  */
@brief  Register UG96 BusIO external functions.
@param  Obj: pointer to module handle
@retval Operation Status.
@brief Register UG96 BusIO external functions . @param Obj : pointer to module handle @retval Operation Status .
UG96_Return_t  UG96_RegisterBusIO(Ug96Object_t *Obj, IO_Init_Func        IO_Init,
                                                     IO_DeInit_Func      IO_DeInit,
                                                     IO_Baudrate_Func    IO_Baudrate,
                                                     IO_Send_Func        IO_Send,
                                                     IO_ReceiveOne_Func  IO_ReceiveOne,
                                                     IO_Flush_Func       IO_Flush)
{
  if(!Obj || !IO_Init || !IO_DeInit || !IO_Baudrate || !IO_Send || !IO_ReceiveOne || !IO_Flush)
  {
    return UG96_RETURN_ERROR;
  }
  Obj->fops.IO_Init = IO_Init;
  Obj->fops.IO_DeInit = IO_DeInit;
  Obj->fops.IO_Baudrate = IO_Baudrate;
  Obj->fops.IO_Send = IO_Send;
  Obj->fops.IO_ReceiveOne = IO_ReceiveOne;
  Obj->fops.IO_FlushBuffer = IO_Flush;
  return UG96_RETURN_OK;
}
UG96_Return_t UG96_RegisterBusIO ( Ug96Object_t * Obj , IO_Init_Func IO_Init , IO_DeInit_Func IO_DeInit , IO_Baudrate_Func IO_Baudrate , IO_Send_Func IO_Send , IO_ReceiveOne_Func IO_ReceiveOne , IO_Flush_Func IO_Flush ) { if ( ! Obj || ! IO_Init || ! IO_DeInit || ! IO_Baudrate || ! IO_Send || ! IO_ReceiveOne || ! IO_Flush ) { return UG96_RETURN_ERROR ; } Obj -> fops . IO_Init = IO_Init ; Obj -> fops . IO_DeInit = IO_DeInit ; Obj -> fops . IO_Baudrate = IO_Baudrate ; Obj -> fops . IO_Send = IO_Send ; Obj -> fops . IO_ReceiveOne = IO_ReceiveOne ; Obj -> fops . IO_FlushBuffer = IO_Flush ; return UG96_RETURN_OK ; }
@brief  Register UG96 BusIO external functions.
@brief Register UG96 BusIO external functions .