Skip to content

Commit

Permalink
Merge pull request #24 from swinman/master
Browse files Browse the repository at this point in the history
add more debug info for dfu launch failure
  • Loading branch information
swinman committed Jul 28, 2015
2 parents fb1f834 + ffed1e3 commit 3a60fe4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ int32_t atmel_blank_check( dfu_device_t *device,

int32_t atmel_start_app_reset( dfu_device_t *device ) {
uint8_t command[3] = { 0x04, 0x03, 0x00 };
int32_t retval;

TRACE( "%s( %p )\n", __FUNCTION__, device );

Expand All @@ -895,8 +896,8 @@ int32_t atmel_start_app_reset( dfu_device_t *device ) {
return -1;
}

if( 0 != dfu_download(device, 0, NULL) ) {
DEBUG( "dfu_download failed.\n" );
if( 0 != (retval = dfu_download(device, 0, NULL)) ) {
DEBUG( "dfu_download failed (rv=%d).\n", retval );
return -2;
}

Expand Down

0 comments on commit 3a60fe4

Please sign in to comment.