Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
06d00bb9
Commit
06d00bb9
authored
14 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Ensure the library builds cleanly in device mode for architectures lacking multiple address spaces.
parent
8f5ab27d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LUFA/Drivers/USB/Core/DeviceStandardReq.c
+20
-11
20 additions, 11 deletions
LUFA/Drivers/USB/Core/DeviceStandardReq.c
with
20 additions
and
11 deletions
LUFA/Drivers/USB/Core/DeviceStandardReq.c
+
20
−
11
View file @
06d00bb9
...
...
@@ -138,18 +138,21 @@ static void USB_Device_SetConfiguration(void)
#else
USB_Descriptor_Device_t
*
DevDescriptorPtr
;
#if defined(USE_FLASH_DESCRIPTORS)
#define MemoryAddressSpace MEMSPACE_FLASH
#elif defined(USE_EEPROM_DESCRIPTORS)
#define MemoryAddressSpace MEMSPACE_EEPROM
#elif defined(USE_SRAM_DESCRIPTORS)
#define MemoryAddressSpace MEMSPACE_SRAM
#else
uint8_t
MemoryAddressSpace
;
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE)
#if defined(USE_FLASH_DESCRIPTORS)
#define MemoryAddressSpace MEMSPACE_FLASH
#elif defined(USE_EEPROM_DESCRIPTORS)
#define MemoryAddressSpace MEMSPACE_EEPROM
#elif defined(USE_SRAM_DESCRIPTORS)
#define MemoryAddressSpace MEMSPACE_SRAM
#else
uint8_t
MemoryAddressSpace
;
#endif
#endif
if
(
CALLBACK_USB_GetDescriptor
((
DTYPE_Device
<<
8
),
0
,
(
void
*
)
&
DevDescriptorPtr
#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))
,
&
MemoryAddressSpace
#endif
)
==
NO_DESCRIPTOR
)
...
...
@@ -157,6 +160,7 @@ static void USB_Device_SetConfiguration(void)
return
;
}
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE)
if
(
MemoryAddressSpace
==
MEMSPACE_FLASH
)
{
if
(((
uint8_t
)
USB_ControlRequest
.
wValue
>
pgm_read_byte
(
&
DevDescriptorPtr
->
NumberOfConfigurations
)))
...
...
@@ -172,6 +176,10 @@ static void USB_Device_SetConfiguration(void)
if
((
uint8_t
)
USB_ControlRequest
.
wValue
>
DevDescriptorPtr
->
NumberOfConfigurations
)
return
;
}
#else
if
((
uint8_t
)
USB_ControlRequest
.
wValue
>
DevDescriptorPtr
->
NumberOfConfigurations
)
return
;
#endif
#endif
Endpoint_ClearSETUP
();
...
...
@@ -224,7 +232,8 @@ static void USB_Device_GetDescriptor(void)
const
void
*
DescriptorPointer
;
uint16_t
DescriptorSize
;
#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))
uint8_t
DescriptorAddressSpace
;
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment