From a94bfc5f713ee3b7659c53458b61f40ff39dc660 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 2 Nov 2014 15:24:30 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7461 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/templates/usb_lld.h | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'os/hal/templates/usb_lld.h') diff --git a/os/hal/templates/usb_lld.h b/os/hal/templates/usb_lld.h index 7dbf8b4b9..40970043a 100644 --- a/os/hal/templates/usb_lld.h +++ b/os/hal/templates/usb_lld.h @@ -1,5 +1,5 @@ /* - ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio + ChibiOS/HAL - Copyright (C) 2006-2014 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,8 +15,8 @@ */ /** - * @file templates/usb_lld.h - * @brief USB Driver subsystem low level driver header template. + * @file PLATFORM/usb_lld.h + * @brief PLATFORM USB subsystem low level driver header. * * @addtogroup USB * @{ @@ -36,10 +36,15 @@ */ #define USB_MAX_ENDPOINTS 4 +/** + * @brief Status stage handling method. + */ +#define USB_EP0_STATUS_STAGE USB_EP0_STATUS_STAGE_SW + /** * @brief The address can be changed immediately upon packet reception. */ -#define USB_SET_ADDRESS_MODE USB_EARLY_SET_ADDRESS +#define USB_SET_ADDRESS_MODE USB_LATE_SET_ADDRESS /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -54,7 +59,7 @@ * @details If set to @p TRUE the support for USB1 is included. */ #if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__) -#define PLATFORM_USB_USE_USB1 FALSE +#define PLATFORM_USB_USE_USB1 FALSE #endif /** @} */ @@ -73,7 +78,7 @@ typedef struct { /** * @brief Buffer mode, queue or linear. */ - bool_t txqueued; + bool txqueued; /** * @brief Requested transmit transfer size. */ @@ -93,8 +98,9 @@ typedef struct { /** * @brief Pointer to the output queue. */ - OutputQueue *txqueue; + output_queue_t *txqueue; } queue; + /* End of the mandatory fields.*/ } mode; } USBInEndpointState; @@ -105,7 +111,7 @@ typedef struct { /** * @brief Buffer mode, queue or linear. */ - bool_t rxqueued; + bool rxqueued; /** * @brief Requested receive transfer size. */ @@ -125,9 +131,10 @@ typedef struct { /** * @brief Pointer to the input queue. */ - InputQueue *rxqueue; + input_queue_t *rxqueue; } queue; } mode; + /* End of the mandatory fields.*/ } USBOutEndpointState; /** @@ -294,6 +301,16 @@ struct USBDriver { /* Driver macros. */ /*===========================================================================*/ +/** + * @brief Returns the current frame number. + * + * @param[in] usbp pointer to the @p USBDriver object + * @return The current frame number. + * + * @notapi + */ +#define usb_lld_get_frame_number(usbp) 0 + /** * @brief Returns the exact size of a receive transaction. * @details The received size can be different from the size specified in -- cgit v1.2.3