projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix flip-ee DFU build target accidentally erasing the target FLASH memory space.
[pub/USBasp.git]
/
Demos
/
DualRole
/
ClassDriver
/
MouseHostDevice
/
MouseHostDevice.c
diff --git
a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
index
1c7fa16
..
3ea2441
100644
(file)
--- a/
Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
+++ b/
Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
0
.
+ Copyright (C) Dean Camera, 201
2
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
0
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-46,14
+46,14
@@
int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mouse Host/Device Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
puts_P(PSTR(ESC_FG_CYAN "Mouse Host/Device Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-
sei
();
+
GlobalInterruptEnable
();
for (;;)
{
/* Determine which USB mode we are currently in */
if (USB_CurrentMode == USB_MODE_Host)
{
for (;;)
{
/* Determine which USB mode we are currently in */
if (USB_CurrentMode == USB_MODE_Host)
{
- MouseHostTask();
+ MouseHost
_
Task();
HID_Host_USBTask(&Mouse_HID_Host_Interface);
}
else
HID_Host_USBTask(&Mouse_HID_Host_Interface);
}
else
@@
-76,11
+76,14
@@
void SetupHardware(void)
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
- Serial
Stream
_Init(9600, false);
+ Serial_Init(9600, false);
LEDs_Init();
Joystick_Init();
Buttons_Init();
USB_Init(USB_MODE_UID);
LEDs_Init();
Joystick_Init();
Buttons_Init();
USB_Init(USB_MODE_UID);
+
+ /* Create a stdio stream for the serial port for stdin and stdout */
+ Serial_CreateStream(NULL);
}
/** Event handler for the library USB mode change event. */
}
/** Event handler for the library USB mode change event. */