X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=inline;f=kern%2Fkfile.h;h=60b0ad64948602502fec65ffa55621dfa546f736;hb=36ba2f39c6edb8358e8395ee346eefb2446e35a9;hp=7d0009f54a3bb4da2f1436f949f0bb93bb8b26ce;hpb=59796a250facf08098c644a5ee3f103be5da36e8;p=bertos.git diff --git a/kern/kfile.h b/kern/kfile.h index 7d0009f5..60b0ad64 100644 --- a/kern/kfile.h +++ b/kern/kfile.h @@ -164,21 +164,6 @@ typedef int (*ErrorFunc_t) (struct KFile *fd); typedef void (*ClearErrFunc_t) (struct KFile *fd); /* \} */ -/** - * KFile type. - * Used at runtime and in debug mode only to check - * "dynamic casts". - * \note Add here new KFile types. - */ -typedef enum KFileType -{ - KFT_GENERIC, ///< Generic - KFT_SERIAL, ///< Serial driver - KFT_BATTFS, ///< BattFS file - KFT_DATAFLASH, ///< Dataflash - KFT_CNT -} KFileType; - /** * Context data for callback functions which operate on * pseudo files. @@ -194,18 +179,13 @@ typedef struct KFile FlushFunc_t flush; ErrorFunc_t error; ClearErrFunc_t clearerr; - DB(KFileType _type); ///< Used to keep trace, at runtime, of obj type. + DB(id_t _type); ///< Used to keep trace, at runtime, of obj type. /* NOTE: these must _NOT_ be size_t on 16bit CPUs! */ uint32_t seek_pos; uint32_t size; } KFile; -/** - * Check if \a fd is a generic KFile type. - */ -#define KFILE_ASSERT_GENERIC(fd) ASSERT(fd->_type == KFT_GENERIC) - /** * Generic implementation of kfile_seek. */