software/drivers/sd8887/src/wlan/mlinux/moal_sdio_mmc.c
/**
 *  @brief This function reads data from card register
 *
 *  @param handle   A Pointer to the moal_handle structure
 *  @param reg      Register offset
 *  @param data     Value
 *
 *  @return         MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 */
@brief This function reads data from card register
@param handle   A Pointer to the moal_handle structure
@param reg      Register offset
@param data     Value


@brief This function reads data from card register @param handle A Pointer to the moal_handle structure @param reg Register offset @param data Value
mlan_status
woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
{
	mlan_status ret = MLAN_STATUS_FAILURE;
	t_u8 val;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)
	sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func);
#endif
	val = sdio_readb(((struct sdio_mmc_card *)handle->card)->func, reg,
			 (int *)&ret);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)
	sdio_release_host(((struct sdio_mmc_card *)handle->card)->func);
#endif
	*data = val;
	return ret;
}
mlan_status woal_sdio_readb ( moal_handle * handle , t_u32 reg , t_u8 * data ) { mlan_status ret = MLAN_STATUS_FAILURE ; t_u8 val ; #if LINUX_VERSION_CODE >= KERNEL_VERSION ( 2 , 6 , 32 ) sdio_claim_host ( ( ( struct sdio_mmc_card * ) handle -> card ) -> func ) ; #endif val = sdio_readb ( ( ( struct sdio_mmc_card * ) handle -> card ) -> func , reg , ( int * ) & ret ) ; #if LINUX_VERSION_CODE >= KERNEL_VERSION ( 2 , 6 , 32 ) sdio_release_host ( ( ( struct sdio_mmc_card * ) handle -> card ) -> func ) ; #endif * data = val ; return ret ; }
@brief This function reads data from card register
  @param handle   A Pointer to the moal_handle structure
  @param reg      Register offset
  @param data     Value
@brief This function reads data from card register @param handle A Pointer to the moal_handle structure @param reg Register offset @param data Value