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
/
Device
/
LowLevel
/
Mouse
/
Mouse.c
diff --git
a/Demos/Device/LowLevel/Mouse/Mouse.c
b/Demos/Device/LowLevel/Mouse/Mouse.c
index
ef6c911
..
d6552b6
100644
(file)
--- a/
Demos/Device/LowLevel/Mouse/Mouse.c
+++ b/
Demos/Device/LowLevel/Mouse/Mouse.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
1
.
+ 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
1
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
@@
-61,7
+61,7
@@
int main(void)
SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-
sei
();
+
GlobalInterruptEnable
();
for (;;)
{
for (;;)
{
@@
-116,8
+116,7
@@
void EVENT_USB_Device_ConfigurationChanged(void)
bool ConfigSuccess = true;
/* Setup HID Report Endpoint */
bool ConfigSuccess = true;
/* Setup HID Report Endpoint */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- MOUSE_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_EPADDR, EP_TYPE_INTERRUPT, MOUSE_EPSIZE, 1);
/* Turn on Start-of-Frame events for tracking HID report period expiry */
USB_Device_EnableSOFEvents();
/* Turn on Start-of-Frame events for tracking HID report period expiry */
USB_Device_EnableSOFEvents();
@@
-160,7
+159,7
@@
void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP();
/* Write the current protocol flag to the host */
Endpoint_ClearSETUP();
/* Write the current protocol flag to the host */
- Endpoint_Write_
Byte
(UsingReportProtocol);
+ Endpoint_Write_
8
(UsingReportProtocol);
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
@@
-195,7
+194,7
@@
void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP();
/* Write the current idle duration to the host, must be divided by 4 before sent to host */
Endpoint_ClearSETUP();
/* Write the current idle duration to the host, must be divided by 4 before sent to host */
- Endpoint_Write_
Byte
(IdleCount >> 2);
+ Endpoint_Write_
8
(IdleCount >> 2);
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
@@
-271,7
+270,7
@@
void SendNextReport(void)
}
/* Select the Mouse Report Endpoint */
}
/* Select the Mouse Report Endpoint */
- Endpoint_SelectEndpoint(MOUSE_EP
NUM
);
+ Endpoint_SelectEndpoint(MOUSE_EP
ADDR
);
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */
if (Endpoint_IsReadWriteAllowed() && SendReport)
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */
if (Endpoint_IsReadWriteAllowed() && SendReport)