From 0f390b743634ef4cdda03da8cb3f175524d59bd0 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 3 Jul 2011 15:34:29 +0200 Subject: Removed old stuff. --- usbserial.h | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 usbserial.h (limited to 'usbserial.h') diff --git a/usbserial.h b/usbserial.h deleted file mode 100644 index c312821..0000000 --- a/usbserial.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef USBSERIAL_H -#define USBSERIAL_H - -#include -#include -#include - -class USBSerial { - public: - SerialUSBDriver susbdriver; - - public: - void init(); - - inline msg_t getc(systime_t timeout = TIME_INFINITE) { - return chIQGetTimeout(&susbdriver.iqueue, timeout); - } - - inline size_t read(uint8_t* buf, size_t len, systime_t timeout = TIME_INFINITE) { - return chIQReadTimeout(&susbdriver.iqueue, buf, len, timeout); - } - - inline msg_t putc(uint8_t data, systime_t timeout = TIME_INFINITE) { - if(USBD1.state != USB_ACTIVE) { - return 0; - } - return chOQPutTimeout(&susbdriver.oqueue, data, timeout); - } - - inline size_t write(uint8_t* buf, size_t len, systime_t timeout = TIME_INFINITE) { - if(USBD1.state != USB_ACTIVE) { - return 0; - } - return chOQWriteTimeout(&susbdriver.oqueue, buf, len, timeout); - } -}; - -#endif -- cgit v1.2.3