![]() |
NUC472_NUC442_BSP V3.03.003
The Board Support Package for NUC472/NUC442
|

Macros | |
| #define | SD_ENABLE_INT(u32IntMask) |
| Enable specified interrupt. More... | |
| #define | SD_DISABLE_INT(u32IntMask) |
| Disable specified interrupt. More... | |
| #define | SD_GET_INT_FLAG(u32IntMask) |
| Get specified interrupt flag/status. More... | |
| #define | SD_CLR_INT_FLAG(u32IntMask) |
| Clear specified interrupt flag/status. More... | |
| #define | SD_IS_CARD_PRESENT(u32CardNum) |
| Check SD Card inserted or removed. More... | |
| #define | SD_GET_CARD_CAPACITY(u32CardNum) |
| Get SD Card capacity. More... | |
| #define | SD_BLOCK_SIZE 512 |
Functions | |
| void | SD_Open (uint32_t u32CardDetSrc) |
| This function use to reset SD function and select card detection source and pin. More... | |
| void | SD_Probe (uint32_t u32CardNum) |
| This function use to initial SD card. More... | |
| uint32_t | SD_Read (uint32_t u32CardNum, uint8_t *pu8BufAddr, uint32_t u32StartSec, uint32_t u32SecCount) |
| This function use to read data from SD card. More... | |
| uint32_t | SD_Write (uint32_t u32CardNum, uint8_t *pu8BufAddr, uint32_t u32StartSec, uint32_t u32SecCount) |
| This function use to write data to SD card. More... | |
Variables | |
| uint32_t | SD_info_t::CardType |
| uint32_t | SD_info_t::RCA |
| uint8_t | SD_info_t::IsCardInsert |
| struct disk_data_t * | disk_data_t::next |
| unsigned int | disk_data_t::totalSectorN |
| unsigned int | disk_data_t::diskSize |
| int | disk_data_t::sectorSize |
| char | disk_data_t::vendor [STOR_STRING_LEN] |
| char | disk_data_t::product [STOR_STRING_LEN] |
| char | disk_data_t::serial [STOR_STRING_LEN] |
| #define SD_CLR_INT_FLAG | ( | u32IntMask | ) |
Clear specified interrupt flag/status.
| [in] | u32IntMask | Interrupt type mask: SDH_INTSTS_BLKDIF_Msk / SDH_INTSTS_CRCIF_Msk / SDH_INTSTS_CDIF0_Msk / SDH_INTSTS_CDIF1_Msk / SDH_INTSTS_SDHOST0IF_Msk / SDH_INTSTS_SDHOST1IF_Msk / SDH_INTSTS_RTOIF_Msk / SDH_INTSTS_DINTOIF_Msk |
| #define SD_DISABLE_INT | ( | u32IntMask | ) |
Disable specified interrupt.
| [in] | u32IntMask | Interrupt type mask: SDH_INTEN_BLKDIEN_Msk / SDH_INTEN_CRCIEN_Msk / SDH_INTEN_CDIEN0_Msk / SDH_INTEN_CDIEN1_Msk / SDH_INTEN_SDHOST0IEN_Msk / SDH_INTEN_SDHOST1IEN_Msk / SDH_INTEN_RTOIEN_Msk / SDH_INTEN_DITOIEN_Msk / SDH_INTEN_WKIEN_Msk / SDH_INTEN_CDSRC0_Msk / SDH_INTEN_CDSRC1_Msk |
| #define SD_ENABLE_INT | ( | u32IntMask | ) |
Enable specified interrupt.
| [in] | u32IntMask | Interrupt type mask: SDH_INTEN_BLKDIEN_Msk / SDH_INTEN_CRCIEN_Msk / SDH_INTEN_CDIEN0_Msk / SDH_INTEN_CDIEN1_Msk / SDH_INTEN_CDSRC0_Msk / SDH_INTEN_CDSRC1_Msk / SDH_INTEN_RTOIEN_Msk / SDH_INTEN_DITOIEN_Msk / SDH_INTEN_WKIEN_Msk |
| #define SD_GET_CARD_CAPACITY | ( | u32CardNum | ) |
| #define SD_GET_INT_FLAG | ( | u32IntMask | ) |
Get specified interrupt flag/status.
| #define SD_IS_CARD_PRESENT | ( | u32CardNum | ) |
| HIDDEN_SYMBOLS void SD_Open | ( | uint32_t | u32CardDetSrc | ) |
This function use to reset SD function and select card detection source and pin.
| [in] | u32CardDetSrc | Select card detection source from SD0 or SD1. ( SD_PORT0 / SD_PORT1) And also select card detection pin from GPIO or DAT3 pin. ( CardDetect_From_GPIO / CardDetect_From_DAT3) |
| void SD_Probe | ( | uint32_t | u32CardNum | ) |
| uint32_t SD_Read | ( | uint32_t | u32CardNum, |
| uint8_t * | pu8BufAddr, | ||
| uint32_t | u32StartSec, | ||
| uint32_t | u32SecCount | ||
| ) |
| uint32_t SD_Write | ( | uint32_t | u32CardNum, |
| uint8_t * | pu8BufAddr, | ||
| uint32_t | u32StartSec, | ||
| uint32_t | u32SecCount | ||
| ) |
This function use to write data to SD card.
| [in] | u32CardNum | Select card: SD0 or SD1. ( SD_PORT0 / SD_PORT1) |
| [in] | pu8BufAddr | The buffer to send the data to SD card. |
| [in] | u32StartSec | The start write sector address. |
| [in] | u32SecCount | The the write sector number of data. |
| struct disk_data_t* disk_data_t::next |
| char disk_data_t::product[STOR_STRING_LEN] |
| char disk_data_t::serial[STOR_STRING_LEN] |
| char disk_data_t::vendor[STOR_STRING_LEN] |