diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h index 99a1d8f9cd..ac6f9daabd 100644 --- a/LUFA/Drivers/USB/Class/Common/CDC.h +++ b/LUFA/Drivers/USB/Class/Common/CDC.h @@ -66,47 +66,47 @@ #endif /* Macros: */ - /** Mask for the DTR handshake line for use with the REQ_SetControlLineState class-specific request + /** Mask for the DTR handshake line for use with the \ref CDC_REQ_SetControlLineState class-specific request * from the host, to indicate that the DTR line state should be high. */ #define CDC_CONTROL_LINE_OUT_DTR (1 << 0) - /** Mask for the RTS handshake line for use with the REQ_SetControlLineState class-specific request - * from the host, to indicate that theRTS line state should be high. + /** Mask for the RTS handshake line for use with the \ref CDC_REQ_SetControlLineState class-specific request + * from the host, to indicate that the RTS line state should be high. */ #define CDC_CONTROL_LINE_OUT_RTS (1 << 1) - /** Mask for the DCD handshake line for use with the a NOTIF_SerialState class-specific notification + /** Mask for the DCD handshake line for use with the \ref CDC_NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the DCD line state is currently high. */ #define CDC_CONTROL_LINE_IN_DCD (1 << 0) - /** Mask for the DSR handshake line for use with the a NOTIF_SerialState class-specific notification + /** Mask for the DSR handshake line for use with the \ref CDC_NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the DSR line state is currently high. */ #define CDC_CONTROL_LINE_IN_DSR (1 << 1) - /** Mask for the BREAK handshake line for use with the a NOTIF_SerialState class-specific notification + /** Mask for the BREAK handshake line for use with the \ref CDC_NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the BREAK line state is currently high. */ #define CDC_CONTROL_LINE_IN_BREAK (1 << 2) - /** Mask for the RING handshake line for use with the a NOTIF_SerialState class-specific notification + /** Mask for the RING handshake line for use with the \ref CDC_NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the RING line state is currently high. */ #define CDC_CONTROL_LINE_IN_RING (1 << 3) - /** Mask for use with the a NOTIF_SerialState class-specific notification from the device to the host, + /** Mask for use with the \ref CDC_NOTIF_SerialState class-specific notification from the device to the host, * to indicate that a framing error has occurred on the virtual serial port. */ #define CDC_CONTROL_LINE_IN_FRAMEERROR (1 << 4) - /** Mask for use with the a NOTIF_SerialState class-specific notification from the device to the host, + /** Mask for use with the \ref CDC_NOTIF_SerialState class-specific notification from the device to the host, * to indicate that a parity error has occurred on the virtual serial port. */ #define CDC_CONTROL_LINE_IN_PARITYERROR (1 << 5) - /** Mask for use with the a NOTIF_SerialState class-specific notification from the device to the host, + /** Mask for use with the \ref CDC_NOTIF_SerialState class-specific notification from the device to the host, * to indicate that a data overrun error has occurred on the virtual serial port. */ #define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6) @@ -142,7 +142,7 @@ enum CDC_ClassNotifications_t { CDC_NOTIF_SerialState = 0x20, /**< Notification type constant for a change in the virtual serial port - * handshake line states, for use with a USB_Notification_Header_t + * handshake line states, for use with a \ref USB_Request_Header_t * notification structure when sent to the host via the CDC notification * endpoint. */ diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h index 2dc83d9d4e..ec6c393603 100644 --- a/LUFA/Drivers/USB/Class/Common/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h @@ -67,16 +67,16 @@ /* Macros: */ /** Magic signature for a Command Block Wrapper used in the Mass Storage Bulk-Only transport protocol. */ - #define MS_CBW_SIGNATURE 0x43425355UL + #define MS_CBW_SIGNATURE 0x43425355UL /** Magic signature for a Command Status Wrapper used in the Mass Storage Bulk-Only transport protocol. */ - #define MS_CSW_SIGNATURE 0x53425355UL + #define MS_CSW_SIGNATURE 0x53425355UL /** Mask for a Command Block Wrapper's flags attribute to specify a command with data sent from host-to-device. */ - #define MS_COMMAND_DIR_DATA_OUT (0 << 7) + #define MS_COMMAND_DIR_DATA_OUT (0 << 7) /** Mask for a Command Block Wrapper's flags attribute to specify a command with data sent from device-to-host. */ - #define MS_COMMAND_DIR_DATA_IN (1 << 7) + #define MS_COMMAND_DIR_DATA_IN (1 << 7) /** SCSI Command Code for an INQUIRY command. */ #define SCSI_CMD_INQUIRY 0x12 @@ -250,7 +250,7 @@ uint32_t Signature; /**< Status block signature, must be CSW_SIGNATURE to indicate a valid Command Status. */ uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper. */ uint32_t DataTransferResidue; /**< Number of bytes of data not processed in the SCSI command. */ - uint8_t Status; /**< Status code of the issued command - a value from the MassStorage_CommandStatusCodes_t enum. */ + uint8_t Status; /**< Status code of the issued command - a value from the \ref MS_CommandStatusCodes_t enum. */ } MS_CommandStatusWrapper_t; /** \brief Mass Storage Class SCSI Sense Structure diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h index 414f4526be..5491806f09 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.h +++ b/LUFA/Drivers/USB/Class/Device/Audio.h @@ -149,7 +149,7 @@ /** Determines if the given audio interface is ready for a sample to be read from it, and selects the streaming * OUT endpoint ready for reading. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. @@ -170,7 +170,7 @@ /** Determines if the given audio interface is ready to accept the next sample to be written to it, and selects * the streaming IN endpoint ready for writing. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index 0e27d9d59a..b5896f34d7 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -208,7 +208,7 @@ * \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be * packed into a single endpoint packet, increasing data throughput. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. @@ -226,7 +226,7 @@ * \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be * packed into a single endpoint packet, increasing data throughput. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. @@ -242,7 +242,7 @@ * succeed immediately. If multiple bytes are to be received, they should be buffered by the user application, as the endpoint * bank will not be released back to the USB controller until all bytes are read. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. @@ -256,7 +256,7 @@ * bytes are currently buffered in the CDC interface's data receive endpoint bank, and thus how many repeated calls to this * function which are guaranteed to succeed. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. @@ -267,7 +267,7 @@ /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. @@ -281,7 +281,7 @@ * until they are cleared via a second notification. This should be called each time the CDC class driver's * ControlLineStates.DeviceToHost value is updated to push the new states to the USB host. * - * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index cb8e2dee36..fbb83498bf 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -95,7 +95,7 @@ */ struct { - // No state information for this class yet + // No state information for this class } State; /**< State data for the USB class interface within the device. All elements in this section * are reset to their defaults when the interface is enumerated. */ @@ -120,11 +120,11 @@ * endpoint bank until either the endpoint bank is full, or \ref MIDI_Device_Flush() is called. This allows for multiple * MIDI events to be packed into a single endpoint packet, increasing data throughput. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. - * \param[in] Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send. + * \param[in] Event Pointer to a populated \ref MIDI_EventPacket_t structure containing the MIDI event to send. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -144,7 +144,7 @@ /** Receives a MIDI event packet from the host. Events are unpacked from the endpoint, thus if the endpoint bank contains * multiple MIDI events from the host in the one packet, multiple calls to this function will return each individual event. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h index 64f967953b..ba958b4c21 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h @@ -106,7 +106,7 @@ * managed by the class driver. */ bool ResponseReady; /**< Internal flag indicating if a RNDIS message is waiting to be returned to the host. */ - uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the RNDIS_States_t enum. */ + uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the \ref RNDIS_States_t enum. */ uint32_t CurrPacketFilter; /**< Current packet filter mode, used internally by the class driver. */ Ethernet_Frame_Info_t FrameIN; /**< Structure holding the last received Ethernet frame from the host, for user * processing. diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h index d7de77b89f..e80d014236 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.h +++ b/LUFA/Drivers/USB/Class/Host/CDC.h @@ -210,7 +210,7 @@ * \ref CDC_Host_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be * packed into a single pipe packet, increasing data throughput. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. @@ -228,7 +228,7 @@ * \ref CDC_Host_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be * packed into a single pipe packet, increasing data throughput. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. @@ -244,7 +244,7 @@ * immediately. If multiple bytes are to be received, they should be buffered by the user application, as the pipe bank will not be * released back to the USB controller until all bytes are read. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. @@ -257,7 +257,7 @@ * returns a negative value. The \ref CDC_Host_BytesReceived() function may be queried in advance to determine how many bytes * are currently buffered in the CDC interface's data receive pipe. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. @@ -268,7 +268,7 @@ /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h index 8a16a4f6b0..eca94fbd8c 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.h +++ b/LUFA/Drivers/USB/Class/Host/HID.h @@ -187,7 +187,7 @@ #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) /** Receives a HID IN report from the attached device, by the report ID. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method is unavailable. @@ -206,7 +206,7 @@ /** Sends an OUT or FEATURE report to the currently attached HID device, using the device's OUT pipe if available, * or the device's Control pipe if not. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, the ReportID parameter is removed @@ -236,7 +236,7 @@ /** Determines if a HID IN report has been received from the attached device on the data IN pipe. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.c b/LUFA/Drivers/USB/Class/Host/MIDI.c index 3d844c2b3d..cf59193c2c 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDI.c +++ b/LUFA/Drivers/USB/Class/Host/MIDI.c @@ -143,7 +143,7 @@ static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const Current uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo) { - if (USB_HostState != HOST_STATE_Configured) + if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive)) return PIPE_RWSTREAM_DeviceDisconnected; uint8_t ErrorCode; diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.h b/LUFA/Drivers/USB/Class/Host/MIDI.h index f71f000f67..4aa6eb8e51 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDI.h +++ b/LUFA/Drivers/USB/Class/Host/MIDI.h @@ -135,7 +135,7 @@ /** Sends a MIDI event packet to the device. If no device is connected, the event packet is discarded. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. @@ -159,7 +159,7 @@ /** Receives a MIDI event packet from the device. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h index 606aa79f87..4feac0e7b8 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -178,14 +178,14 @@ /** Retrieves the Mass Storage device's inquiry data for the specified LUN, indicating the device characteristics and * properties. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. * \param[in] LUNIndex LUN index within the device the command is being issued to. * \param[out] InquiryData Location where the read inquiry data should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED. */ uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, @@ -197,21 +197,21 @@ * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. * \param[in] LUNIndex LUN index within the device the command is being issued to. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex) ATTR_NON_NULL_PTR_ARG(1); /** Retrieves the total capacity of the attached USB Mass Storage device, in blocks, and block size. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. * \param[in] LUNIndex LUN index within the device the command is being issued to. * \param[out] DeviceCapacity Pointer to the location where the capacity information should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, @@ -221,14 +221,14 @@ /** Retrieves the device sense data, indicating the current device state and error codes for the previously * issued command. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. * \param[in] LUNIndex LUN index within the device the command is being issued to. * \param[out] SenseData Pointer to the location where the sense information should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, @@ -238,14 +238,14 @@ /** Issues a PREVENT MEDIUM REMOVAL command, to logically (or, depending on the type of device, physically) lock * the device from removal so that blocks of data on the medium can be read or altered. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. * \param[in] LUNIndex LUN index within the device the command is being issued to. * \param[in] PreventRemoval Boolean true if the device should be locked from removal, false otherwise. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, @@ -253,7 +253,7 @@ /** Reads blocks of data from the attached Mass Storage device's medium. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. @@ -263,7 +263,7 @@ * \param[in] BlockSize Size in bytes of each block within the device. * \param[out] BlockBuffer Pointer to where the read data from the device should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, @@ -274,7 +274,7 @@ /** Writes blocks of data to the attached Mass Storage device's medium. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. @@ -284,7 +284,7 @@ * \param[in] BlockSize Size in bytes of each block within the device. * \param[in] BlockBuffer Pointer to where the data to write should be sourced from. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or \ref MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, @@ -298,7 +298,7 @@ * the interface. This should be called frequently in the main program loop, before the master USB management task * \ref USB_USBTask(). * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state. + * \param[in,out] MSInterfaceInfo Pointer to a structure containing an Mass Storage Class host configuration and state. */ static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo); static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h index 4cbcbff4dc..b6298daae2 100644 --- a/LUFA/Drivers/USB/Class/Host/Printer.h +++ b/LUFA/Drivers/USB/Class/Host/Printer.h @@ -172,7 +172,7 @@ /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. @@ -185,7 +185,7 @@ * printer is able to understand - for example, PCL data. Not all printers accept all printer languages; see * \ref PRNT_Host_GetDeviceID() for details on determining acceptable languages for an attached printer. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. @@ -203,7 +203,7 @@ * \ref PRNT_Host_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be * packed into a single pipe packet, increasing data throughput. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. @@ -219,7 +219,7 @@ * immediately. If multiple bytes are to be received, they should be buffered by the user application, as the pipe bank will not be * released back to the USB controller until all bytes are read. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. @@ -232,7 +232,7 @@ * returns a negative value. The \ref PRNT_Host_BytesReceived() function may be queried in advance to determine how many bytes * are currently buffered in the Printer interface's data receive pipe. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.h b/LUFA/Drivers/USB/Class/Host/RNDIS.h index 0cb5f46ceb..71f96eb5d0 100644 --- a/LUFA/Drivers/USB/Class/Host/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Host/RNDIS.h @@ -156,7 +156,7 @@ * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * - * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum or \ref RNDIS_COMMAND_FAILED if the device returned a * logical command failure. */ uint8_t RNDIS_Host_SendKeepAlive(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -166,7 +166,7 @@ * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * - * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum or \ref RNDIS_COMMAND_FAILED if the device returned a * logical command failure. */ uint8_t RNDIS_Host_InitializeDevice(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -178,7 +178,7 @@ * \param[in] Buffer Pointer to where the property data is to be sourced from. * \param[in] Length Length in bytes of the property data to sent to the device. * - * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum or \ref RNDIS_COMMAND_FAILED if the device returned a * logical command failure. */ uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, @@ -193,7 +193,7 @@ * \param[in] Buffer Pointer to where the property data is to be written to. * \param[in] MaxLength Length in bytes of the destination buffer size. * - * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum or \ref RNDIS_COMMAND_FAILED if the device returned a * logical command failure. */ uint8_t RNDIS_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, @@ -203,7 +203,7 @@ /** Determines if a packet is currently waiting for the host to read in and process. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. @@ -215,14 +215,14 @@ /** Retrieves the next pending packet from the device, discarding the remainder of the RNDIS packet header to leave * only the packet contents for processing by the host in the nominated buffer. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * \param[out] Buffer Pointer to a buffer where the packer data is to be written to. * \param[out] PacketLength Pointer to where the length in bytes of the read packet is to be stored. * - * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, @@ -231,14 +231,14 @@ /** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * \param[in] Buffer Pointer to a buffer where the packer data is to be read from. * \param[in] PacketLength Length in bytes of the packet to send. * - * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum. + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h index 319b72a1ba..0e1e8ac169 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.h +++ b/LUFA/Drivers/USB/Class/Host/StillImage.h @@ -149,7 +149,7 @@ /** Opens a new PIMA session with the attached device. This should be used before any session-orientated PIMA commands * are issued to the device. Only one session can be open at the one time. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -162,7 +162,7 @@ /** Closes an already opened PIMA session with the attached device. This should be used after all session-orientated * PIMA commands have been issued to the device. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -175,7 +175,7 @@ /** Sends a raw PIMA block header to the device, filling out the transaction ID automatically. This can be used to send * arbitrary PIMA blocks to the device with or without parameters. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -190,7 +190,7 @@ /** Receives a raw PIMA block header to the device. This can be used to receive arbitrary PIMA blocks from the device with * or without parameters. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -204,7 +204,7 @@ /** Sends a given PIMA command to the attached device, filling out the PIMA command header's Transaction ID automatically. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -223,7 +223,7 @@ /** Receives and checks a response block from the attached PIMA device, once a command has been issued and all data * associated with the command has been transferred. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -235,7 +235,7 @@ /** Indicates if the device has issued a PIMA event block to the host via the asynchronous events pipe. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -246,7 +246,7 @@ /** Receives an asynchronous event block from the device via the asynchronous events pipe. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -262,7 +262,7 @@ /** Sends arbitrary data to the attached device, for use in the data phase of PIMA commands which require data * transfer beyond the regular PIMA command block parameters. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. @@ -278,7 +278,7 @@ /** Receives arbitrary data from the attached device, for use in the data phase of PIMA commands which require data * transfer beyond the regular PIMA command block parameters. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/HighLevel/USBTask.h index 4eb1b8b40a..2af1bd3d29 100644 --- a/LUFA/Drivers/USB/HighLevel/USBTask.h +++ b/LUFA/Drivers/USB/HighLevel/USBTask.h @@ -73,7 +73,8 @@ /* Public Interface - May be used in end-application: */ /* Global Variables: */ /** Indicates if the USB interface is currently initialized but not necessarily connected to a host - * or device (i.e. if \ref USB_Init() has been run). If this is false, all other library globals are invalid. + * or device (i.e. if \ref USB_Init() has been run). If this is false, all other library globals related + * to the USB driver are invalid. * * \note This variable should be treated as read-only in the user application, and never manually * changed in value. diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h index 1e28b903e4..2da2e4ce6c 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.h +++ b/LUFA/Drivers/USB/LowLevel/Host.h @@ -184,24 +184,24 @@ * completed the device enumeration process. This state causes the * stack to change the current USB device address to that set for * the connected device, before progressing to the user-implemented - * HOST_STATE_Addressed state for further communications. + * \ref HOST_STATE_Addressed state for further communications. * * \note Do not manually change to this state in the user code. */ HOST_STATE_Addressed = 11, /**< May be implemented by the user project. This state should * set the device configuration before progressing to the - * HOST_STATE_Configured state. Other processing (such as the + * \ref HOST_STATE_Configured state. Other processing (such as the * retrieval and processing of the device descriptor) should also * be placed in this state. */ HOST_STATE_Configured = 12, /**< May be implemented by the user project. This state should implement the * actual work performed on the attached device and changed to the - * HOST_STATE_Suspended or HOST_STATE_WaitForDeviceRemoval states as needed. + * \ref HOST_STATE_Suspended or \ref HOST_STATE_WaitForDeviceRemoval states as needed. */ HOST_STATE_Suspended = 15, /**< May be implemented by the user project. This state should be maintained - * while the bus is suspended, and changed to either the HOST_STATE_Configured + * while the bus is suspended, and changed to either the \ref HOST_STATE_Configured * (after resuming the bus with the USB_Host_ResumeBus() macro) or the - * HOST_STATE_WaitForDeviceRemoval states as needed. + * \ref HOST_STATE_WaitForDeviceRemoval states as needed. */ }; diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 1a5f62cd51..58a5c9464b 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -867,7 +867,7 @@ * * \ingroup Group_PipeRW * - * \return A value from the Pipe_WaitUntilReady_ErrorCodes_t enum. + * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum. */ uint8_t Pipe_WaitUntilReady(void); diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 787ac709ed..a15fe828a1 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -73,6 +73,7 @@ * - Fixed SPI driver not explicitly setting /SS and MISO pins as inputs when SPI_Init() is called * - Fixed ISR definition conflict in the XPLAIN bridge between the software UART and the AVRISP-MKII ISP modules * - Fixed random enumeration failure while in device mode due to interrupts causing the Set Address request to exceed maximum timings + * - Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface was not configured * * \section Sec_ChangeLog100807 Version 100807 * New: