X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fsd.h;h=22a19d1e7d09322be23dc605caf16d58085fbe11;hb=cf02bef1e97d5c7c7b62986a5d47120de46c05db;hp=368e0d4fff975d6d375257004ed01c1f2f3e4fca;hpb=dbc93a323bf913a9f5422b93ac59b828819a97db;p=bertos.git diff --git a/bertos/drv/sd.h b/bertos/drv/sd.h index 368e0d4f..22a19d1e 100644 --- a/bertos/drv/sd.h +++ b/bertos/drv/sd.h @@ -31,13 +31,11 @@ * * \brief Function library for secure digital memory. * - * Right now, the interface for these function is the one defined in diskio.h from - * the FatFS module. * * \author Francesco Sacchi * * $WIZ$ module_name = "sd" - * $WIZ$ module_depends = "kfile", "timer" + * $WIZ$ module_depends = "kfile", "timer", "kblock" * $WIZ$ module_hw = "bertos/hw/hw_sd.h" * $WIZ$ module_configuration = "bertos/cfg/cfg_sd.h" */ @@ -53,12 +51,15 @@ #include "cfg/cfg_sd.h" - +/** + * SD Card context structure. + */ typedef struct Sd { - KBlock b; + KBlock b; ///< KBlock base class KFile *ch; ///< SPI communication channel - uint16_t r1; + uint16_t r1; ///< Last status data received from SD + uint16_t tranfer_len; ///< Lenght for the read/write commands, cached in order to increase speed. } Sd; bool sd_initUnbuf(Sd *sd, KFile *ch); @@ -79,6 +80,8 @@ bool sd_initBuf(Sd *sd, KFile *ch); * * \note This API is deprecated, disable CONFIG_SD_OLD_INIT and * use the new one instead. + * + * \see CONFIG_SD_OLD_INIT. */ #define sd_init(ch) {static struct Sd sd; sd_initUnbuf(&sd, (ch));}