KugleFirmware/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c
/**
  * @brief  Fast Take a semaphore with 1 Step mode. 
  * @param  SemID: semaphore ID from 0 to 31    
  * @retval HAL status
*/
@brief  Fast Take a semaphore with 1 Step mode.
@param  SemID: semaphore ID from 0 to 31
@retval HAL status
@brief Fast Take a semaphore with 1 Step mode . @param SemID : semaphore ID from 0 to 31 @retval HAL status
HAL_StatusTypeDef HAL_HSEM_FastTake(uint32_t SemID)
{     
  assert_param(IS_HSEM_SEMID(SemID));
  if(HSEM->RLR[SemID] == (((HAL_GetCurrentCPUID() << POSITION_VAL(HSEM_R_MASTERID)) & HSEM_RLR_MASTERID) | HSEM_RLR_LOCK))
  {
    return HAL_OK;
  }
  return HAL_ERROR;  
}
HAL_StatusTypeDef HAL_HSEM_FastTake ( uint32_t SemID ) { assert_param ( IS_HSEM_SEMID ( SemID ) ) ; if ( HSEM -> RLR [ SemID ] == ( ( ( HAL_GetCurrentCPUID ( ) << POSITION_VAL ( HSEM_R_MASTERID ) ) & HSEM_RLR_MASTERID ) | HSEM_RLR_LOCK ) ) { return HAL_OK ; } return HAL_ERROR ; }
@brief  Fast Take a semaphore with 1 Step mode.
@brief Fast Take a semaphore with 1 Step mode .
/* Check the parameters */ /* Read the RLR register to take the semaphore */ /*take success when MasterID match and take bit set*/ /* Semaphore take fails */