* @brief\r
*/\r
\r
-#ifndef _USB_CDC_H_\r
-#define _USB_CDC_H_\r
+#ifndef USB_CDC_H__\r
+#define USB_CDC_H__\r
\r
-#include "common.h"\r
+#include <stddef.h>\r
+#include <stdint.h>\r
+#include <stdbool.h>\r
+#include "usb_cmd.h"\r
\r
-void usb_disable();\r
-void usb_enable();\r
-bool usb_check();\r
-bool usb_poll();\r
-bool usb_poll_validate_length();\r
-uint32_t usb_read(byte_t* data, size_t len);\r
-uint32_t usb_write(const byte_t* data, const size_t len);\r
-\r
-#endif // _USB_CDC_H_\r
+extern void usb_disable();\r
+extern void usb_enable();\r
+extern bool usb_poll();\r
+extern bool usb_poll_validate_length();\r
+extern bool cmd_receive(UsbCommand* cmd);\r
+extern bool cmd_send(uint16_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* data, uint16_t datalen); // new variable sized response\r
+extern bool cmd_send_old(uint16_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* data, uint16_t datalen); // old fixed size response\r
\r
+#endif // USB_CDC_H__\r