aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel/Endpoint.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-08-17 12:38:24 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-08-17 12:38:24 +0000
commitecd82778cf9a53e34f13d9ce6dcd7e1a4cf76b70 (patch)
treec9c4a38b9a264ea77f4a18b64b3da51560d7f079 /LUFA/Drivers/USB/LowLevel/Endpoint.h
parent09bedd6555a72c70f6d6bfb965225d44dec171cd (diff)
downloadlufa-ecd82778cf9a53e34f13d9ce6dcd7e1a4cf76b70.tar.gz
lufa-ecd82778cf9a53e34f13d9ce6dcd7e1a4cf76b70.tar.bz2
lufa-ecd82778cf9a53e34f13d9ce6dcd7e1a4cf76b70.zip
Added beginnings of a new AVRISP-MKII clone project.
Added new Endpoint_SetEndpointDirection() macro to set the current endpoint direction for bidirectional endpoints. Renamed internal USB_INT_ENDPOINT_SETUP macro to USB_INT_RXSTPI to fit in with the rest of the interrupt vector macros.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Endpoint.h')
-rw-r--r--LUFA/Drivers/USB/LowLevel/Endpoint.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index a9ec122a2..e27ac50a6 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h
@@ -331,6 +331,12 @@
* \return The currently selected endpoint's direction, as a ENDPOINT_DIR_* mask.
*/
static inline uint8_t Endpoint_GetEndpointDirection(void);
+
+ /** Sets the direction of the currently selected endpoint.
+ *
+ * \param DirectionMask New endpoint direction, as a ENDPOINT_DIR_* mask.
+ */
+ static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask);
#else
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
#define Endpoint_BytesInEndpoint() UEBCX
@@ -399,6 +405,8 @@
#define Endpoint_ResetDataToggle() MACROS{ UECONX |= (1 << RSTDT); }MACROE
#define Endpoint_GetEndpointDirection() (UECFG0X & ENDPOINT_DIR_IN)
+
+ #define Endpoint_SetEndpointDirection(dir) MACROS{ UECFG0X = ((UECFG0X & ~ENDPOINT_DIR_IN) | dir); }MACROE
#endif
/* Enums: */