X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fft245rl.h;fp=bertos%2Fdrv%2Fft245rl.h;h=e120ab9c75a140d190da63d642b3808df7c3f1cd;hb=3fc368beb46bbaea22335bf33f323117c47e537b;hp=0000000000000000000000000000000000000000;hpb=ccaca950d9bd8ad38f7cbeae9d8b3e89783a25d8;p=bertos.git diff --git a/bertos/drv/ft245rl.h b/bertos/drv/ft245rl.h new file mode 100644 index 00000000..e120ab9c --- /dev/null +++ b/bertos/drv/ft245rl.h @@ -0,0 +1,72 @@ +/** + * \file + * + * + * \brief Function library for Accessing FT245RL USB interface. + * + * + * \version $Id$ + * \author Francesco Sacchi + */ + + +#ifndef DRV_FT245RL_H +#define DRV_FT245RL_H + +#include +#include + +/** + * ID for FT245RL KFiles. + */ +#define KFT_FT245RL MAKE_ID('F', '2', '4', '5') + +/** + * Ft245rl KFile context structure. + */ +typedef struct Ft245rl +{ + KFile fd; ///< File descriptor. +} Ft245rl; + + +/** + * Convert + ASSERT from generic KFile to KFileFt245rl. + */ +INLINE Ft245rl * FT245RL(KFile *fd) +{ + ASSERT(fd->_type == KFT_FT245RL); + return (Ft245rl *)fd; +} + +void ft245rl_init(Ft245rl *fd); + +#endif /* DRV_FT245RL_H */