0
\$\begingroup\$

I am using PMM240 to manage RRC2054-2 battery, it is based on SMbus, I have questions about how to make sure the command is complete, I noticed there are library functions HAL_SMBUS_MasterTxCpltCallback(),....HAL_SMBUS_ListenCpltCallback and HAL_SMBUS_ErrorCallback(). from my understanding, I use HAL_SMBUS_Master_Transmit_IT() first, then I use HAL_SMBUS_MasterTxCpltCallback() to make sure the transfer is complete? but how? another question is how could I confirm the sending is complete and right? shall I receive it back and compare?

     __weak void HAL_SMBUS_MasterTxCpltCallback(SMBUS_HandleTypeDef *hsmbus)
{
  /* Prevent unused argument(s) compilation warning */
  UNUSED(hsmbus);

  /* NOTE : This function should not be modified, when the callback is needed,
            the HAL_SMBUS_MasterTxCpltCallback() could be implemented in the user file
   */
}
HAL_SMBUS_MasterTxCpltCallback
Function Name void HAL_SMBUS_MasterTxCpltCallback
(SMBUS_HandleTypeDef * hsmbus)
Function Description Master Tx Transfer completed callback.
Parameters  hsmbus: : Pointer to a SMBUS_HandleTypeDef structure
that contains the configuration information for the specified
SMBUS.
Return values  None: 
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.