diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-08 21:09:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-08 21:09:14 +0000 |
commit | ebaac50aa4daa939814b783b1239073e3170860f (patch) | |
tree | d3d799bf8e2240ca7851bb2c236b345e0ae40f77 /os/hal | |
parent | 6b1c74271cf04a5f3ce225321912cdf3f365f673 (diff) | |
download | ChibiOS-ebaac50aa4daa939814b783b1239073e3170860f.tar.gz ChibiOS-ebaac50aa4daa939814b783b1239073e3170860f.tar.bz2 ChibiOS-ebaac50aa4daa939814b783b1239073e3170860f.zip |
Improvements to the Serial over USB driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2810 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/include/serial_usb.h | 12 | ||||
-rw-r--r-- | os/hal/src/serial_usb.c | 4 |
2 files changed, 2 insertions, 14 deletions
diff --git a/os/hal/include/serial_usb.h b/os/hal/include/serial_usb.h index b1d90cfb5..a220f7191 100644 --- a/os/hal/include/serial_usb.h +++ b/os/hal/include/serial_usb.h @@ -90,18 +90,6 @@ typedef struct { * @brief USB driver configuration structure.
*/
USBConfig usb_config;
- /*
- * @brief Endpoint used for data transmission.
- */
- usbep_t data_request_ep;
- /*
- * @brief Endpoint used for data reception.
- */
- usbep_t data_available_ep;
- /*
- * @brief Endpoint used for interrupt request.
- */
- usbep_t interrupt_request_ep;
} SerialUSBConfig;
/**
diff --git a/os/hal/src/serial_usb.c b/os/hal/src/serial_usb.c index 0393ad141..6ed5d324c 100644 --- a/os/hal/src/serial_usb.c +++ b/os/hal/src/serial_usb.c @@ -119,7 +119,7 @@ static void inotify(GenericQueue *qp) { emptied, then a whole packet is loaded in the queue.*/
if (chIQIsEmptyI(&sdup->iqueue)) {
- n = usbReadPacketI(sdup->config->usbp, sdup->config->data_available_ep,
+ n = usbReadPacketI(sdup->config->usbp, DATA_AVAILABLE_EP,
sdup->iqueue.q_buffer, SERIAL_USB_BUFFERS_SIZE);
if (n != USB_ENDPOINT_BUSY) {
sdup->iqueue.q_rdptr = sdup->iqueue.q_buffer;
@@ -138,7 +138,7 @@ static void onotify(GenericQueue *qp) { /* If there is any data in the output queue then it is sent within a
single packet and the queue is emptied.*/
- n = usbWritePacketI(sdup->config->usbp, sdup->config->data_request_ep,
+ n = usbWritePacketI(sdup->config->usbp, DATA_REQUEST_EP,
sdup->oqueue.q_buffer, chOQGetFullI(&sdup->oqueue));
if (n != USB_ENDPOINT_BUSY) {
sdup->oqueue.q_wrptr = sdup->oqueue.q_buffer;
|