From 47f6a35013b2c6a370e5dce29aa6da3a96844695 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 14 Apr 2012 14:41:17 +0000 Subject: Reintegrate the FullEPAddresses development branch into trunk. --- LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c') diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c index bcf904d99..4440b7631 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c @@ -42,6 +42,21 @@ uint8_t USB_Device_ControlEndpointSize = ENDPOINT_CONTROLEP_DEFAULT_SIZE; #endif +bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table, + const uint8_t Entries) +{ + for (uint8_t i = 0; i < Entries; i++) + { + if (!(Table[i].Address)) + continue; + + if (!(Endpoint_ConfigureEndpoint(Table[i].Address, Table[i].Type, Table[i].Size, Table[i].Banks))) + return false; + } + + return true; +} + bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number, const uint8_t UECFG0XData, const uint8_t UECFG1XData) -- cgit v1.2.3