change editor tab to 2 spaces.

This commit is contained in:
hathach 2012-12-03 19:02:36 +07:00
parent 6ea85a569a
commit 921561be60
4 changed files with 108 additions and 102 deletions

View File

@ -60,13 +60,13 @@
*/
typedef struct _fifo_t
{
uint8_t* buf; ///< buffer pointer
uint16_t size; ///< buffer size
volatile uint16_t len; ///< bytes in fifo
volatile uint16_t wr_ptr; ///< write pointer
volatile uint16_t rd_ptr; ///< read pointer
bool overwritable; ///< allow overwrite data when full
IRQn_Type irq; ///< interrupt used to lock fifo
uint8_t* buf ; ///< buffer pointer
uint16_t size ; ///< buffer size
volatile uint16_t len ; ///< bytes in fifo
volatile uint16_t wr_ptr ; ///< write pointer
volatile uint16_t rd_ptr ; ///< read pointer
bool overwritable ; ///< allow overwrite data when full
IRQn_Type irq ; ///< interrupt used to lock fifo
} fifo_t;

View File

@ -88,16 +88,16 @@ typedef ATTR_PREPACKED struct ATTR_PACKED {
/// USB Standard Interface Descriptor (section 9.6.1 table 9-12)
typedef ATTR_PREPACKED struct ATTR_PACKED {
uint8_t bLength; ///< Size of this descriptor in bytes
uint8_t bDescriptorType; ///< INTERFACE Descriptor Type
uint8_t bInterfaceNumber; ///< Number of this interface. Zero-based value identifying the index in the array of concurrent interfaces supported by this configuration.
uint8_t bAlternateSetting; ///< Value used to select this alternate setting for the interface identified in the prior field
uint8_t bNumEndpoints; ///< Number of endpoints used by this interface (excluding endpoint zero). If this value is zero, this interface only uses the Default Control Pipe.
uint8_t bInterfaceClass; ///< Class code (assigned by the USB-IF). \li A value of zero is reserved for future standardization. \li If this field is set to FFH, the interface class is vendor-specific. \li All other values are reserved for assignment by the USB-IF.
uint8_t bInterfaceSubClass; ///< Subclass code (assigned by the USB-IF). \n These codes are qualified by the value of the bInterfaceClass field. \li If the bInterfaceClass field is reset to zero, this field must also be reset to zero. \li If the bInterfaceClass field is not set to FFH, all values are reserved for assignment by the USB-IF.
uint8_t bInterfaceProtocol; ///< Protocol code (assigned by the USB). \n These codes are qualified by the value of the bInterfaceClass and the bInterfaceSubClass fields. If an interface supports class-specific requests, this code identifies the protocols that the device uses as defined by the specification of the device class. \li If this field is reset to zero, the device does not use a class-specific protocol on this interface. \li If this field is set to FFH, the device uses a vendor-specific protocol for this interface.
uint8_t iInterface; ///< Index of string descriptor describing this interface
}USB_Descriptor_Interface_t ;
uint8_t bLength ; ///< Size of this descriptor in bytes
uint8_t bDescriptorType ; ///< INTERFACE Descriptor Type
uint8_t bInterfaceNumber ; ///< Number of this interface. Zero-based value identifying the index in the array of concurrent interfaces supported by this configuration.
uint8_t bAlternateSetting ; ///< Value used to select this alternate setting for the interface identified in the prior field
uint8_t bNumEndpoints ; ///< Number of endpoints used by this interface (excluding endpoint zero). If this value is zero, this interface only uses the Default Control Pipe.
uint8_t bInterfaceClass ; ///< Class code (assigned by the USB-IF). \li A value of zero is reserved for future standardization. \li If this field is set to FFH, the interface class is vendor-specific. \li All other values are reserved for assignment by the USB-IF.
uint8_t bInterfaceSubClass ; ///< Subclass code (assigned by the USB-IF). \n These codes are qualified by the value of the bInterfaceClass field. \li If the bInterfaceClass field is reset to zero, this field must also be reset to zero. \li If the bInterfaceClass field is not set to FFH, all values are reserved for assignment by the USB-IF.
uint8_t bInterfaceProtocol ; ///< Protocol code (assigned by the USB). \n These codes are qualified by the value of the bInterfaceClass and the bInterfaceSubClass fields. If an interface supports class-specific requests, this code identifies the protocols that the device uses as defined by the specification of the device class. \li If this field is reset to zero, the device does not use a class-specific protocol on this interface. \li If this field is set to FFH, the device uses a vendor-specific protocol for this interface.
uint8_t iInterface ; ///< Index of string descriptor describing this interface
}USB_Descriptor_Interface_t;
/// USB Standard Endpoint Descriptor (section 9.6.1 table 9-13)
typedef ATTR_PREPACKED struct ATTR_PACKED {
@ -137,19 +137,25 @@ typedef ATTR_PREPACKED struct ATTR_PACKED {
/// USB Interface Association Descriptor (IAD ECN)
typedef ATTR_PREPACKED struct ATTR_PACKED
{
uint8_t bLength; ///< Size of descriptor
uint8_t bDescriptorType; ///< Other_speed_Configuration Type
uint8_t bLength ; ///< Size of descriptor
uint8_t bDescriptorType ; ///< Other_speed_Configuration Type
uint8_t bFirstInterface; ///< Index of the first associated interface.
uint8_t bInterfaceCount; ///< Total number of associated interfaces.
uint8_t bFirstInterface ; ///< Index of the first associated interface.
uint8_t bInterfaceCount ; ///< Total number of associated interfaces.
uint8_t bFunctionClass; ///< Interface class ID.
uint8_t bFunctionSubClass; ///< Interface subclass ID.
uint8_t bFunctionProtocol; ///< Interface protocol ID.
uint8_t bFunctionClass ; ///< Interface class ID.
uint8_t bFunctionSubClass ; ///< Interface subclass ID.
uint8_t bFunctionProtocol ; ///< Interface protocol ID.
uint8_t iFunction; ///< Index of the string descriptor describing the interface association.
uint8_t iFunction ; ///< Index of the string descriptor describing the interface association.
} USB_Descriptor_InterfaceAssociation_t;
/// USB Header Descriptor
typedef ATTR_PREPACKED struct ATTR_PACKED
{
uint8_t bLength ; ///< Size of this descriptor in bytes
uint8_t bDescriptorType ; ///< Descriptor Type
} USB_Descriptor_Header_t;
#ifdef __cplusplus
}