X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fio%2Fkfile_block.h;h=130add3abf3377bccba143f43546a07033016664;hb=63986411c74bebcda2a19e61a49ad0b0d933aaf7;hp=9694ea94c5c97cf4b1b527f66427acca65156068;hpb=0142058531b1f00b0dbe740b43900dfc361656e5;p=bertos.git diff --git a/bertos/io/kfile_block.h b/bertos/io/kfile_block.h index 9694ea94..130add3a 100644 --- a/bertos/io/kfile_block.h +++ b/bertos/io/kfile_block.h @@ -32,6 +32,9 @@ * * \brief KFile interface over a KBlock. * + * With this module, you can access a KBlock device + * with the handy KFile interface. + * In order to achieve this, the block device must support partial block write. */ #ifndef IO_KFILE_BLOCK_H @@ -41,12 +44,25 @@ #include #include +/** + * KFileBlock context. + */ typedef struct KFileBlock { - KFile fd; - KBlock *b; + KFile fd; ///< KFile context + KBlock *blk; ///< KBlock device } KFileBlock; -void kfileblock_init(KFileBlock *fb, KBlock *b); +/** + * Init a KFile over KBlock. + * After this you can access your KBlock device with a handy KFile interface. + * + * \note The block device must support partial block write in order support + * random write access. + * + * \param fb KFileBlock context. + * \param blk block device to be accessed with a KFile interface. + */ +void kfileblock_init(KFileBlock *fb, KBlock *blk); #endif /* IO_KFILE_KBLOCK_H */