Add in new architecture attribute defines to selectively remove the EEPROM and FLASH memory space functions on architectures which do not have seperate memory address spaces.

This commit is contained in:
Dean Camera 2011-03-21 11:10:02 +00:00
parent aba7932a5c
commit f595043584
10 changed files with 240 additions and 173 deletions

View file

@ -238,7 +238,8 @@ static void USB_Device_GetDescriptor(void)
if ((DescriptorSize = CALLBACK_USB_GetDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex,
&DescriptorPointer
#if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
, &DescriptorAddressSpace
#endif
)) == NO_DESCRIPTOR)
@ -248,7 +249,7 @@ static void USB_Device_GetDescriptor(void)
Endpoint_ClearSETUP();
#if defined(USE_RAM_DESCRIPTORS)
#if defined(USE_RAM_DESCRIPTORS) || !defined(ARCH_HAS_MULTI_ADDRESS_SPACE)
Endpoint_Write_Control_Stream_LE(DescriptorPointer, DescriptorSize);
#elif defined(USE_EEPROM_DESCRIPTORS)
Endpoint_Write_Control_EStream_LE(DescriptorPointer, DescriptorSize);