![]()  | 
  
    MCUXpresso SDK API Reference Manual
    Rev. 0
    
   NXP Semiconductors 
   | 
 
SD Disk Function | |
| DSTATUS | sd_disk_initialize (uint8_t physicalDrive) | 
| Initializes SD disk.  More... | |
| DSTATUS | sd_disk_status (uint8_t physicalDrive) | 
| Gets SD disk status.  More... | |
| DRESULT | sd_disk_read (uint8_t physicalDrive, uint8_t *buffer, uint32_t sector, uint8_t count) | 
| Reads SD disk.  More... | |
| DRESULT | sd_disk_write (uint8_t physicalDrive, const uint8_t *buffer, uint32_t sector, uint8_t count) | 
| Writes SD disk.  More... | |
| DRESULT | sd_disk_ioctl (uint8_t physicalDrive, uint8_t command, void *buffer) | 
| SD disk IO operation.  More... | |
SD over SPI Disk Function | |
| DSTATUS | sdspi_disk_initialize (uint8_t physicalDrive) | 
| Initializes SD disk over SPI.  More... | |
| DSTATUS | sdspi_disk_status (uint8_t physicalDrive) | 
| Gets SD over SPI disk status.  More... | |
| DRESULT | sdspi_disk_read (uint8_t physicalDrive, uint8_t *buffer, uint32_t sector, uint8_t count) | 
| Reads SD disk over SPI.  More... | |
| DRESULT | sdspi_disk_write (uint8_t physicalDrive, const uint8_t *buffer, uint32_t sector, uint8_t count) | 
| Writes to SD disk over SPI.  More... | |
| DRESULT | sdspi_disk_ioctl (uint8_t physicalDrive, uint8_t command, void *buffer) | 
| SD over SPI disk IO operation.  More... | |
| void | spi_init (void) | 
| Initializes the SPI.  | |
| status_t | spi_set_frequency (uint32_t frequency) | 
| Sets the SPI bus frequency.  More... | |
| status_t | spi_exchange (uint8_t *in, uint8_t *out, uint32_t size) | 
| Transfers data over SPI bus in full-duplex way.  More... | |
| void | timer_init (void) | 
| Initializes the timer to generator 1ms interrupt used to get current time in milliseconds.  | |
| uint32_t | timer_get_current_milliseconds (void) | 
| Gets current time in milliseconds.  More... | |
| void | sdspi_host_init (void) | 
| Initializes the host descriptor.  | |
| DSTATUS sd_disk_initialize | ( | uint8_t | physicalDrive | ) | 
| physicalDrive | Physical drive number. | 
| STA_NOINIT | Failed. | 
| RES_OK | Success. | 
| DSTATUS sd_disk_status | ( | uint8_t | physicalDrive | ) | 
| physicalDrive | Physical drive number. | 
| STA_NOINIT | Failed. | 
| RES_OK | Success. | 
| DRESULT sd_disk_read | ( | uint8_t | physicalDrive, | 
| uint8_t * | buffer, | ||
| uint32_t | sector, | ||
| uint8_t | count | ||
| ) | 
| physicalDrive | Physical drive number. | 
| buffer | The data buffer pointer to store read content. | 
| sector | The start sector number to be read. | 
| count | The sector count to be read. | 
| RES_PARERR | Failed. | 
| RES_OK | Success. | 
| DRESULT sd_disk_write | ( | uint8_t | physicalDrive, | 
| const uint8_t * | buffer, | ||
| uint32_t | sector, | ||
| uint8_t | count | ||
| ) | 
| physicalDrive | Physical drive number. | 
| buffer | The data buffer pointer to store write content. | 
| sector | The start sector number to be written. | 
| count | The sector count to be written. | 
| RES_PARERR | Failed. | 
| RES_OK | Success. | 
| DRESULT sd_disk_ioctl | ( | uint8_t | physicalDrive, | 
| uint8_t | command, | ||
| void * | buffer | ||
| ) | 
| physicalDrive | Physical drive number. | 
| command | The command to be set. | 
| buffer | The buffer to store command result. | 
| RES_PARERR | Failed. | 
| RES_OK | Success. | 
| DSTATUS sdspi_disk_initialize | ( | uint8_t | physicalDrive | ) | 
| physicalDrive | Physical drive number. | 
| STA_NOINIT | Failed. | 
| RES_OK | Success. | 
| DSTATUS sdspi_disk_status | ( | uint8_t | physicalDrive | ) | 
| physicalDrive | Physical drive number. | 
| STA_NOINIT | Failed. | 
| RES_OK | Success. | 
| DRESULT sdspi_disk_read | ( | uint8_t | physicalDrive, | 
| uint8_t * | buffer, | ||
| uint32_t | sector, | ||
| uint8_t | count | ||
| ) | 
| physicalDrive | Physical drive number. | 
| buffer | The data buffer pointer to store read content. | 
| sector | The start sector number to be read. | 
| count | The sector count to be read. | 
| RES_PARERR | Failed. | 
| RES_OK | Success. | 
| DRESULT sdspi_disk_write | ( | uint8_t | physicalDrive, | 
| const uint8_t * | buffer, | ||
| uint32_t | sector, | ||
| uint8_t | count | ||
| ) | 
| physicalDrive | Physical drive number. | 
| buffer | The data buffer pointer to store write content. | 
| sector | The start sector number to be written. | 
| count | The sector count to be written. | 
| RES_PARERR | Failed. | 
| RES_OK | Success. | 
| DRESULT sdspi_disk_ioctl | ( | uint8_t | physicalDrive, | 
| uint8_t | command, | ||
| void * | buffer | ||
| ) | 
| physicalDrive | Physical drive number. | 
| command | The command to be set. | 
| buffer | The buffer to store command result. | 
| RES_PARERR | Failed. | 
| RES_OK | Success. | 
| status_t spi_set_frequency | ( | uint32_t | frequency | ) | 
| frequency | The frequency to set. | 
| kStatus_Success | Success. | 
| kStatus_Fail | Failed. | 
| status_t spi_exchange | ( | uint8_t * | in, | 
| uint8_t * | out, | ||
| uint32_t | size | ||
| ) | 
| in | The buffer to save the data to be sent. | 
| out | The buffer to save the data to be read. | 
| size | The transfer data size. | 
| uint32_t timer_get_current_milliseconds | ( | void | ) |