Added return for for tap_init().

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@197 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 4b574992fd
commit 12b2987a29

@ -28,7 +28,7 @@
/*
* low level tap functions, hardware dependent
*/
void tap_init( void );
int tap_init( void );
void tap_done( void );
void tap_clock( int tms, int tdi );

@ -57,7 +57,10 @@ main( void )
"There is absolutely no warranty for " PACKAGE ".\n\n"
);
tap_init();
if (!tap_init()) {
printf( "TAP initialization failed! Exiting.\n" );
return 1;
}
tap_set_trst( 0 );
tap_set_trst( 1 );

@ -36,16 +36,18 @@
static unsigned short int port = 0x378;
void
int
tap_init( void )
{
tap_state_init();
printf( "Initilizing parallel TAP on port 0x%x\n", port );
if (ioperm( port, 2, 1 )) {
printf( "Error: Initialization failed!\n" );
return;
return 0;
}
tap_state_set_trst( (inb( port ) >> TRST) & 1 );
return 1;
}
void

Loading…
Cancel
Save