Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.
This commit is contained in:
parent
e8570c4a37
commit
359fbfe14d
395 changed files with 9912 additions and 2756 deletions
|
@ -106,7 +106,7 @@ const AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescript
|
|||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = (ENDPOINT_DIR_IN | AVRISP_DATA_IN_EPNUM),
|
||||
.EndpointAddress = AVRISP_DATA_IN_EPADDR,
|
||||
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = AVRISP_DATA_EPSIZE,
|
||||
.PollingIntervalMS = 0x0A
|
||||
|
@ -116,7 +116,7 @@ const AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescript
|
|||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = (ENDPOINT_DIR_OUT | AVRISP_DATA_OUT_EPNUM),
|
||||
.EndpointAddress = AVRISP_DATA_OUT_EPADDR,
|
||||
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = AVRISP_DATA_EPSIZE,
|
||||
.PollingIntervalMS = 0x0A
|
||||
|
|
|
@ -42,18 +42,15 @@
|
|||
#include <LUFA/Drivers/USB/USB.h>
|
||||
|
||||
/* Macros: */
|
||||
#if !defined(LIBUSB_DRIVER_COMPAT)
|
||||
/** Endpoint number of the AVRISP data OUT endpoint. */
|
||||
#define AVRISP_DATA_OUT_EPNUM 2
|
||||
#if !defined(LIBUSB_DRIVER_COMPAT) || defined(__DOXYGEN__)
|
||||
/** Endpoint address of the AVRISP data OUT endpoint. */
|
||||
#define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
|
||||
|
||||
/** Endpoint number of the AVRISP data IN endpoint. */
|
||||
#define AVRISP_DATA_IN_EPNUM 2
|
||||
/** Endpoint address of the AVRISP data IN endpoint. */
|
||||
#define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)
|
||||
#else
|
||||
/** Endpoint number of the AVRISP data OUT endpoint. */
|
||||
#define AVRISP_DATA_OUT_EPNUM 2
|
||||
|
||||
/** Endpoint number of the AVRISP data IN endpoint. */
|
||||
#define AVRISP_DATA_IN_EPNUM 3
|
||||
#define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
|
||||
#define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 3)
|
||||
#endif
|
||||
|
||||
/** Size in bytes of the AVRISP data endpoint. */
|
||||
|
|
|
@ -26,7 +26,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - XPLAIN Serial Bridge/PDI Programmer Device Demo"
|
||||
PROJECT_NAME = "LUFA Library - XPLAIN Serial Bridge/PDI Programmer Project"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -143,7 +143,7 @@ const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
|
|||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
|
||||
.EndpointAddress = CDC_NOTIFICATION_EPADDR,
|
||||
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
|
||||
.PollingIntervalMS = 0xFF
|
||||
|
@ -169,20 +169,20 @@ const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
|
|||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
|
||||
.EndpointAddress = CDC_RX_EPADDR,
|
||||
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = CDC_TXRX_EPSIZE,
|
||||
.PollingIntervalMS = 0x01
|
||||
.PollingIntervalMS = 0x05
|
||||
},
|
||||
|
||||
.CDC_DataInEndpoint =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
|
||||
.EndpointAddress = CDC_TX_EPADDR,
|
||||
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = CDC_TXRX_EPSIZE,
|
||||
.PollingIntervalMS = 0x01
|
||||
.PollingIntervalMS = 0x05
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
#include <LUFA/Drivers/USB/USB.h>
|
||||
|
||||
/* Macros: */
|
||||
/** Endpoint number of the CDC device-to-host notification IN endpoint. */
|
||||
#define CDC_NOTIFICATION_EPNUM 2
|
||||
/** Endpoint address of the CDC device-to-host notification IN endpoint. */
|
||||
#define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
|
||||
|
||||
/** Endpoint number of the CDC device-to-host data IN endpoint. */
|
||||
#define CDC_TX_EPNUM 3
|
||||
/** Endpoint address of the CDC device-to-host data IN endpoint. */
|
||||
#define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
|
||||
|
||||
/** Endpoint number of the CDC host-to-device data OUT endpoint. */
|
||||
#define CDC_RX_EPNUM 4
|
||||
/** Endpoint address of the CDC host-to-device data OUT endpoint. */
|
||||
#define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
|
||||
|
||||
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
|
||||
#define CDC_NOTIFICATION_EPSIZE 8
|
||||
|
|
|
@ -48,18 +48,24 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
|
|||
.Config =
|
||||
{
|
||||
.ControlInterfaceNumber = 0,
|
||||
|
||||
.DataINEndpointNumber = CDC_TX_EPNUM,
|
||||
.DataINEndpointSize = CDC_TXRX_EPSIZE,
|
||||
.DataINEndpointDoubleBank = true,
|
||||
|
||||
.DataOUTEndpointNumber = CDC_RX_EPNUM,
|
||||
.DataOUTEndpointSize = CDC_TXRX_EPSIZE,
|
||||
.DataOUTEndpointDoubleBank = true,
|
||||
|
||||
.NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
|
||||
.NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
|
||||
.NotificationEndpointDoubleBank = false,
|
||||
.DataINEndpoint =
|
||||
{
|
||||
.Address = CDC_TX_EPADDR,
|
||||
.Size = CDC_TXRX_EPSIZE,
|
||||
.Banks = 1,
|
||||
},
|
||||
.DataOUTEndpoint =
|
||||
{
|
||||
.Address = CDC_RX_EPADDR,
|
||||
.Size = CDC_TXRX_EPSIZE,
|
||||
.Banks = 1,
|
||||
},
|
||||
.NotificationEndpoint =
|
||||
{
|
||||
.Address = CDC_NOTIFICATION_EPADDR,
|
||||
.Size = CDC_NOTIFICATION_EPSIZE,
|
||||
.Banks = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -105,7 +111,7 @@ void AVRISP_Task(void)
|
|||
|
||||
V2Params_UpdateParamValues();
|
||||
|
||||
Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
|
||||
Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
|
||||
|
||||
/* Check to see if a V2 Protocol command has been received */
|
||||
if (Endpoint_IsOUTReceived())
|
||||
|
@ -213,12 +219,10 @@ void EVENT_USB_Device_ConfigurationChanged(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
|
||||
AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
||||
|
||||
#if defined(LIBUSB_DRIVER_COMPAT)
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
|
||||
AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
||||
#endif
|
||||
|
||||
/* Configure the V2 protocol packet handler */
|
||||
|
|
|
@ -46,9 +46,7 @@
|
|||
#include "AVRISPDescriptors.h"
|
||||
#include "USARTDescriptors.h"
|
||||
|
||||
// cppcheck-suppress missingInclude
|
||||
#include "Lib/V2Protocol.h"
|
||||
// cppcheck-suppress missingInclude
|
||||
#include "Lib/SoftUART.h"
|
||||
|
||||
#include <LUFA/Version.h>
|
||||
|
|
|
@ -79,11 +79,6 @@
|
|||
* <td><b>Description:</b></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>BUFFER_SIZE</td>
|
||||
* <td>LightweightRingBuff.h</td>
|
||||
* <td>Defines the maximum number of bytes which can be buffered in each Ring Buffer when in serial bridge mode.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>LIBUSB_DRIVER_COMPAT</td>
|
||||
* <td>Makefile LUFA_OPTS</td>
|
||||
* <td>Define to switch to a non-standard endpoint scheme, breaking compatibility with AVRStudio under Windows but making
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue