aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel')
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.c6
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.h23
-rw-r--r--LUFA/Drivers/USB/LowLevel/Device.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Endpoint.h32
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.c10
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.h6
-rw-r--r--LUFA/Drivers/USB/LowLevel/LowLevel.c4
-rw-r--r--LUFA/Drivers/USB/LowLevel/LowLevel.h20
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h30
9 files changed, 46 insertions, 87 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index 785d10fac..8f53105a6 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@ -106,7 +106,7 @@ void USB_Device_ProcessControlPacket(void)
}
if (!(RequestHandled))
- RAISE_EVENT(USB_UnhandledControlPacket);
+ EVENT_USB_UnhandledControlPacket();
if (Endpoint_IsSETUPReceived())
{
@@ -157,9 +157,9 @@ static void USB_Device_SetConfiguration(void)
Endpoint_ClearIN();
if (!(AlreadyConfigured) && USB_ConfigurationNumber)
- RAISE_EVENT(USB_DeviceEnumerationComplete);
+ EVENT_USB_DeviceEnumerationComplete();
- RAISE_EVENT(USB_ConfigurationChanged);
+ EVENT_USB_ConfigurationChanged();
}
void USB_Device_GetConfiguration(void)
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h
index 49795e5de..68cb2c448 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h
@@ -81,29 +81,6 @@
* \ingroup Group_Device
*/
extern bool USB_CurrentlySelfPowered;
-
- /* Throwable Events: */
- /** This module raises the \ref USB_UnhandledControlPacket event when a request to the default control
- * endpoint has been received, but the library does not implement an internal handler for it.
- *
- * \see \ref Group_Events for more information on this event.
- */
- RAISES_EVENT(USB_UnhandledControlPacket);
-
- /** This module raises the \ref USB_ConfigurationChanged event when the host issues a \ref REQ_SetConfiguration
- * device request, to change the currently selected configuration number.
- *
- * \see \ref Group_Events for more information on this event.
- */
- RAISES_EVENT(USB_ConfigurationChanged);
-
- /** This module raises the \ref USB_DeviceEnumerationComplete event when the host has completed its
- * enumeration of the device (i.e. when a \ref REQ_SetConfiguration request changes the current configuration
- * number from 0 to a non-zero value).
- *
- * \see \ref Group_Events for more information on this event.
- */
- RAISES_EVENT(USB_DeviceEnumerationComplete);
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h
index 411ece002..ea9be4b9f 100644
--- a/LUFA/Drivers/USB/LowLevel/Device.h
+++ b/LUFA/Drivers/USB/LowLevel/Device.h
@@ -115,7 +115,7 @@
#endif
/* Enums: */
- /** Enum for the ErrorCode parameter of the \ref USB_DeviceError event.
+ /** Enum for the ErrorCode parameter of the \ref EVENT_USB_DeviceError() event.
*
* \see Events.h for more information on this event.
*/
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index 7f2b76a2f..bf3384848 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h
@@ -108,7 +108,7 @@
/** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's
* numerical address in the device.
*/
- #define ENDPOINT_EPNUM_MASK 0x03
+ #define ENDPOINT_EPNUM_MASK 0x07
/** Endpoint bank size mask, for masking against endpoint addresses to retrieve the endpoint's
* bank size in the device.
@@ -712,9 +712,9 @@
* each USB packet, the given stream callback function is executed repeatedly until the next
* packet is ready, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \note This routine should not be used on CONTROL type endpoints.
*
@@ -738,9 +738,9 @@
* is executed repeatedly until the endpoint is ready to accept the next packet, allowing for early
* aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \note This routine should not be used on CONTROL type endpoints.
*
@@ -765,9 +765,9 @@
* is executed repeatedly until the endpoint is ready to accept the next packet, allowing for early
* aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \note This routine should not be used on CONTROL type endpoints.
*
@@ -792,9 +792,9 @@
* each USB packet, the given stream callback function is executed repeatedly until the endpoint
* is ready to accept the next packet, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \note This routine should not be used on CONTROL type endpoints.
*
@@ -819,9 +819,9 @@
* each USB packet, the given stream callback function is executed repeatedly until the endpoint
* is ready to accept the next packet, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \note This routine should not be used on CONTROL type endpoints.
*
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c
index 9630b6aa1..b3b56b8d1 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.c
+++ b/LUFA/Drivers/USB/LowLevel/Host.c
@@ -90,7 +90,7 @@ void USB_Host_ProcessNextHostState(void)
USB_INT_Enable(USB_INT_VBERRI);
USB_IsConnected = true;
- RAISE_EVENT(USB_Connect);
+ EVENT_USB_Connect();
USB_Host_ResumeBus();
Pipe_ClearPipes();
@@ -184,7 +184,7 @@ void USB_Host_ProcessNextHostState(void)
case HOST_STATE_Default_PostAddressSet:
USB_Host_SetDeviceAddress(USB_HOST_DEVICEADDRESS);
- RAISE_EVENT(USB_DeviceEnumerationComplete);
+ EVENT_USB_DeviceEnumerationComplete();
USB_HostState = HOST_STATE_Addressed;
break;
@@ -192,14 +192,14 @@ void USB_Host_ProcessNextHostState(void)
if ((ErrorCode != HOST_ENUMERROR_NoError) && (USB_HostState != HOST_STATE_Unattached))
{
- RAISE_EVENT(USB_DeviceEnumerationFailed, ErrorCode, SubErrorCode);
+ EVENT_USB_DeviceEnumerationFailed(ErrorCode, SubErrorCode);
USB_Host_VBUS_Auto_Off();
- RAISE_EVENT(USB_DeviceUnattached);
+ EVENT_USB_DeviceUnattached();
if (USB_IsConnected)
- RAISE_EVENT(USB_Disconnect);
+ EVENT_USB_Disconnect();
USB_ResetInterface();
}
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h
index 4457c07d8..911b41bd9 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.h
+++ b/LUFA/Drivers/USB/LowLevel/Host.h
@@ -199,7 +199,7 @@
HOST_STATE_Suspended = 13, /**< May be implemented by the user project. */
};
- /** Enum for the error codes for the \ref USB_HostError event.
+ /** Enum for the error codes for the \ref EVENT_USB_HostError() event.
*
* \see \ref Group_Events for more information on this event.
*/
@@ -213,14 +213,14 @@
*/
};
- /** Enum for the error codes for the \ref USB_DeviceEnumerationFailed event.
+ /** Enum for the error codes for the \ref EVENT_USB_DeviceEnumerationFailed() event.
*
* \see \ref Group_Events for more information on this event.
*/
enum USB_Host_EnumerationErrorCodes_t
{
HOST_ENUMERROR_NoError = 0, /**< No error occurred. Used internally, this is not a valid
- * ErrorCode parameter value for the \ref USB_DeviceEnumerationFailed
+ * ErrorCode parameter value for the \ref EVENT_USB_DeviceEnumerationFailed()
* event.
*/
HOST_ENUMERROR_WaitStage = 1, /**< One of the delays between enumeration steps failed
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c
index 99b9cfbe5..346420f47 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.c
+++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c
@@ -92,7 +92,7 @@ void USB_Init(
}
else
{
- RAISE_EVENT(USB_InitFailure, USB_INITERROR_NoUSBModeSpecified);
+ EVENT_USB_InitFailure(USB_INITERROR_NoUSBModeSpecified);
return;
}
#endif
@@ -111,7 +111,7 @@ void USB_Init(
void USB_ShutDown(void)
{
if (USB_IsConnected)
- RAISE_EVENT(USB_Disconnect);
+ EVENT_USB_Disconnect();
USB_Detach();
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/LowLevel.h
index fad1cbf1f..41b0ff5f6 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.h
+++ b/LUFA/Drivers/USB/LowLevel/LowLevel.h
@@ -283,7 +283,7 @@
/* Enums: */
/** Enum for error codes relating to the powering on of the USB interface. These error codes are
- * used in the ErrorCode parameter value of the \ref USB_InitFailure event.
+ * used in the ErrorCode parameter value of the \ref EVENT_USB_InitFailure() event.
*/
enum USB_InitErrorCodes_t
{
@@ -313,24 +313,6 @@
extern volatile uint8_t USB_Options;
#endif
- /* Throwable Events: */
- /** This module raises the \ref USB_Disconnect event if the USB interface is reset (such as during a mode
- * change while in UID mode) while the USB interface is connected to a device when in host mode, or
- * a host while in device mode.
- *
- * \see Events.h for more information on this event.
- */
- RAISES_EVENT(USB_Disconnect);
-
- #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
- /** This module raises the Power On Failure event when an error occurs while initializing the USB
- * interface.
- *
- * \see Events.h for more information on this event.
- */
- RAISES_EVENT(USB_InitFailure);
- #endif
-
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index c96a440a0..befc996a2 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -745,9 +745,9 @@
* \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \ingroup Group_PipeRW
*
@@ -769,9 +769,9 @@
* \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \ingroup Group_PipeRW
*
@@ -793,9 +793,9 @@
* Between each USB packet, the given stream callback function is executed repeatedly until the next packet is ready,
* allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \ingroup Group_PipeRW
*
@@ -816,9 +816,9 @@
* \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \ingroup Group_PipeRW
*
@@ -840,9 +840,9 @@
* \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
* executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
*
- * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token
- * NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled
- * and this function has the Callback parameter omitted.
+ * The callback routine should be created according to the information in \ref Group_StreamCallbacks.
+ * If the token NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are
+ * disabled and this function has the Callback parameter omitted.
*
* \ingroup Group_PipeRW
*