BeRTOS
usbser.h
Go to the documentation of this file.
00001 
00046 #ifndef USBSER_H
00047 #define USBSER_H
00048 
00049 #include <io/kfile.h>
00050 
00051 typedef uint32_t usbser_status_t;
00052 
00053 typedef struct USBSerial
00054 {
00056         KFile fd;
00058         unsigned int unit;
00059 #ifdef _DEBUG
00060 
00061         bool is_open;
00062 #endif
00063 
00064         usbser_status_t status;
00065 } USBSerial;
00066 
00070 #define KFT_USB_SERIAL MAKE_ID('U', 'S', 'B', 'S')
00071 
00072 INLINE USBSerial *USB_SERIAL_CAST(KFile *fd)
00073 {
00074         ASSERT(fd->_type == KFT_USB_SERIAL);
00075         return (USBSerial *)fd;
00076 }
00077 
00078 int usbser_init(struct USBSerial *fds, int unit);
00079 
00080 #endif /* USBSER_H */