remove debug code

This commit is contained in:
Christian Groessler
2013-12-06 20:49:57 +01:00
parent 074136826a
commit 932748e6ca
2 changed files with 86 additions and 505 deletions

View File

@@ -26,7 +26,6 @@
#error "Unknown target system"
#endif
extern unsigned int getsp(void);
static const struct ser_params Params = {
SER_BAUD_9600, /* Baudrate */
@@ -42,7 +41,6 @@ static void CheckError (const char* Name, unsigned char Error)
{
if (Error != SER_ERR_OK) {
fprintf (stderr, "%s: %d\n", Name, Error);
cgetc();
exit (EXIT_FAILURE);
}
}
@@ -52,42 +50,25 @@ int main (void)
{
char Res;
char C;
printf("SP: $%04x\n", getsp());
printf ("A\n");
//cgetc();
CheckError ("ser_load_driver", ser_load_driver (DRIVERNAME));
printf ("B\n");
//cgetc();
printf("params at %p\n", &Params);
CheckError ("ser_open", ser_open (&Params));
printf ("C\n");
//cgetc();
printf("SP 2: $%04x\n", getsp());
while (1) {
if (kbhit ()) {
printf("loop 1 SP: $%04x\n", getsp());
C = cgetc ();
if (C == '1') {
break;
} else {
CheckError ("ser_put", ser_put (C));
//printf ("%c", C);
printf ("%c", C);
}
}
Res = ser_get (&C);
if (Res != SER_ERR_NO_DATA) {
printf("loop 2 SP: $%04x\n", getsp());
CheckError ("ser_get", Res);
printf ("%c", C);
}
}
printf ("D\n");
printf("after loop SP: $%04x\n", getsp());
//cgetc();
CheckError ("ser_unload", ser_unload ());
printf ("E\n");
cgetc();
printf("final SP: $%04x\n", getsp());
return EXIT_SUCCESS;
}