00001
00002
00003
00004
00005
00006
00007 #ifndef USB_H_
00008 #define USB_H_
00009
00010
00011 extern "C"
00012 {
00013 #include "ecrobot_interface.h"
00014 #include "rtoscalls.h"
00015 };
00016
00017 namespace ecrobot
00018 {
00022 class Usb
00023 {
00024 public:
00028 static const U32 MAX_USB_DATA_LENGTH = 64;
00029
00039 Usb(void);
00040
00046 ~Usb(void);
00047
00053 void commHandler(void);
00054
00060 bool isConnected(void) const;
00061
00069 U32 send(U8* data, U32 offset, U32 length);
00070
00078 U32 receive(U8* data, U32 offset, U32 length) const;
00079
00085 bool close(void);
00086 };
00087 }
00088
00089 #endif