+ * KFile is a generic interface for file I/O.
+ * Uses an of object oriented model to supply
+ * a generic interface for drivers to communicate.
+ * This module contains only definitions,data structure
+ * and an API.
+ * Each KFile user should implement at least some core functions.
+ * E.G.
+ * If you have a serial driver and want to comply to KFile interface,
+ * you have to declare your context structure:
+ *
+ * \code
+ * typedef struct KFileSerial
+ * {
+ * KFile fd;
+ * Serial *ser;
+ * } KFileSerial;
+ * \endcode
+ *
+ * You should also supply a macro for casting KFile to KFileSerial:
+ *
+ * \code
+ * INLINE KFileSerial * KFILESERIAL(KFile *fd)
+ * {
+ * ASSERT(fd->_type == KFT_SERIAL);
+ * return (KFileSerial *)fd;
+ * }
+ * \endcode
+ *
+ * Then you can implement as much interface functions as you like
+ * and leave the others to NULL.
+ * ser_close implementation example:
+ *
+ * \code
+ * static int ser_kfile_close(struct KFile *fd)
+ * {
+ * KFileSerial *fds = KFILESERIAL(fd);
+ * ser_close(fds->ser);
+ * return 0;
+ * }
+ * \endcode
+ * KFILESERIAL macro helps to ensure that obj passed is really a Serial.
+ *
+ * KFile interface do not supply the open function: this is done deliberately,
+ * because in embedded systems each device has its own init parameters.
+ * For the same reason specific file settings (like baudrate for Serial, for example)
+ * are demanded to specific driver implementation.