diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-12-21 16:49:54 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-12-21 16:49:54 +0000 |
commit | 2f7be482b19d34ec9bc86ce31d589430e2737e29 (patch) | |
tree | e314d0af4a4bf51029915e01e12686cb6970baa9 /os/hal/include/serial_usb.h | |
parent | 7979de69537f45600e5e926dcdf5e302b09af61b (diff) | |
download | ChibiOS-2f7be482b19d34ec9bc86ce31d589430e2737e29.tar.gz ChibiOS-2f7be482b19d34ec9bc86ce31d589430e2737e29.tar.bz2 ChibiOS-2f7be482b19d34ec9bc86ce31d589430e2737e29.zip |
Changes to Serial_USB, unfinished.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8630 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/serial_usb.h')
-rw-r--r-- | os/hal/include/serial_usb.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/os/hal/include/serial_usb.h b/os/hal/include/serial_usb.h index 22e873ea1..fca8d56ea 100644 --- a/os/hal/include/serial_usb.h +++ b/os/hal/include/serial_usb.h @@ -121,6 +121,14 @@ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
+#endif
/** @} */
/*===========================================================================*/
@@ -192,14 +200,16 @@ typedef struct { _base_asynchronous_channel_data \
/* Driver state.*/ \
sdustate_t state; \
- /* Input queue.*/ \
- input_queue_t iqueue; \
+ /* Input buffers queue.*/ \
+ input_buffers_queue_t ibqueue; \
/* Output queue.*/ \
- output_queue_t oqueue; \
+ output_buffers_queue_t obqueue; \
/* Input buffer.*/ \
- uint8_t ib[SERIAL_USB_BUFFERS_SIZE]; \
+ uint8_t ib[BQ_BUFFER_SIZE(SERIAL_USB_BUFFERS_NUMBER, \
+ SERIAL_USB_BUFFERS_SIZE)]; \
/* Output buffer.*/ \
- uint8_t ob[SERIAL_USB_BUFFERS_SIZE]; \
+ uint8_t ob[BQ_BUFFER_SIZE(SERIAL_USB_BUFFERS_NUMBER, \
+ SERIAL_USB_BUFFERS_SIZE)]; \
/* End of the mandatory fields.*/ \
/* Current configuration data.*/ \
const SerialUSBConfig *config;
|