mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2025-07-31 12:41:06 +00:00
update
This commit is contained in:
parent
ad9b495d7e
commit
494a7e1b39
31 changed files with 391 additions and 851 deletions
|
|
@ -33,6 +33,7 @@ SD_RESULT SD_Init() {
|
|||
if (sdio_sd_init() != 0) result = SD_INITERR;
|
||||
else {
|
||||
if (sdio_sd_getProtection() != 0) result = SD_PROTECTED;
|
||||
RtlInitSema(&sdWSema, 0);
|
||||
sdio_sd_hook_xfer_cmp_cb(sd_xfer_done_callback, 0);
|
||||
sdio_sd_hook_xfer_err_cb(sd_xfer_err_callback, 0);
|
||||
}
|
||||
|
|
@ -63,6 +64,7 @@ SD_RESULT SD_SetCLK(SD_CLK CLK) {
|
|||
result = sdio_sd_setClock(SD_CLK_5_2MHZ);
|
||||
break;
|
||||
default:
|
||||
// DBG_SDIO_INFO("clk = %d ?\n", CLK);
|
||||
return SD_ERROR;
|
||||
}
|
||||
if(result) return SD_ERROR;
|
||||
|
|
@ -72,8 +74,7 @@ SD_RESULT SD_SetCLK(SD_CLK CLK) {
|
|||
//----- SD_Status
|
||||
SD_RESULT SD_Status() {
|
||||
if (sdio_sd_isReady()) return SD_NODISK;
|
||||
else if (sdio_sd_getProtection()) return SD_PROTECTED;
|
||||
else return SD_OK;
|
||||
else return sdio_sd_getProtection() != 0;
|
||||
}
|
||||
|
||||
//----- SD_GetCID
|
||||
|
|
@ -121,7 +122,7 @@ SD_RESULT SD_ReadBlocks(u32 sector, u8 *data, u32 count) {
|
|||
if (rd_count) return SD_ERROR;
|
||||
return SD_OK;
|
||||
} else {
|
||||
if (sdio_read_blocks(sector, buf, count) == 0) {
|
||||
if (sdio_read_blocks(sector, data, count) == 0) {
|
||||
if (RtlDownSemaWithTimeout(&sdWSema, 1000) == 1) return SD_OK;
|
||||
DBG_SDIO_ERR("SD_ReadBlocks timeout\n");
|
||||
}
|
||||
|
|
@ -153,7 +154,7 @@ SD_RESULT SD_WriteBlocks(u32 sector, const u8 *data, u32 count) {
|
|||
vPortFree(buf);
|
||||
if (wr_count == 0)
|
||||
return SD_OK;
|
||||
} else if (sdio_write_blocks(sector, buf, count) == 0) {
|
||||
} else if (sdio_write_blocks(sector, data, count) == 0) {
|
||||
if (RtlDownSemaWithTimeout(&sdWSema, 1000) == 1)
|
||||
return SD_OK;
|
||||
DBG_SDIO_ERR("SD_WriteBlocks timeout\n");
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ s8 sdio_read_blocks(u32 sector, u8 *buffer, u32 count) {
|
|||
SdioHostAdapter.AdmaDescTbl = gAdmaTbls;
|
||||
}
|
||||
HAL_Status result = HalSdioHostOp.HalSdioHostReadBlocksDma(&SdioHostAdapter,
|
||||
(uint64) sector * SIZE_BLOCK_ADMA, count);
|
||||
(unsigned long long) sector * SIZE_BLOCK_ADMA, count);
|
||||
if (result) {
|
||||
DBG_SDIO_ERR("sdio_read_blocks fail(0x%02x)\n", result);
|
||||
return -1;
|
||||
|
|
@ -205,8 +205,8 @@ s8 sdio_write_blocks(uint32_t sector, const uint8_t *buffer, uint32_t count) {
|
|||
}
|
||||
SdioHostAdapter.AdmaDescTbl = gAdmaTbls;
|
||||
}
|
||||
HAL_Status result = HalSdioHostOp.HalSdioHostWriteBlocksDma(
|
||||
&SdioHostAdapter, (uint64) sector * SIZE_BLOCK_ADMA, count);
|
||||
HAL_Status result = HalSdioHostOp.HalSdioHostWriteBlocksDma(&SdioHostAdapter,
|
||||
(unsigned long long) sector * SIZE_BLOCK_ADMA, count);
|
||||
if (result) {
|
||||
DBG_SDIO_ERR("write fail(0x%02x)\n", result);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -33,39 +33,39 @@
|
|||
#define _drv_debug_ 10
|
||||
|
||||
|
||||
#define _module_rtl871x_xmit_c_ BIT(0)
|
||||
#define _module_xmit_osdep_c_ BIT(1)
|
||||
#define _module_rtl871x_recv_c_ BIT(2)
|
||||
#define _module_recv_osdep_c_ BIT(3)
|
||||
#define _module_rtl871x_mlme_c_ BIT(4)
|
||||
#define _module_mlme_osdep_c_ BIT(5)
|
||||
#define _module_rtl871x_xmit_c_ BIT(0)
|
||||
#define _module_xmit_osdep_c_ BIT(1)
|
||||
#define _module_rtl871x_recv_c_ BIT(2)
|
||||
#define _module_recv_osdep_c_ BIT(3)
|
||||
#define _module_rtl871x_mlme_c_ BIT(4)
|
||||
#define _module_mlme_osdep_c_ BIT(5)
|
||||
#define _module_rtl871x_sta_mgt_c_ BIT(6)
|
||||
#define _module_rtl871x_cmd_c_ BIT(7)
|
||||
#define _module_cmd_osdep_c_ BIT(8)
|
||||
#define _module_rtl871x_io_c_ BIT(9)
|
||||
#define _module_io_osdep_c_ BIT(10)
|
||||
#define _module_os_intfs_c_ BIT(11)
|
||||
#define _module_cmd_osdep_c_ BIT(8)
|
||||
#define _module_rtl871x_io_c_ BIT(9)
|
||||
#define _module_io_osdep_c_ BIT(10)
|
||||
#define _module_os_intfs_c_ BIT(11)
|
||||
#define _module_rtl871x_security_c_ BIT(12)
|
||||
#define _module_rtl871x_eeprom_c_ BIT(13)
|
||||
#define _module_hal_init_c_ BIT(14)
|
||||
#define _module_hci_hal_init_c_ BIT(15)
|
||||
#define _module_rtl871x_eeprom_c_ BIT(13)
|
||||
#define _module_hal_init_c_ BIT(14)
|
||||
#define _module_hci_hal_init_c_ BIT(15)
|
||||
#define _module_rtl871x_ioctl_c_ BIT(16)
|
||||
#define _module_rtl871x_ioctl_set_c_ BIT(17)
|
||||
#define _module_rtl871x_ioctl_set_c_ BIT(17)
|
||||
#define _module_rtl871x_ioctl_query_c_ BIT(18)
|
||||
#define _module_rtl871x_pwrctrl_c_ BIT(19)
|
||||
#define _module_rtl871x_pwrctrl_c_ BIT(19)
|
||||
#define _module_hci_intfs_c_ BIT(20)
|
||||
#define _module_hci_ops_c_ BIT(21)
|
||||
#define _module_osdep_service_c_ BIT(22)
|
||||
#define _module_mp_ BIT(23)
|
||||
#define _module_hci_ops_c_ BIT(21)
|
||||
#define _module_osdep_service_c_ BIT(22)
|
||||
#define _module_mp_ BIT(23)
|
||||
#define _module_hci_ops_os_c_ BIT(24)
|
||||
#define _module_rtl871x_ioctl_os_c BIT(25)
|
||||
#define _module_rtl8712_cmd_c_ BIT(26)
|
||||
#define _module_fwcmd_c_ BIT(27)
|
||||
#define _module_rtl8192c_xmit_c_ BIT(28)
|
||||
#define _module_hal_xmit_c_ BIT(28)
|
||||
#define _module_efuse_ BIT(29)
|
||||
#define _module_rtl8712_recv_c_ BIT(30)
|
||||
#define _module_rtl8712_led_c_ BIT(31)
|
||||
#define _module_rtl8712_cmd_c_ BIT(26)
|
||||
#define _module_fwcmd_c_ BIT(27)
|
||||
#define _module_rtl8192c_xmit_c_ BIT(28)
|
||||
#define _module_hal_xmit_c_ BIT(28)
|
||||
#define _module_efuse_ BIT(29)
|
||||
#define _module_rtl8712_recv_c_ BIT(30)
|
||||
#define _module_rtl8712_led_c_ BIT(31)
|
||||
|
||||
#undef _MODULE_DEFINE_
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue