remove deprecated USE_USB macro
[protos/xbee-avr.git] / cmdline.h
index 508d026..724f5ef 100644 (file)
--- a/cmdline.h
+++ b/cmdline.h
  */
 
 
-#ifdef USE_USB
-#include "DualVirtualSerial.h"
-#else
 #define CMDLINE_UART 0
 #define XBEE_UART 2
-#endif
 
 void cmdline_init(void);
 
@@ -45,30 +41,17 @@ int cmdline_dev_recv(FILE* f);
 int xbee_dev_send(char c, FILE* f);
 int xbee_dev_recv(FILE* f);
 
-static inline uint8_t cmdline_keypressed(void) {
-#ifdef USE_USB
-       return (CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface) >= 0);
-#else
+static inline uint8_t cmdline_keypressed(void)
+{
        return (uart_recv_nowait(CMDLINE_UART) != -1);
-#endif
 }
 
-static inline int16_t cmdline_getchar(void) {
-#ifdef USE_USB
-       return CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);
-#else
+static inline int16_t cmdline_getchar(void)
+{
        return uart_recv_nowait(CMDLINE_UART);
-#endif
 }
 
-static inline uint8_t cmdline_getchar_wait(void) {
-#ifdef USE_USB
-       int16_t c;
-       do {
-               c = CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);
-       } while (c < 0);
-       return c;
-#else
+static inline uint8_t cmdline_getchar_wait(void)
+{
        return uart_recv(CMDLINE_UART);
-#endif
 }