From: Dmitry D. B. <ddb...@uw...> - 2002-02-15 22:28:42
|
Hi, Alright some abstract:=20 I'll let you figure this out on you own but in conlusion win32 ecp driver= s=20 were made by Microsoft, so we have to break linux (or make it look broken= ). We can do this by: in the command file cmd.cpp #include <unistd.h> // some where around the top. I'm assuming that most of you are familier with what happens when the tra= nsfer=20 breaks the Freenomad tries again: well look at the last 4 lines, it should tell you every thing. Have fun, and btw do you need an other developer? bool cmd::cmd_write_data_send_block( unsigned char *buf, int buf_size, in= t&=20 curr_pos ) { #define BLOCK_SIZE 16*1024 int block_size =3D 0; XP( " write_data_send_block(%d/%d)\n", curr_pos, buf_size ); if( buf_size - curr_pos > BLOCK_SIZE ) block_size =3D BLOCK_SIZE; else block_size =3D buf_size - curr_pos; if( !m_port.write( &buf[curr_pos], block_size ) ) { XP( "port.write failed, what to do?\n" ); return false; } curr_pos +=3D block_size; if( block_size =3D=3D BLOCK_SIZE && ( ( buf_size - curr_pos ) > 0 ) )= // only=20 acknowledge if more b$ { for( int i =3D 0; i < 10; i++ ) // retry to read ack serveral tim= es { if ( i =3D=3D 1) { sleep(1); } |