aboutsummaryrefslogtreecommitdiffstats
path: root/usbdrv
diff options
context:
space:
mode:
Diffstat (limited to 'usbdrv')
-rw-r--r--usbdrv/usbdrv.c3
-rw-r--r--usbdrv/usbdrv.h9
2 files changed, 10 insertions, 2 deletions
diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c
index c5bb664..44c9c3f 100644
--- a/usbdrv/usbdrv.c
+++ b/usbdrv/usbdrv.c
@@ -45,9 +45,8 @@ uchar usbCurrentDataToken;/* when we check data toggling to ignore duplica
/* USB status registers / not shared with asm code */
usbMsgPtr_t usbMsgPtr; /* data to transmit next -- ROM or RAM address */
static usbMsgLen_t usbMsgLen = USB_NO_MSG; /* remaining number of bytes */
-static uchar usbMsgFlags; /* flag values see below */
+uchar usbMsgFlags; /* flag values see USB_FLG_* */
-#define USB_FLG_MSGPTR_IS_ROM (1<<6)
#define USB_FLG_USE_USER_RW (1<<7)
/*
diff --git a/usbdrv/usbdrv.h b/usbdrv/usbdrv.h
index 113854e..f094120 100644
--- a/usbdrv/usbdrv.h
+++ b/usbdrv/usbdrv.h
@@ -208,6 +208,15 @@ extern usbMsgPtr_t usbMsgPtr;
* implementation of usbFunctionWrite(). It is also used internally by the
* driver for standard control requests.
*/
+
+extern uchar usbMsgFlags; /* flag values see USB_FLG_* */
+/* Can be set to `USB_FLG_MSGPTR_IS_ROM` in `usbFunctionSetup()` or
+ * `usbFunctionDescriptor()` if `usbMsgPtr` has been set to a flash memory
+ * address.
+ */
+
+#define USB_FLG_MSGPTR_IS_ROM (1<<6)
+
USB_PUBLIC usbMsgLen_t usbFunctionSetup(uchar data[8]);
/* This function is called when the driver receives a SETUP transaction from
* the host which is not answered by the driver itself (in practice: class and