Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
5ec9d04b
Commit
5ec9d04b
authored
May 21, 2012
by
Dean Camera
Browse files
AppConfigHeaders: Merge in latest trunk.
parents
5f709e28
55283475
Changes
4
Hide whitespace changes
Inline
Side-by-side
Bootloaders/CDC/BootloaderCDC.c
View file @
5ec9d04b
...
...
@@ -73,7 +73,13 @@ void Application_Jump_Check(void)
/* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
if
((
MCUSR
&
(
1
<<
WDRF
))
&&
(
MagicBootKey
==
MAGIC_BOOT_KEY
))
{
/* Turn off the watchdog */
MCUSR
&=
~
(
1
<<
WDRF
);
wdt_disable
();
/* Clear the boot key and jump to the user application */
MagicBootKey
=
0
;
// cppcheck-suppress constStatement
((
void
(
*
)(
void
))
0x0000
)();
}
...
...
Bootloaders/DFU/BootloaderDFU.c
View file @
5ec9d04b
...
...
@@ -106,11 +106,18 @@ uint32_t MagicBootKey ATTR_NO_INIT;
*/
void
Application_Jump_Check
(
void
)
{
/
/
If the reset source was the bootloader and the key is correct, clear it and jump to the application
/
*
If the reset source was the bootloader and the key is correct, clear it and jump to the application
*/
if
((
MCUSR
&
(
1
<<
WDRF
))
&&
(
MagicBootKey
==
MAGIC_BOOT_KEY
))
{
/* Turn off the watchdog */
MCUSR
&=
~
(
1
<<
WDRF
);
wdt_disable
();
/* Clear the boot key and jump to the user application */
MagicBootKey
=
0
;
AppStartPtr
();
// cppcheck-suppress constStatement
((
void
(
*
)(
void
))
0x0000
)();
}
}
...
...
Projects/AVRISP-MKII/AVRISP-MKII.c
View file @
5ec9d04b
...
...
@@ -97,12 +97,12 @@ void EVENT_USB_Device_ConfigurationChanged(void)
{
bool
ConfigSuccess
=
true
;
/* Setup AVRISP Data
E
ndpoint
(s)
*/
/* Setup AVRISP Data
OUT e
ndpoint */
ConfigSuccess
&=
Endpoint_ConfigureEndpoint
(
AVRISP_DATA_OUT_EPADDR
,
EP_TYPE_BULK
,
AVRISP_DATA_EPSIZE
,
1
);
#if defined(LIBUSB_DRIVER_COMPAT)
ConfigSuccess
&=
Endpoint_ConfigureEndpoint
(
AVRISP_DATA_IN_EPADDR
,
EP_TYPE_BULK
,
AVRISP_DATA_EPSIZE
,
1
);
#endif
/* Setup AVRISP Data IN endpoint if it is using a physically different endpoint */
if
((
AVRISP_DATA_IN_EPADDR
&
ENDPOINT_EPNUM_MASK
)
!=
(
AVRISP_DATA_OUT_EPADDR
&
ENDPOINT_EPNUM_MASK
))
ConfigSuccess
&=
Endpoint_ConfigureEndpoint
(
AVRISP_DATA_IN_EPADDR
,
EP_TYPE_BULK
,
AVRISP_DATA_EPSIZE
,
1
);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs
(
ConfigSuccess
?
LEDMASK_USB_READY
:
LEDMASK_USB_ERROR
);
...
...
Projects/XPLAINBridge/XPLAINBridge.c
View file @
5ec9d04b
...
...
@@ -226,9 +226,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
{
ConfigSuccess
&=
Endpoint_ConfigureEndpoint
(
AVRISP_DATA_OUT_EPADDR
,
EP_TYPE_BULK
,
AVRISP_DATA_EPSIZE
,
1
);
#if defined(LIBUSB_DRIVER_COMPAT)
ConfigSuccess
&=
Endpoint_ConfigureEndpoint
(
AVRISP_DATA_IN_EPADDR
,
EP_TYPE_BULK
,
AVRISP_DATA_EPSIZE
,
1
);
#endif
if
((
AVRISP_DATA_IN_EPADDR
&
ENDPOINT_EPNUM_MASK
)
!=
(
AVRISP_DATA_OUT_EPADDR
&
ENDPOINT_EPNUM_MASK
))
ConfigSuccess
&=
Endpoint_ConfigureEndpoint
(
AVRISP_DATA_IN_EPADDR
,
EP_TYPE_BULK
,
AVRISP_DATA_EPSIZE
,
1
);
/* Configure the V2 protocol packet handler */
V2Protocol_Init
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment