#include "lib.h"
#include <stdio.h>
#define COM COM0 // COM0 is the direct cable
void main( void )
{
// Array for ten filenames; static so space is not on stack
static char ftest[10][12 + 1];
int test;
systemsetting("K7L1L2L5"); // 19200, N, 8, 1
if( comopen( COM ) != OK )
{
printf("\fCan't open port");
while( 1 )
idle();
}
do{
printf("\fReceiving..");
test = neto_receive( ftest, "123456", ENT_KEY, 3);
printf("\ntest=%d", test);
}while( test < 0 );
comclose( COM ); // Save power!
printf("\ftest = %d", test);
printf("\npress any key");
resetkey();
while( !kbhit())
idle();
if( comopen( COM ) != OK)
{
printf("\fCan't open port");
while( 1 )
idle();
}
printf("\fTransmitting...\n%d files", test);
test = neto_ transmit( ftest, test, "123456", ENT_KEY, 3);
printf("\ftest=%d", test);
comclose( COM );
while( 1 )
idle();
}