diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-19 07:29:02 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-19 07:29:02 +0000 |
commit | 35bdada24b49c4dd1900a78a1595077b99814cf9 (patch) | |
tree | 555cbab08c42b76212656c15309bb7c0311fcd8b /LUFA/Drivers | |
parent | feabfd12ce3d14b43d2decb2b2f1c5b27e9d6181 (diff) | |
download | lufa-35bdada24b49c4dd1900a78a1595077b99814cf9.tar.gz lufa-35bdada24b49c4dd1900a78a1595077b99814cf9.tar.bz2 lufa-35bdada24b49c4dd1900a78a1595077b99814cf9.zip |
Clean up RNDIS demo type define names.
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/CDC.h | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/RNDIS.h | 20 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MIDI.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MassStorage.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/RNDIS.c | 54 |
6 files changed, 48 insertions, 43 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h index ccc32683b..5138032da 100644 --- a/LUFA/Drivers/USB/Class/Common/CDC.h +++ b/LUFA/Drivers/USB/Class/Common/CDC.h @@ -123,7 +123,7 @@ /* Enums: */
/** Enum for the possible line encoding formats of a virtual serial port. */
- enum CDCDevice_CDC_LineCodingFormats_t
+ enum CDC_LineCodingFormats_t
{
CDC_LINEENCODING_OneStopBit = 0, /**< Each frame contains one stop bit */
CDC_LINEENCODING_OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits */
@@ -131,7 +131,7 @@ };
/** Enum for the possible line encoding parity settings of a virtual serial port. */
- enum CDCDevice_LineCodingParity_t
+ enum CDC_LineCodingParity_t
{
CDC_PARITY_None = 0, /**< No parity bit mode on each frame */
CDC_PARITY_Odd = 1, /**< Odd parity bit mode on each frame */
diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h index 157fff359..c169fa448 100644 --- a/LUFA/Drivers/USB/Class/Common/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h @@ -122,7 +122,7 @@ uint32_t PerPacketInfoLength;
uint32_t VcHandle;
uint32_t Reserved;
- } RNDIS_PACKET_MSG_t;
+ } RNDIS_Packet_Message_t;
/** Type define for a RNDIS Initialize command message */
typedef struct
@@ -134,7 +134,7 @@ uint32_t MajorVersion;
uint32_t MinorVersion;
uint32_t MaxTransferSize;
- } RNDIS_INITIALIZE_MSG_t;
+ } RNDIS_Initialize_Message_t;
/** Type define for a RNDIS Initialize complete response message */
typedef struct
@@ -153,7 +153,7 @@ uint32_t PacketAlignmentFactor;
uint32_t AFListOffset;
uint32_t AFListSize;
- } RNDIS_INITIALIZE_CMPLT_t;
+ } RNDIS_Initialize_Complete_t;
/** Type define for a RNDIS Keepalive command message */
typedef struct
@@ -161,7 +161,7 @@ uint32_t MessageType;
uint32_t MessageLength;
uint32_t RequestId;
- } RNDIS_KEEPALIVE_MSG_t;
+ } RNDIS_KeepAlive_Message_t;
/** Type define for a RNDIS Keepalive complete message */
typedef struct
@@ -170,7 +170,7 @@ uint32_t MessageLength;
uint32_t RequestId;
uint32_t Status;
- } RNDIS_KEEPALIVE_CMPLT_t;
+ } RNDIS_KeepAlive_Complete_t;
/** Type define for a RNDIS Reset complete message */
typedef struct
@@ -180,7 +180,7 @@ uint32_t Status;
uint32_t AddressingReset;
- } RNDIS_RESET_CMPLT_t;
+ } RNDIS_Reset_Complete_t;
/** Type define for a RNDIS Set command message */
typedef struct
@@ -193,7 +193,7 @@ uint32_t InformationBufferLength;
uint32_t InformationBufferOffset;
uint32_t DeviceVcHandle;
- } RNDIS_SET_MSG_t;
+ } RNDIS_Set_Message_t;
/** Type define for a RNDIS Set complete response message */
typedef struct
@@ -202,7 +202,7 @@ uint32_t MessageLength;
uint32_t RequestId;
uint32_t Status;
- } RNDIS_SET_CMPLT_t;
+ } RNDIS_Set_Complete_t;
/** Type define for a RNDIS Query command message */
typedef struct
@@ -215,7 +215,7 @@ uint32_t InformationBufferLength;
uint32_t InformationBufferOffset;
uint32_t DeviceVcHandle;
- } RNDIS_QUERY_MSG_t;
+ } RNDIS_Query_Message_t;
/** Type define for a RNDIS Query complete response message */
typedef struct
@@ -227,7 +227,7 @@ uint32_t InformationBufferLength;
uint32_t InformationBufferOffset;
- } RNDIS_QUERY_CMPLT_t;
+ } RNDIS_Query_Complete_t;
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h index b4c400f05..00d73a9a0 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.h +++ b/LUFA/Drivers/USB/Class/Device/HID.h @@ -71,7 +71,8 @@ {
bool UsingReportProtocol; /**< Indicates if the HID interface is set to Boot or Report protocol mode */
uint16_t IdleCount; /**< Report idle period, in ms, set by the host */
- uint16_t IdleMSRemaining; /**< Total number of ms remaining before the idle period elapses */
+ uint16_t IdleMSRemaining; /**< Total number of ms remaining before the idle period elapsed - this should be
+ * decremented by the user application if non-zero each millisecond */
} USB_ClassInfo_HID_Device_State_t;
/** Class state structure. An instance of this structure should be made for each HID interface
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index e2e06b635..2cadeaf58 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -69,7 +69,7 @@ /** Current State information structure for \ref USB_ClassInfo_MIDI_Device_t MIDI device interface structures. */
typedef struct
{
-
+ // No state information for this class yet
} USB_ClassInfo_MIDI_Device_State_t;
/** Class state structure. An instance of this structure should be made for each MIDI interface
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h index 2616bd871..53eb7ab82 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h @@ -70,11 +70,11 @@ /** Current State information structure for \ref USB_ClassInfo_MS_Device_t Mass Storage device interface structures. */
typedef struct
{
- CommandBlockWrapper_t CommandBlock; /**< Mass Storage class command block structure, used internally
- * by the class driver
+ CommandBlockWrapper_t CommandBlock; /**< Mass Storage class command block structure, stores the received SCSI
+ * command from the host which is to be processed
*/
- CommandStatusWrapper_t CommandStatus; /**< Mass Storage class command status structure, used internally
- * by the class driver
+ CommandStatusWrapper_t CommandStatus; /**< Mass Storage class command status structure, set elements to indicate
+ * the issued command's success or failure to the host
*/
bool IsMassStoreReset; /**< Flag indicating that the host has requested that the Mass Storage interface be reset
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.c b/LUFA/Drivers/USB/Class/Device/RNDIS.c index 7ac84709b..bf753bf99 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.c +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.c @@ -165,13 +165,13 @@ void RNDIS_Device_USBTask(USB_ClassInfo_RNDIS_Device_t* RNDISInterfaceInfo) if ((RNDISInterfaceInfo->State.CurrRNDISState == RNDIS_Data_Initialized) && !(MessageHeader->MessageLength))
{
- RNDIS_PACKET_MSG_t RNDISPacketHeader;
+ RNDIS_Packet_Message_t RNDISPacketHeader;
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
if (Endpoint_IsOUTReceived() && !(RNDISInterfaceInfo->State.FrameIN.FrameInBuffer))
{
- Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_PACKET_MSG_t), NO_STREAM_CALLBACK);
+ Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_Packet_Message_t), NO_STREAM_CALLBACK);
if (RNDISPacketHeader.DataLength > ETHERNET_FRAME_SIZE_MAX)
{
@@ -192,14 +192,14 @@ void RNDIS_Device_USBTask(USB_ClassInfo_RNDIS_Device_t* RNDISInterfaceInfo) if (Endpoint_IsINReady() && RNDISInterfaceInfo->State.FrameOUT.FrameInBuffer)
{
- memset(&RNDISPacketHeader, 0, sizeof(RNDIS_PACKET_MSG_t));
+ memset(&RNDISPacketHeader, 0, sizeof(RNDIS_Packet_Message_t));
RNDISPacketHeader.MessageType = REMOTE_NDIS_PACKET_MSG;
- RNDISPacketHeader.MessageLength = (sizeof(RNDIS_PACKET_MSG_t) + RNDISInterfaceInfo->State.FrameOUT.FrameLength);
- RNDISPacketHeader.DataOffset = (sizeof(RNDIS_PACKET_MSG_t) - sizeof(RNDIS_Message_Header_t));
+ RNDISPacketHeader.MessageLength = (sizeof(RNDIS_Packet_Message_t) + RNDISInterfaceInfo->State.FrameOUT.FrameLength);
+ RNDISPacketHeader.DataOffset = (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t));
RNDISPacketHeader.DataLength = RNDISInterfaceInfo->State.FrameOUT.FrameLength;
- Endpoint_Write_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_PACKET_MSG_t), NO_STREAM_CALLBACK);
+ Endpoint_Write_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_Packet_Message_t), NO_STREAM_CALLBACK);
Endpoint_Write_Stream_LE(RNDISInterfaceInfo->State.FrameOUT.FrameData, RNDISPacketHeader.DataLength, NO_STREAM_CALLBACK);
Endpoint_ClearIN();
@@ -220,11 +220,13 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS case REMOTE_NDIS_INITIALIZE_MSG:
RNDISInterfaceInfo->State.ResponseReady = true;
- RNDIS_INITIALIZE_MSG_t* INITIALIZE_Message = (RNDIS_INITIALIZE_MSG_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
- RNDIS_INITIALIZE_CMPLT_t* INITIALIZE_Response = (RNDIS_INITIALIZE_CMPLT_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_Initialize_Message_t* INITIALIZE_Message =
+ (RNDIS_Initialize_Message_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_Initialize_Complete_t* INITIALIZE_Response =
+ (RNDIS_Initialize_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
INITIALIZE_Response->MessageType = REMOTE_NDIS_INITIALIZE_CMPLT;
- INITIALIZE_Response->MessageLength = sizeof(RNDIS_INITIALIZE_CMPLT_t);
+ INITIALIZE_Response->MessageLength = sizeof(RNDIS_Initialize_Complete_t);
INITIALIZE_Response->RequestId = INITIALIZE_Message->RequestId;
INITIALIZE_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
@@ -233,7 +235,7 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS INITIALIZE_Response->DeviceFlags = REMOTE_NDIS_DF_CONNECTIONLESS;
INITIALIZE_Response->Medium = REMOTE_NDIS_MEDIUM_802_3;
INITIALIZE_Response->MaxPacketsPerTransfer = 1;
- INITIALIZE_Response->MaxTransferSize = (sizeof(RNDIS_PACKET_MSG_t) + ETHERNET_FRAME_SIZE_MAX);
+ INITIALIZE_Response->MaxTransferSize = (sizeof(RNDIS_Packet_Message_t) + ETHERNET_FRAME_SIZE_MAX);
INITIALIZE_Response->PacketAlignmentFactor = 0;
INITIALIZE_Response->AFListOffset = 0;
INITIALIZE_Response->AFListSize = 0;
@@ -251,17 +253,17 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS case REMOTE_NDIS_QUERY_MSG:
RNDISInterfaceInfo->State.ResponseReady = true;
- RNDIS_QUERY_MSG_t* QUERY_Message = (RNDIS_QUERY_MSG_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
- RNDIS_QUERY_CMPLT_t* QUERY_Response = (RNDIS_QUERY_CMPLT_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
- uint32_t Query_Oid = QUERY_Message->Oid;
+ RNDIS_Query_Message_t* QUERY_Message = (RNDIS_Query_Message_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_Query_Complete_t* QUERY_Response = (RNDIS_Query_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ uint32_t Query_Oid = QUERY_Message->Oid;
void* QueryData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Message_Header_t) +
QUERY_Message->InformationBufferOffset];
- void* ResponseData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_QUERY_CMPLT_t)];
+ void* ResponseData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Query_Complete_t)];
uint16_t ResponseSize;
QUERY_Response->MessageType = REMOTE_NDIS_QUERY_CMPLT;
- QUERY_Response->MessageLength = sizeof(RNDIS_QUERY_CMPLT_t);
+ QUERY_Response->MessageLength = sizeof(RNDIS_Query_Complete_t);
if (RNDIS_Device_ProcessNDISQuery(RNDISInterfaceInfo, Query_Oid, QueryData, QUERY_Message->InformationBufferLength,
ResponseData, &ResponseSize))
@@ -270,7 +272,7 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS QUERY_Response->MessageLength += ResponseSize;
QUERY_Response->InformationBufferLength = ResponseSize;
- QUERY_Response->InformationBufferOffset = (sizeof(RNDIS_QUERY_CMPLT_t) - sizeof(RNDIS_Message_Header_t));
+ QUERY_Response->InformationBufferOffset = (sizeof(RNDIS_Query_Complete_t) - sizeof(RNDIS_Message_Header_t));
}
else
{
@@ -284,12 +286,12 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS case REMOTE_NDIS_SET_MSG:
RNDISInterfaceInfo->State.ResponseReady = true;
- RNDIS_SET_MSG_t* SET_Message = (RNDIS_SET_MSG_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
- RNDIS_SET_CMPLT_t* SET_Response = (RNDIS_SET_CMPLT_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
- uint32_t SET_Oid = SET_Message->Oid;
+ RNDIS_Set_Message_t* SET_Message = (RNDIS_Set_Message_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_Set_Complete_t* SET_Response = (RNDIS_Set_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ uint32_t SET_Oid = SET_Message->Oid;
SET_Response->MessageType = REMOTE_NDIS_SET_CMPLT;
- SET_Response->MessageLength = sizeof(RNDIS_SET_CMPLT_t);
+ SET_Response->MessageLength = sizeof(RNDIS_Set_Complete_t);
SET_Response->RequestId = SET_Message->RequestId;
void* SetData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Message_Header_t) +
@@ -304,10 +306,10 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS case REMOTE_NDIS_RESET_MSG:
RNDISInterfaceInfo->State.ResponseReady = true;
- RNDIS_RESET_CMPLT_t* RESET_Response = (RNDIS_RESET_CMPLT_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_Reset_Complete_t* RESET_Response = (RNDIS_Reset_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
RESET_Response->MessageType = REMOTE_NDIS_RESET_CMPLT;
- RESET_Response->MessageLength = sizeof(RNDIS_RESET_CMPLT_t);
+ RESET_Response->MessageLength = sizeof(RNDIS_Reset_Complete_t);
RESET_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
RESET_Response->AddressingReset = 0;
@@ -315,11 +317,13 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* RNDIS case REMOTE_NDIS_KEEPALIVE_MSG:
RNDISInterfaceInfo->State.ResponseReady = true;
- RNDIS_KEEPALIVE_MSG_t* KEEPALIVE_Message = (RNDIS_KEEPALIVE_MSG_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
- RNDIS_KEEPALIVE_CMPLT_t* KEEPALIVE_Response = (RNDIS_KEEPALIVE_CMPLT_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_KeepAlive_Message_t* KEEPALIVE_Message =
+ (RNDIS_KeepAlive_Message_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
+ RNDIS_KeepAlive_Complete_t* KEEPALIVE_Response =
+ (RNDIS_KeepAlive_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
KEEPALIVE_Response->MessageType = REMOTE_NDIS_KEEPALIVE_CMPLT;
- KEEPALIVE_Response->MessageLength = sizeof(RNDIS_KEEPALIVE_CMPLT_t);
+ KEEPALIVE_Response->MessageLength = sizeof(RNDIS_KeepAlive_Complete_t);
KEEPALIVE_Response->RequestId = KEEPALIVE_Message->RequestId;
KEEPALIVE_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
|