Use AzureRTOS ThreadX
This commit is contained in:
@ -584,6 +584,9 @@ HAL_StatusTypeDef HAL_SMBUS_ConfigDigitalFilter(SMBUS_HandleTypeDef *hsmbus, uin
|
||||
/**
|
||||
* @brief Register a User SMBUS Callback
|
||||
* To be used instead of the weak predefined callback
|
||||
* @note The HAL_SMBUS_RegisterCallback() may be called before HAL_SMBUS_Init() in
|
||||
* HAL_SMBUS_STATE_RESET to register callbacks for HAL_SMBUS_MSPINIT_CB_ID and
|
||||
* HAL_SMBUS_MSPDEINIT_CB_ID.
|
||||
* @param hsmbus Pointer to a SMBUS_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified SMBUS.
|
||||
* @param CallbackID ID of the callback to be registered
|
||||
@ -613,9 +616,6 @@ HAL_StatusTypeDef HAL_SMBUS_RegisterCallback(SMBUS_HandleTypeDef *hsmbus,
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hsmbus);
|
||||
|
||||
if (HAL_SMBUS_STATE_READY == hsmbus->State)
|
||||
{
|
||||
switch (CallbackID)
|
||||
@ -691,14 +691,15 @@ HAL_StatusTypeDef HAL_SMBUS_RegisterCallback(SMBUS_HandleTypeDef *hsmbus,
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Release Lock */
|
||||
__HAL_UNLOCK(hsmbus);
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister an SMBUS Callback
|
||||
* SMBUS callback is redirected to the weak predefined callback
|
||||
* @note The HAL_SMBUS_UnRegisterCallback() may be called before HAL_SMBUS_Init() in
|
||||
* HAL_SMBUS_STATE_RESET to un-register callbacks for HAL_SMBUS_MSPINIT_CB_ID and
|
||||
* HAL_SMBUS_MSPDEINIT_CB_ID
|
||||
* @param hsmbus Pointer to a SMBUS_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified SMBUS.
|
||||
* @param CallbackID ID of the callback to be unregistered
|
||||
@ -719,9 +720,6 @@ HAL_StatusTypeDef HAL_SMBUS_UnRegisterCallback(SMBUS_HandleTypeDef *hsmbus,
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hsmbus);
|
||||
|
||||
if (HAL_SMBUS_STATE_READY == hsmbus->State)
|
||||
{
|
||||
switch (CallbackID)
|
||||
@ -797,8 +795,6 @@ HAL_StatusTypeDef HAL_SMBUS_UnRegisterCallback(SMBUS_HandleTypeDef *hsmbus,
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Release Lock */
|
||||
__HAL_UNLOCK(hsmbus);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -822,8 +818,6 @@ HAL_StatusTypeDef HAL_SMBUS_RegisterAddrCallback(SMBUS_HandleTypeDef *hsmbus,
|
||||
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hsmbus);
|
||||
|
||||
if (HAL_SMBUS_STATE_READY == hsmbus->State)
|
||||
{
|
||||
@ -838,8 +832,6 @@ HAL_StatusTypeDef HAL_SMBUS_RegisterAddrCallback(SMBUS_HandleTypeDef *hsmbus,
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Release Lock */
|
||||
__HAL_UNLOCK(hsmbus);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -854,9 +846,6 @@ HAL_StatusTypeDef HAL_SMBUS_UnRegisterAddrCallback(SMBUS_HandleTypeDef *hsmbus)
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hsmbus);
|
||||
|
||||
if (HAL_SMBUS_STATE_READY == hsmbus->State)
|
||||
{
|
||||
hsmbus->AddrCallback = HAL_SMBUS_AddrCallback; /* Legacy weak AddrCallback */
|
||||
@ -870,8 +859,6 @@ HAL_StatusTypeDef HAL_SMBUS_UnRegisterAddrCallback(SMBUS_HandleTypeDef *hsmbus)
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Release Lock */
|
||||
__HAL_UNLOCK(hsmbus);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user