sd.h File Reference
Function library for secure digital memory. More...
#include "cfg/cfg_fat.h"#include <kern/kfile.h>#include <fs/fatfs/diskio.h>Go to the source code of this file.
Defines | |
| #define | sd_disk_initialize disk_initialize |
| Same as sd_disk_status. | |
| #define | sd_disk_status disk_status |
| Return the status of the disk. | |
| #define | sd_disk_read disk_read |
| Read count sectors from SD card. | |
| #define | sd_disk_write disk_write |
| Write count sectors to SD card. | |
| #define | sd_disk_ioctl disk_ioctl |
| Interface to send device independant commands to the device. | |
Functions | |
| bool | sd_init (KFile *_fd) |
| Initializes the SD driver. | |
Detailed Description
Function library for secure digital memory.
Right now, the interface for these function is the one defined in diskio.h from the FatFS module.
Definition in file sd.h.
Define Documentation
| #define sd_disk_initialize disk_initialize |
| #define sd_disk_ioctl disk_ioctl |
| #define sd_disk_read disk_read |
Read count sectors from SD card.
- Parameters:
-
drv The drive number to read from. Only 0 is supported. buf A buffer to store read data. You can get sector size using sd_disk_ioctl. sector Start sector number. count The number of sectors to read.
- Returns:
- RES_OK if the function succeded, RES_ERROR if any error occurred, RES_NOTRDY if the disk is not initialized.
- See also:
- diskio.h
| #define sd_disk_status disk_status |
| #define sd_disk_write disk_write |
Write count sectors to SD card.
- Parameters:
-
drv The drive number to read from. Only 0 is supported. buf The data to be written. sector Start sector number. count The number of sectors to write.
- Returns:
- RES_OK if the function succeded, RES_ERROR if any error occurred, RES_NOTRDY if the disk is not initialized.
- See also:
- diskio.h
