projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of the redundant ATTR_NEVER_INLINE macro which translated to the same as...
[pub/USBasp.git]
/
Projects
/
RelayBoard
/
RelayBoard.c
diff --git
a/Projects/RelayBoard/RelayBoard.c
b/Projects/RelayBoard/RelayBoard.c
index
b71b353
..
f2ba464
100644
(file)
--- a/
Projects/RelayBoard/RelayBoard.c
+++ b/
Projects/RelayBoard/RelayBoard.c
@@
-1,14
+1,14
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
0
.
+ Copyright (C) Dean Camera, 201
3
.
dean [at] fourwalledcubicle [dot] com
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
Copyright 2010 OBinou (obconseil [at] gmail [dot] com)
*/
/*
Copyright 2010 OBinou (obconseil [at] gmail [dot] com)
- Copyright 201
0
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
3
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
@@
-19,7
+19,7
@@
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
- The author disclaim all warranties with regard to this
+ The author disclaim
s
all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
@@
-45,7
+45,7
@@
int main(void)
{
SetupHardware();
{
SetupHardware();
-
sei
();
+
GlobalInterruptEnable
();
for (;;)
USB_USBTask();
for (;;)
USB_USBTask();
@@
-54,12
+54,14
@@
int main(void)
/** Configures the board hardware and chip peripherals for the project's functionality. */
void SetupHardware(void)
{
/** Configures the board hardware and chip peripherals for the project's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
USB_Init();
/* Hardware Initialization */
USB_Init();
@@
-69,8
+71,8
@@
void SetupHardware(void)
PORTC &= ~ALL_RELAYS;
}
PORTC &= ~ALL_RELAYS;
}
-/** Event handler for the library USB
Unhandled Control Packet
event. */
-void EVENT_USB_Device_
Unhandled
ControlRequest(void)
+/** Event handler for the library USB
Control Request reception
event. */
+void EVENT_USB_Device_ControlRequest(void)
{
const uint8_t SerialNumber[5] = { 0, 0, 0, 0, 1 };
uint8_t ControlData[2] = { 0, 0 };
{
const uint8_t SerialNumber[5] = { 0, 0, 0, 0, 1 };
uint8_t ControlData[2] = { 0, 0 };