Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface...
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 12 Oct 2010 13:52:06 +0000 (13:52 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 12 Oct 2010 13:52:06 +0000 (13:52 +0000)
Small documentation improvements to explicitly reference tokens in Doxygen, to ensure that they are converted to cross-reference links in the output files.

18 files changed:
LUFA/Drivers/USB/Class/Common/CDC.h
LUFA/Drivers/USB/Class/Common/MassStorage.h
LUFA/Drivers/USB/Class/Device/Audio.h
LUFA/Drivers/USB/Class/Device/CDC.h
LUFA/Drivers/USB/Class/Device/MIDI.h
LUFA/Drivers/USB/Class/Device/RNDIS.h
LUFA/Drivers/USB/Class/Host/CDC.h
LUFA/Drivers/USB/Class/Host/HID.h
LUFA/Drivers/USB/Class/Host/MIDI.c
LUFA/Drivers/USB/Class/Host/MIDI.h
LUFA/Drivers/USB/Class/Host/MassStorage.h
LUFA/Drivers/USB/Class/Host/Printer.h
LUFA/Drivers/USB/Class/Host/RNDIS.h
LUFA/Drivers/USB/Class/Host/StillImage.h
LUFA/Drivers/USB/HighLevel/USBTask.h
LUFA/Drivers/USB/LowLevel/Host.h
LUFA/Drivers/USB/LowLevel/Pipe.h
LUFA/ManPages/ChangeLog.txt

index 99a1d8f..ac6f9da 100644 (file)
                #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 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 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 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 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 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 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 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)
                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.
                                                                     */
index 2dc83d9..ec6c393 100644 (file)
                
        /* 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
                        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
index 414f452..5491806 100644 (file)
                        /** 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.
                        /** 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.
index 0e27d9d..b5896f3 100644 (file)
                         *  \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.
                         *  \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.
                         *  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.
                         *  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.
                        
                        /** 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.
                         *  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.
index cb8e2de..fbb8349 100644 (file)
@@ -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.
                                          */
                         *  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.
                         */
                        /** 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.
index 64f9679..ba958b4 100644 (file)
                                                                                                                                                         *   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.
index d7de77b..e80d014 100644 (file)
                         *  \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.
                         *  \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.
                         *  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.
                         *  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.
                        
                        /** 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.
index 8a16a4f..eca94fb 100644 (file)
                        #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.
                        /** 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
 
                        /** 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.
index 3d844c2..cf59193 100644 (file)
@@ -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;
index f71f000..4aa6eb8 100644 (file)
 
                        /** 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.
                         
                        /** 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.
index 606aa79..4feac0e 100644 (file)
                        /** 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,
                         *  \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,
                        /** 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,
                        /** 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,
                        
                        /** 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.
                         *  \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,
                
                        /** 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.
                         *  \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,
                         *  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)
index 4cbcbff..b6298da 100644 (file)
 
                        /** 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.
                         *  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.
                         *  \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.
                         *  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.
                         *  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.
index 0cb5f46..71f96eb 100644 (file)
                         *
                         *  \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);
                         *
                         *  \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);
                         *  \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,
                         *  \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,
 
                        /** 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.
                        /** 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,
 
                        /** 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,
index 319b72a..0e1e8ac 100644 (file)
                        /** 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.
                        /** 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.
                        /** 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.
                        /** 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.
 
                        /** 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.
                        /** 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.
 
                        /** 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.
 
                        /** 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.
                        /** 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.
                        /** 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.
index 4eb1b8b..2af1bd3 100644 (file)
@@ -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.
index 1e28b90..2da2e4c 100644 (file)
                                                                               *   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.
                                                                               */
                        };
                        
index 1a5f62c..58a5c94 100644 (file)
                         *
                         *  \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);
                        
index 787ac70..a15fe82 100644 (file)
@@ -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
   *  <b>New:</b>