Changeset 4141 for trunk/csctapi/io_serial.c
- Timestamp:
- 12/18/10 08:10:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/io_serial.c
r4035 r4141 96 96 if (dtr) // DTR 97 97 { 98 cs_debug ("IO: multicam.o DTR:%s\n", *dtr ? "set" : "clear"); fflush(stdout);98 cs_debug_mask(D_DEVICE, "IO: multicam.o DTR:%s\n", *dtr ? "set" : "clear"); fflush(stdout); 99 99 if (dtr_bits[mcport]) 100 100 { … … 110 110 if (rts) // RTS 111 111 { 112 cs_debug ("IO: multicam.o RTS:%s\n", *rts ? "set" : "clear"); fflush(stdout);112 cs_debug_mask(D_DEVICE, "IO: multicam.o RTS:%s\n", *rts ? "set" : "clear"); fflush(stdout); 113 113 if (*rts) 114 114 msr&=(unsigned short)(~rts_bits[mcport]); … … 150 150 return ERROR; 151 151 #endif 152 cs_debug ("IO: Setting %s=%i","DTR", *dtr);152 cs_debug_mask(D_DEVICE, "IO: Setting %s=%i", "DTR", *dtr); 153 153 } 154 154 … … 169 169 return ERROR; 170 170 #endif 171 cs_debug ("IO: Setting %s=%i","RTS", *rts);171 cs_debug_mask(D_DEVICE, "IO: Setting %s=%i", "RTS", *rts); 172 172 } 173 173 … … 196 196 cfsetospeed(tio, IO_Serial_Bitrate(bitrate)); 197 197 cfsetispeed(tio, IO_Serial_Bitrate(bitrate)); 198 cs_debug ("standard baudrate: cardmhz=%d mhz=%d -> effective baudrate %lu", reader->cardmhz, reader->mhz, bitrate);198 cs_debug_mask(D_DEVICE, "standard baudrate: cardmhz=%d mhz=%d -> effective baudrate %lu", reader->cardmhz, reader->mhz, bitrate); 199 199 } 200 200 #ifdef OS_LINUX … … 207 207 nuts.custom_divisor = (nuts.baud_base + (custom_baud_asked/2))/ custom_baud_asked; 208 208 int custom_baud_delivered = nuts.baud_base / nuts.custom_divisor; 209 cs_debug ("custom baudrate: cardmhz=%d mhz=%d custom_baud=%d baud_base=%d divisor=%d -> effective baudrate %d",209 cs_debug_mask(D_DEVICE, "custom baudrate: cardmhz=%d mhz=%d custom_baud=%d baud_base=%d divisor=%d -> effective baudrate %d", 210 210 reader->cardmhz, reader->mhz, custom_baud_asked, nuts.baud_base, nuts.custom_divisor, custom_baud_delivered); 211 211 int baud_diff = custom_baud_delivered - custom_baud_asked; … … 333 333 cs_log("WARNING: Failed to reset reader %s", reader->label); 334 334 335 cs_debug ("IO: Setting properties\n");335 cs_debug_mask(D_DEVICE, "IO: Setting properties\n"); 336 336 return OK; 337 337 } … … 363 363 } 364 364 365 cs_debug ("IFD: Setting parity from %s to %s\n",365 cs_debug_mask(D_IFD, "IFD: Setting parity from %s to %s\n", 366 366 current_parity == PARITY_ODD ? "Odd" : 367 367 current_parity == PARITY_NONE ? "None" : … … 446 446 } 447 447 if(!readed) { 448 cs_ddump (data, count, "IO: Receiving:");448 cs_ddump_mask(D_DEVICE, data, count, "IO: Receiving:"); 449 449 return ERROR; 450 450 } … … 454 454 if (read (reader->handle, &c, 1) != 1) 455 455 { 456 cs_ddump (data, count, "IO: Receiving:");456 cs_ddump_mask(D_DEVICE, data, count, "IO: Receiving:"); 457 457 cs_log("ERROR in IO_Serial_Read errno=%d", errno); 458 458 //tcflush (reader->handle, TCIFLUSH); … … 462 462 else 463 463 { 464 cs_ddump (data, count, "IO: Receiving:");465 cs_debug ("TIMEOUT in IO_Serial_Read");464 cs_ddump_mask(D_DEVICE, data, count, "IO: Receiving:"); 465 cs_debug_mask(D_DEVICE, "TIMEOUT in IO_Serial_Read"); 466 466 //tcflush (reader->handle, TCIFLUSH); 467 467 return ERROR; … … 470 470 data[count] = c; 471 471 } 472 cs_ddump (data, count, "IO: Receiving:");472 cs_ddump_mask(D_DEVICE, data, count, "IO: Receiving:"); 473 473 return OK; 474 474 } … … 506 506 reader->written += to_send; 507 507 508 cs_ddump (data_w+count, to_send, "IO: Sending: ");508 cs_ddump_mask(D_DEVICE, data_w+count, to_send, "IO: Sending: "); 509 509 } 510 510 else … … 521 521 { 522 522 523 cs_debug ("IO: Closing serial port %s\n", reader->device);523 cs_debug_mask(D_DEVICE, "IO: Closing serial port %s\n", reader->device); 524 524 525 525 #if defined(TUXBOX) && defined(PPC) … … 653 653 } 654 654 if (select_ret==0) { 655 cs_debug ("TIMEOUT in IO_Serial_WaitToRead");655 cs_debug_mask(D_DEVICE, "TIMEOUT in IO_Serial_WaitToRead"); 656 656 return ERROR; 657 657 }
Note:
See TracChangeset
for help on using the changeset viewer.