LUFA Endpoint_ConfigureEndpoint double check

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Going from 111009 to 120730, on a GenericHID style project.

In the 120730 Endpoint_ConfigureEndpoint, for bank size param, does 1= single bank, 2= doublebank?

For the endpoint addressing, I went from this:

#define GENERIC_IN_EPNUM     1
#define GENERIC_OUT_EPNUM     2

To this...

#define GENERIC_IN_EPNUM     (ENDPOINT_DIR_IN | 1)
#define GENERIC_OUT_EPNUM    (ENDPOINT_DIR_OUT |2)

Correct?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another LUFA related question. In 120730, I have two different implementions of uint16_t CALLBACK_USB_GetDescriptor. The Descriptors.h that I pulled from the HID demo in 1200730 is as follows:

uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
		                            const uint8_t wIndex,
		                            const void** const DescriptorAddress)
		                            ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);

And the Device.h has the following:

			uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
			                                    const uint8_t wIndex,
			                                    const void** const DescriptorAddress
			#if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) || defined(__DOXYGEN__)) && \
			    !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
			                                    , uint8_t* MemoryAddressSpace
			#endif
			                                    ) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);

That difference is causing a "conflicting types for 'CALLBACK_USB_GetDescriptor' error.

Anyone been down this path? I have the following defined in lufaconfig.h:

		#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
		#define USB_DEVICE_ONLY
		#define USE_FLASH_DESCRIPTORS
		#define FIXED_CONTROL_ENDPOINT_SIZE      8
		#define FIXED_NUM_CONFIGURATIONS         1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I got rid of the 'conflicting types' error. Now I have multiple definiton erros for functions in Endpoint_AVR8.c (and a few other files). The worst part, I'm not really sure what made the 'conflicting types' error go away. Gonna stop 'knob fiddling', go read, and hope someone chimes in with a 'hey dummy, you forgot too...' reply.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Weird. I have a "multiple definition of 'Endpoint_WaituntilReady' error in Device_AVR8.h but 'Endpoint_WaituntilReady' is not in Device_AVR8.h

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Solved! In the project file, for some reason it had a few of the LUFA .c files listed twice, and the 2nd one did not have a tag. Anyways, manually removed the extra entries in the .cproj file and it built without error or warnings.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh yeh, can anyone verify this:

Quote:
Going from 111009 to 120730, on a GenericHID style project.

In the 120730 Endpoint_ConfigureEndpoint, for bank size param, does 1= single bank, 2= doublebank?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Oh yeh, can anyone verify this:

Yes, 2 will make the endpoint double banked if possible.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks for the confirmation. love the LUFA.