- /* tell the user that the error might be due to the jump */
- printf("\n\n");
- if(ret<0)
- printf("the above error might be due to the jump!\n\n");
-
- /* query user for serial port listening */
- printf("continue listening on serial port? (ctrl+c to quit) [y|n]: ");
- buf[0]=getchar();
- printf("\n");
-
- if(buf[0]!='y')
- goto end;
-
- /* continue lsitening on serial port */
- ret=1;
- while(ret) {
- ret=read(lpc.sfd,buf,BUFSIZE);
- printf("\rread %d bytes: ",ret);
- for(i=0;i<ret;i++)
- printf("%02x ",buf[i]);
- printf("\n");
- }
-