projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0063f72
)
Use puts_P() and printf_P() instead of the normal variants where possible in the...
author
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 28 Apr 2010 14:33:10 +0000
(14:33 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 28 Apr 2010 14:33:10 +0000
(14:33 +0000)
19 files changed:
Bootloaders/makefile
patch
|
blob
|
blame
|
history
Demos/Device/makefile
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MouseHost/MouseHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
patch
|
blob
|
blame
|
history
Demos/Host/makefile
patch
|
blob
|
blame
|
history
Demos/makefile
patch
|
blob
|
blame
|
history
LUFA/Common/Common.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/MassStorage.c
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
makefile
patch
|
blob
|
blame
|
history
diff --git
a/Bootloaders/makefile
b/Bootloaders/makefile
index
80017d6
..
5866342
100644
(file)
--- a/
Bootloaders/makefile
+++ b/
Bootloaders/makefile
@@
-14,16
+14,16
@@
# code.
\r
\r
all:
\r
# code.
\r
\r
all:
\r
- make -C
'DFU/'
clean
\r
- make -C
'DFU/'
all
\r
+ make -C
DFU
clean
\r
+ make -C
DFU
all
\r
\r
\r
- make -C
'CDC/'
clean
\r
- make -C
'CDC/'
all
\r
+ make -C
CDC
clean
\r
+ make -C
CDC
all
\r
\r
\r
- make -C
'TeensyHID/'
clean
\r
- make -C
'TeensyHID/'
all
\r
+ make -C
TeensyHID
clean
\r
+ make -C
TeensyHID
all
\r
\r
%:
\r
\r
%:
\r
- make -C
'DFU/'
$@
\r
- make -C
'CDC/'
$@
\r
- make -C
'TeensyHID/'
$@
\r
+ make -C
DFU
$@
\r
+ make -C
CDC
$@
\r
+ make -C
TeensyHID
$@
\r
diff --git
a/Demos/Device/makefile
b/Demos/Device/makefile
index
6a0c0ef
..
7d2b91d
100644
(file)
--- a/
Demos/Device/makefile
+++ b/
Demos/Device/makefile
@@
-14,5
+14,5
@@
# code.
%:
# code.
%:
- make -C ClassDriver
/
$@
- make -C LowLevel
/
$@
+ make -C ClassDriver $@
+ make -C LowLevel $@
diff --git
a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
index
32c9b69
..
7be38dd
100644
(file)
--- a/
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
@@
-85,7
+85,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-94,7
+94,7
@@
int main(void)
if (HID_Host_ConfigurePipes(&Joystick_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
if (HID_Host_ConfigurePipes(&Joystick_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Joystick.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Joystick.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-102,7
+102,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-110,13
+110,13
@@
int main(void)
\r
if (HID_Host_SetReportProtocol(&Joystick_HID_Interface) != 0)
\r
{
\r
\r
if (HID_Host_SetReportProtocol(&Joystick_HID_Interface) != 0)
\r
{
\r
- p
rintf("Error Setting Report Protocol Mode or Not a Valid Joystick.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Joystick.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Joystick Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Joystick Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
index
61292a4
..
c79c100
100644
(file)
--- a/
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
+++ b/
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
@@
-80,7
+80,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-89,7
+89,7
@@
int main(void)
if (HID_Host_ConfigurePipes(&Keyboard_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
if (HID_Host_ConfigurePipes(&Keyboard_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Keyboard.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Keyboard.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-97,7
+97,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-105,13
+105,13
@@
int main(void)
\r
if (HID_Host_SetBootProtocol(&Keyboard_HID_Interface) != 0)
\r
{
\r
\r
if (HID_Host_SetBootProtocol(&Keyboard_HID_Interface) != 0)
\r
{
\r
- p
rintf("Could not Set Boot Protocol Mode.\r\n"
);
\r
+ p
uts_P(PSTR("Could not Set Boot Protocol Mode.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Keyboard Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Keyboard Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
index
531757a
..
91ca844
100644
(file)
--- a/
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
@@
-85,7
+85,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-94,7
+94,7
@@
int main(void)
if (HID_Host_ConfigurePipes(&Keyboard_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
if (HID_Host_ConfigurePipes(&Keyboard_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Keyboard.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Keyboard.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-102,7
+102,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-110,13
+110,13
@@
int main(void)
\r
if (HID_Host_SetReportProtocol(&Keyboard_HID_Interface) != 0)
\r
{
\r
\r
if (HID_Host_SetReportProtocol(&Keyboard_HID_Interface) != 0)
\r
{
\r
- p
rintf("Error Setting Report Protocol Mode or Not a Valid Keyboard.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Keyboard.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Keyboard Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Keyboard Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
index
8fbf31b
..
6f30fa3
100644
(file)
--- a/
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
+++ b/
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
@@
-78,7
+78,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-87,7
+87,7
@@
int main(void)
if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError)
\r
{
\r
if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid MIDI Class Device.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid MIDI Class Device.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-95,13
+95,13
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("MIDI Device Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("MIDI Device Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
index
a442c1b
..
8b012b4
100644
(file)
--- a/
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
+++ b/
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
@@
-78,7
+78,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-87,7
+87,7
@@
int main(void)
if (MS_Host_ConfigurePipes(&FlashDisk_MS_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != MS_ENUMERROR_NoError)
\r
{
\r
if (MS_Host_ConfigurePipes(&FlashDisk_MS_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != MS_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Mass Storage Device.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Mass Storage Device.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-95,13
+95,13
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Mass Storage Device Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Mass Storage Device Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
@@
-111,17
+111,17
@@
int main(void)
uint8_t MaxLUNIndex;
\r
if (MS_Host_GetMaxLUN(&FlashDisk_MS_Interface, &MaxLUNIndex))
\r
{
\r
uint8_t MaxLUNIndex;
\r
if (MS_Host_GetMaxLUN(&FlashDisk_MS_Interface, &MaxLUNIndex))
\r
{
\r
- p
rintf("Error retrieving max LUN index.\r\n"
);
\r
+ p
uts_P(PSTR("Error retrieving max LUN index.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- printf
("Total LUNs: %d - Using first LUN in device.\r\n"
, (MaxLUNIndex + 1));
\r
+ printf
_P(PSTR("Total LUNs: %d - Using first LUN in device.\r\n")
, (MaxLUNIndex + 1));
\r
\r
if (MS_Host_ResetMSInterface(&FlashDisk_MS_Interface))
\r
{
\r
\r
if (MS_Host_ResetMSInterface(&FlashDisk_MS_Interface))
\r
{
\r
- p
rintf("Error resetting Mass Storage interface.\r\n"
);
\r
+ p
uts_P(PSTR("Error resetting Mass Storage interface.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-130,7
+130,7
@@
int main(void)
SCSI_Request_Sense_Response_t SenseData;
\r
if (MS_Host_RequestSense(&FlashDisk_MS_Interface, 0, &SenseData) != 0)
\r
{
\r
SCSI_Request_Sense_Response_t SenseData;
\r
if (MS_Host_RequestSense(&FlashDisk_MS_Interface, 0, &SenseData) != 0)
\r
{
\r
- p
rintf("Error retrieving device sense.\r\n"
);
\r
+ p
uts_P(PSTR("Error retrieving device sense.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-138,7
+138,7
@@
int main(void)
\r
if (MS_Host_PreventAllowMediumRemoval(&FlashDisk_MS_Interface, 0, true))
\r
{
\r
\r
if (MS_Host_PreventAllowMediumRemoval(&FlashDisk_MS_Interface, 0, true))
\r
{
\r
- p
rintf("Error setting Prevent Device Removal bit.\r\n"
);
\r
+ p
uts_P(PSTR("Error setting Prevent Device Removal bit.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-147,15
+147,15
@@
int main(void)
SCSI_Inquiry_Response_t InquiryData;
\r
if (MS_Host_GetInquiryData(&FlashDisk_MS_Interface, 0, &InquiryData))
\r
{
\r
SCSI_Inquiry_Response_t InquiryData;
\r
if (MS_Host_GetInquiryData(&FlashDisk_MS_Interface, 0, &InquiryData))
\r
{
\r
- p
rintf("Error retrieving device Inquiry data.\r\n"
);
\r
+ p
uts_P(PSTR("Error retrieving device Inquiry data.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- printf
("Vendor \"%.8s\", Product \"%.16s\"\r\n"
, InquiryData.VendorID, InquiryData.ProductID);
\r
+ printf
_P(PSTR("Vendor \"%.8s\", Product \"%.16s\"\r\n")
, InquiryData.VendorID, InquiryData.ProductID);
\r
\r
\r
- p
rintf("Waiting until ready...\r\n"
);
\r
+ p
uts_P(PSTR("Waiting until ready...\r\n")
);
\r
\r
for (;;)
\r
{
\r
\r
for (;;)
\r
{
\r
@@
-167,37
+167,37
@@
int main(void)
/* Check if an error other than a logical command error (device busy) received */
\r
if (ErrorCode != MS_ERROR_LOGICAL_CMD_FAILED)
\r
{
\r
/* Check if an error other than a logical command error (device busy) received */
\r
if (ErrorCode != MS_ERROR_LOGICAL_CMD_FAILED)
\r
{
\r
- p
rintf("Error waiting for device to be ready.\r\n"
);
\r
+ p
uts_P(PSTR("Error waiting for device to be ready.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
}
\r
\r
- p
rintf("Retrieving Capacity... "
);
\r
+ p
uts_P(PSTR("Retrieving Capacity...\r\n")
);
\r
\r
SCSI_Capacity_t DiskCapacity;
\r
if (MS_Host_ReadDeviceCapacity(&FlashDisk_MS_Interface, 0, &DiskCapacity))
\r
{
\r
\r
SCSI_Capacity_t DiskCapacity;
\r
if (MS_Host_ReadDeviceCapacity(&FlashDisk_MS_Interface, 0, &DiskCapacity))
\r
{
\r
- p
rintf("Error retrieving device capacity.\r\n"
);
\r
+ p
uts_P(PSTR("Error retrieving device capacity.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- printf
("%lu blocks of %lu bytes.\r\n"
, DiskCapacity.Blocks, DiskCapacity.BlockSize);
\r
+ printf
_P(PSTR("%lu blocks of %lu bytes.\r\n")
, DiskCapacity.Blocks, DiskCapacity.BlockSize);
\r
\r
uint8_t BlockBuffer[DiskCapacity.BlockSize];
\r
\r
if (MS_Host_ReadDeviceBlocks(&FlashDisk_MS_Interface, 0, 0x00000000, 1, DiskCapacity.BlockSize, BlockBuffer))
\r
{
\r
\r
uint8_t BlockBuffer[DiskCapacity.BlockSize];
\r
\r
if (MS_Host_ReadDeviceBlocks(&FlashDisk_MS_Interface, 0, 0x00000000, 1, DiskCapacity.BlockSize, BlockBuffer))
\r
{
\r
- p
rintf("Error reading device block.\r\n"
);
\r
+ p
uts_P(PSTR("Error reading device block.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("\r\nContents of first block:\r\n"
);
\r
+ p
uts_P(PSTR("\r\nContents of first block:")
);
\r
\r
for (uint16_t Chunk = 0; Chunk < (DiskCapacity.BlockSize >> 4); Chunk++)
\r
{
\r
\r
for (uint16_t Chunk = 0; Chunk < (DiskCapacity.BlockSize >> 4); Chunk++)
\r
{
\r
@@
-210,7
+210,7
@@
int main(void)
printf_P(PSTR("%.2X "), CurrByte);
\r
}
\r
\r
printf_P(PSTR("%.2X "), CurrByte);
\r
}
\r
\r
- printf
(" "
);
\r
+ printf
_P(PSTR(" ")
);
\r
\r
/* Print out the 16 bytes of the chunk in ASCII format */
\r
for (uint8_t ByteOffset = 0; ByteOffset < (1 << 4); ByteOffset++)
\r
\r
/* Print out the 16 bytes of the chunk in ASCII format */
\r
for (uint8_t ByteOffset = 0; ByteOffset < (1 << 4); ByteOffset++)
\r
@@
-219,7
+219,7
@@
int main(void)
putchar(isprint(CurrByte) ? CurrByte : '.');
\r
}
\r
\r
putchar(isprint(CurrByte) ? CurrByte : '.');
\r
}
\r
\r
- printf
("\r\n"
);
\r
+ printf
_P(PSTR("\r\n")
);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
diff --git
a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index
af75d4b
..
2c42e64
100644
(file)
--- a/
Demos/Host/ClassDriver/MouseHost/MouseHost.c
+++ b/
Demos/Host/ClassDriver/MouseHost/MouseHost.c
@@
-80,7
+80,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-89,7
+89,7
@@
int main(void)
if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Mouse.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Mouse.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-97,7
+97,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-105,13
+105,13
@@
int main(void)
\r
if (HID_Host_SetBootProtocol(&Mouse_HID_Interface) != 0)
\r
{
\r
\r
if (HID_Host_SetBootProtocol(&Mouse_HID_Interface) != 0)
\r
{
\r
- p
rintf("Could not Set Boot Protocol Mode.\r\n"
);
\r
+ p
uts_P(PSTR("Could not Set Boot Protocol Mode.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Mouse Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Mouse Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
index
296f86b
..
40a74f5
100644
(file)
--- a/
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
+++ b/
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
@@
-85,7
+85,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-94,7
+94,7
@@
int main(void)
if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Mouse.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Mouse.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-102,7
+102,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-110,13
+110,13
@@
int main(void)
\r
if (HID_Host_SetReportProtocol(&Mouse_HID_Interface) != 0)
\r
{
\r
\r
if (HID_Host_SetReportProtocol(&Mouse_HID_Interface) != 0)
\r
{
\r
- p
rintf("Error Setting Report Protocol Mode or Not a Valid Mouse.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Mouse.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Mouse Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Mouse Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
index
d2baad6
..
df71f4c
100644
(file)
--- a/
Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
+++ b/
Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
@@
-77,7
+77,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-86,7
+86,7
@@
int main(void)
if (PRNT_Host_ConfigurePipes(&Printer_PRNT_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != PRNT_ENUMERROR_NoError)
\r
{
\r
if (PRNT_Host_ConfigurePipes(&Printer_PRNT_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != PRNT_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Printer Class Device.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Printer Class Device.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-94,7
+94,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-102,32
+102,32
@@
int main(void)
\r
if (PRNT_Host_SetBidirectionalMode(&Printer_PRNT_Interface) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (PRNT_Host_SetBidirectionalMode(&Printer_PRNT_Interface) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Bidirectional Mode.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Bidirectional Mode.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Printer Device Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Printer Device Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
case HOST_STATE_Configured:
\r
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
case HOST_STATE_Configured:
\r
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
\r
\r
- p
rintf("Retrieving Device ID...\r\n"
);
\r
+ p
uts_P(PSTR("Retrieving Device ID...\r\n")
);
\r
\r
char DeviceIDString[300];
\r
if (PRNT_Host_GetDeviceID(&Printer_PRNT_Interface, DeviceIDString,
\r
sizeof(DeviceIDString)) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
char DeviceIDString[300];
\r
if (PRNT_Host_GetDeviceID(&Printer_PRNT_Interface, DeviceIDString,
\r
sizeof(DeviceIDString)) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Getting Device ID.\r\n"
);
\r
+ p
uts_P(PSTR("Error Getting Device ID.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- printf
("Device ID: %s.\r\n"
, DeviceIDString);
\r
+ printf
_P(PSTR("Device ID: %s.\r\n")
, DeviceIDString);
\r
\r
char TestPageData[] = "\033%-12345X\033E" "LUFA PCL Test Page" "\033E\033%-12345X";
\r
uint16_t TestPageLength = strlen(TestPageData);
\r
\r
char TestPageData[] = "\033%-12345X\033E" "LUFA PCL Test Page" "\033E\033%-12345X";
\r
uint16_t TestPageLength = strlen(TestPageData);
\r
@@
-136,7
+136,7
@@
int main(void)
\r
if (PRNT_Host_SendData(&Printer_PRNT_Interface, &TestPageData, TestPageLength) != PIPE_RWSTREAM_NoError)
\r
{
\r
\r
if (PRNT_Host_SendData(&Printer_PRNT_Interface, &TestPageData, TestPageLength) != PIPE_RWSTREAM_NoError)
\r
{
\r
- p
rintf("Error Sending Page Data.\r\n"
);
\r
+ p
uts_P(PSTR("Error Sending Page Data.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
diff --git
a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
index
f5c3e42
..
c4f2d0e
100644
(file)
--- a/
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
+++ b/
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
@@
-85,7
+85,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-94,7
+94,7
@@
int main(void)
if (RNDIS_Host_ConfigurePipes(&Ethernet_RNDIS_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != RNDIS_ENUMERROR_NoError)
\r
{
\r
if (RNDIS_Host_ConfigurePipes(&Ethernet_RNDIS_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != RNDIS_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid RNDIS Class Device.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid RNDIS Class Device.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-102,7
+102,7
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-110,20
+110,20
@@
int main(void)
\r
if (RNDIS_Host_InitializeDevice(&Ethernet_RNDIS_Interface) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (RNDIS_Host_InitializeDevice(&Ethernet_RNDIS_Interface) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Initializing Device.\r\n"
);
\r
+ p
uts_P(PSTR("Error Initializing Device.\r\n")
);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- printf
("Device Max Transfer Size: %lu bytes.\r\n"
, Ethernet_RNDIS_Interface.State.DeviceMaxPacketSize);
\r
+ printf
_P(PSTR("Device Max Transfer Size: %lu bytes.\r\n")
, Ethernet_RNDIS_Interface.State.DeviceMaxPacketSize);
\r
\r
uint32_t PacketFilter = (REMOTE_NDIS_PACKET_DIRECTED | REMOTE_NDIS_PACKET_BROADCAST | REMOTE_NDIS_PACKET_ALL_MULTICAST);
\r
if (RNDIS_Host_SetRNDISProperty(&Ethernet_RNDIS_Interface, OID_GEN_CURRENT_PACKET_FILTER,
\r
&PacketFilter, sizeof(PacketFilter)) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
uint32_t PacketFilter = (REMOTE_NDIS_PACKET_DIRECTED | REMOTE_NDIS_PACKET_BROADCAST | REMOTE_NDIS_PACKET_ALL_MULTICAST);
\r
if (RNDIS_Host_SetRNDISProperty(&Ethernet_RNDIS_Interface, OID_GEN_CURRENT_PACKET_FILTER,
\r
&PacketFilter, sizeof(PacketFilter)) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Packet Filter.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Packet Filter.\r\n")
);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
@@
-134,16
+134,16
@@
int main(void)
if (RNDIS_Host_QueryRNDISProperty(&Ethernet_RNDIS_Interface, OID_GEN_VENDOR_ID,
\r
&VendorID, sizeof(VendorID)) != HOST_SENDCONTROL_Successful)
\r
{
\r
if (RNDIS_Host_QueryRNDISProperty(&Ethernet_RNDIS_Interface, OID_GEN_VENDOR_ID,
\r
&VendorID, sizeof(VendorID)) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Getting Vendor ID.\r\n"
);
\r
+ p
uts_P(PSTR("Error Getting Vendor ID.\r\n")
);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- printf
("Device Vendor ID: 0x%08lX\r\n"
, VendorID);
\r
+ printf
_P(PSTR("Device Vendor ID: 0x%08lX\r\n")
, VendorID);
\r
\r
\r
- p
rintf("RNDIS Device Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("RNDIS Device Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
@@
-168,12
+168,12
@@
void PrintIncomingPackets(void)
uint16_t PacketLength;
\r
RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);
\r
\r
uint16_t PacketLength;
\r
RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);
\r
\r
- printf
("***PACKET (Size %d)***\r\n"
, PacketLength);
\r
+ printf
_P(PSTR("***PACKET (Size %d)***\r\n")
, PacketLength);
\r
\r
for (uint16_t i = 0; i < PacketLength; i++)
\r
printf("%02x ", PacketBuffer[i]);
\r
\r
\r
for (uint16_t i = 0; i < PacketLength; i++)
\r
printf("%02x ", PacketBuffer[i]);
\r
\r
- printf
("\r\n\r\n"
);
\r
+ printf
_P(PSTR("\r\n\r\n")
);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
}
\r
diff --git
a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
index
81bfbe4
..
944b7fe
100644
(file)
--- a/
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
+++ b/
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
@@
-80,7
+80,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-89,7
+89,7
@@
int main(void)
if (SImage_Host_ConfigurePipes(&DigitalCamera_SI_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != SI_ENUMERROR_NoError)
\r
{
\r
if (SImage_Host_ConfigurePipes(&DigitalCamera_SI_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != SI_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid Still Image Class Device.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid Still Image Class Device.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-97,43
+97,43
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Still Image Device Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("Still Image Device Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
case HOST_STATE_Configured:
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
case HOST_STATE_Configured:
\r
- p
rintf("Opening Session...\r\n"
);
\r
+ p
uts_P(PSTR("Opening Session...\r\n")
);
\r
\r
if (SImage_Host_OpenSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError)
\r
{
\r
\r
if (SImage_Host_OpenSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError)
\r
{
\r
- p
rintf("Could not open PIMA session.\r\n"
);
\r
+ p
uts_P(PSTR("Could not open PIMA session.\r\n")
);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Turning off Device...\r\n"
);
\r
+ p
uts_P(PSTR("Turning off Device...\r\n")
);
\r
\r
SImage_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, NULL);
\r
if (SImage_Host_ReceiveResponse(&DigitalCamera_SI_Interface))
\r
{
\r
\r
SImage_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, NULL);
\r
if (SImage_Host_ReceiveResponse(&DigitalCamera_SI_Interface))
\r
{
\r
- p
rintf("Could not turn off device.\r\n"
);
\r
+ p
uts_P(PSTR("Could not turn off device.\r\n")
);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("Device Off.\r\n"
);
\r
+ p
uts_P(PSTR("Device Off.\r\n")
);
\r
\r
\r
- p
rintf("Closing Session...\r\n"
);
\r
+ p
uts_P(PSTR("Closing Session...\r\n")
);
\r
\r
if (SImage_Host_CloseSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError)
\r
{
\r
\r
if (SImage_Host_CloseSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError)
\r
{
\r
- p
rintf("Could not close PIMA session.\r\n"
);
\r
+ p
uts_P(PSTR("Could not close PIMA session.\r\n")
);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
diff --git
a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
index
df6ad97
..
041a534
100644
(file)
--- a/
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
+++ b/
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
@@
-80,7
+80,7
@@
int main(void)
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
\r
sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
\r
{
\r
- p
rintf("Error Retrieving Configuration Descriptor.\r\n"
);
\r
+ p
uts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-89,7
+89,7
@@
int main(void)
if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != CDC_ENUMERROR_NoError)
\r
{
\r
if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface,
\r
ConfigDescriptorSize, ConfigDescriptorData) != CDC_ENUMERROR_NoError)
\r
{
\r
- p
rintf("Attached Device Not a Valid CDC Class Device.\r\n"
);
\r
+ p
uts_P(PSTR("Attached Device Not a Valid CDC Class Device.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
@@
-97,13
+97,13
@@
int main(void)
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
\r
{
\r
- p
rintf("Error Setting Device Configuration.\r\n"
);
\r
+ p
uts_P(PSTR("Error Setting Device Configuration.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
break;
\r
}
\r
\r
- p
rintf("CDC Device Enumerated.\r\n"
);
\r
+ p
uts_P(PSTR("CDC Device Enumerated.\r\n")
);
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
USB_HostState = HOST_STATE_Configured;
\r
break;
\r
diff --git
a/Demos/Host/makefile
b/Demos/Host/makefile
index
6a0c0ef
..
7d2b91d
100644
(file)
--- a/
Demos/Host/makefile
+++ b/
Demos/Host/makefile
@@
-14,5
+14,5
@@
# code.
%:
# code.
%:
- make -C ClassDriver
/
$@
- make -C LowLevel
/
$@
+ make -C ClassDriver $@
+ make -C LowLevel $@
diff --git
a/Demos/makefile
b/Demos/makefile
index
38c9775
..
af8932b
100644
(file)
--- a/
Demos/makefile
+++ b/
Demos/makefile
@@
-14,6
+14,6
@@
# code.
%:
# code.
%:
- make -C Device
/
$@
- make -C Host
/
$@
- make -C DualRole
/
$@
+ make -C Device $@
+ make -C Host $@
+ make -C DualRole $@
diff --git
a/LUFA/Common/Common.h
b/LUFA/Common/Common.h
index
5f1b2ea
..
a59a213
100644
(file)
--- a/
LUFA/Common/Common.h
+++ b/
LUFA/Common/Common.h
@@
-164,18
+164,18
@@
* \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed
\r
* \param[in] Bytes Length of the data in bytes
\r
*/
\r
* \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed
\r
* \param[in] Bytes Length of the data in bytes
\r
*/
\r
- static inline void SwapEndian_n(
uint8_t
* Data, uint8_t Bytes);
\r
- static inline void SwapEndian_n(
uint8_t
* Data, uint8_t Bytes)
\r
+ static inline void SwapEndian_n(
void
* Data, uint8_t Bytes);
\r
+ static inline void SwapEndian_n(
void
* Data, uint8_t Bytes)
\r
{
\r
{
\r
- uint8_t
Temp
;
\r
-
\r
+ uint8_t
* CurrDataPos = Data
;
\r
+
\r
while (Bytes)
\r
{
\r
while (Bytes)
\r
{
\r
-
Temp = *Data
;
\r
- *
Data = *(Data
+ Bytes - 1);
\r
- *(
Data
+ Bytes - 1) = Temp;
\r
+
uint8_t Temp = *CurrDataPos
;
\r
+ *
CurrDataPos = *(CurrDataPos
+ Bytes - 1);
\r
+ *(
CurrDataPos
+ Bytes - 1) = Temp;
\r
\r
\r
-
Data
++;
\r
+
CurrDataPos
++;
\r
Bytes -= 2;
\r
}
\r
}
\r
Bytes -= 2;
\r
}
\r
}
\r
diff --git
a/LUFA/Drivers/USB/Class/Host/MassStorage.c
b/LUFA/Drivers/USB/Class/Host/MassStorage.c
index
4ec0b24
..
f148f4e
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/MassStorage.c
+++ b/
LUFA/Drivers/USB/Class/Host/MassStorage.c
@@
-134,7
+134,8
@@
static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
{
\r
uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
\r
\r
{
\r
uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
\r
\r
- SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag;
\r
+ SCSICommandBlock->Signature = CBW_SIGNATURE;
\r
+ SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag;
\r
\r
if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF)
\r
MSInterfaceInfo->State.TransactionTag = 1;
\r
\r
if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF)
\r
MSInterfaceInfo->State.TransactionTag = 1;
\r
@@
-334,7
+335,6
@@
uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, c
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = sizeof(SCSI_Inquiry_Response_t),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = sizeof(SCSI_Inquiry_Response_t),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
@@
-370,7
+370,6
@@
uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, co
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = 0,
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = 0,
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
@@
-407,7
+406,6
@@
uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = sizeof(SCSI_Capacity_t),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = sizeof(SCSI_Capacity_t),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
@@
-432,8
+430,8
@@
uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
if ((ErrorCode = MS_Host_SendCommand(MSInterfaceInfo, &SCSICommandBlock, DeviceCapacity)) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
if ((ErrorCode = MS_Host_SendCommand(MSInterfaceInfo, &SCSICommandBlock, DeviceCapacity)) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
-
DeviceCapacity->Blocks = SwapEndian_32(DeviceCapacity->Blocks
);
\r
-
DeviceCapacity->BlockSize = SwapEndian_32(DeviceCapacity->BlockSize
);
\r
+
SwapEndian_n(&DeviceCapacity->Blocks, sizeof(DeviceCapacity->Blocks)
);
\r
+
SwapEndian_n(&DeviceCapacity->BlockSize, sizeof(DeviceCapacity->BlockSize)
);
\r
\r
if ((ErrorCode = MS_Host_GetReturnedStatus(MSInterfaceInfo, &SCSICommandStatus)) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
if ((ErrorCode = MS_Host_GetReturnedStatus(MSInterfaceInfo, &SCSICommandStatus)) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
@@
-451,7
+449,6
@@
uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, con
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
@@
-488,7
+485,6
@@
uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInter
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = 0,
\r
.Flags = COMMAND_DIRECTION_DATA_OUT,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = 0,
\r
.Flags = COMMAND_DIRECTION_DATA_OUT,
\r
.LUN = LUNIndex,
\r
@@
-525,7
+521,6
@@
uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = ((uint32_t)Blocks * BlockSize),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = ((uint32_t)Blocks * BlockSize),
\r
.Flags = COMMAND_DIRECTION_DATA_IN,
\r
.LUN = LUNIndex,
\r
@@
-566,7
+561,6
@@
uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
\r
MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
\r
{
\r
- .Signature = CBW_SIGNATURE,
\r
.DataTransferLength = ((uint32_t)Blocks * BlockSize),
\r
.Flags = COMMAND_DIRECTION_DATA_OUT,
\r
.LUN = LUNIndex,
\r
.DataTransferLength = ((uint32_t)Blocks * BlockSize),
\r
.Flags = COMMAND_DIRECTION_DATA_OUT,
\r
.LUN = LUNIndex,
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
2a772b8
..
04aa9a4
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-29,6
+29,7
@@
* builds of avrdude at the expense of AVRStudio compatibility
\r
* - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code
\r
* - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready
\r
* builds of avrdude at the expense of AVRStudio compatibility
\r
* - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code
\r
* - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready
\r
+ * for them to be enabled (thanks to Andrei Krainev)
\r
*
\r
* <b>Fixed:</b>
\r
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
\r
*
\r
* <b>Fixed:</b>
\r
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
\r
diff --git
a/makefile
b/makefile
index
d6d191e
..
db5cd51
100644
(file)
--- a/
makefile
+++ b/
makefile
@@
-18,9
+18,9
@@
all:
%:
\r
@echo Executing \"make $@\" on all LUFA library elements.
\r
@echo
\r
%:
\r
@echo Executing \"make $@\" on all LUFA library elements.
\r
@echo
\r
- make -C LUFA
/
$@ -s
\r
- make -C Demos
/
$@ -s
\r
- make -C Projects
/
$@ -s
\r
- make -C Bootloaders
/
$@ -s
\r
+ make -C LUFA $@ -s
\r
+ make -C Demos $@ -s
\r
+ make -C Projects $@ -s
\r
+ make -C Bootloaders $@ -s
\r
@echo
\r
@echo LUFA \"make $@\" operation complete.
\r
@echo
\r
@echo LUFA \"make $@\" operation complete.
\r