Browse Source

fmrx: remove debugging code

H. Peter Anvin 3 năm trước cách đây
mục cha
commit
e8c6c51da3
1 tập tin đã thay đổi với 0 bổ sung23 xóa
  1. 0 23
      USBCAS/fmrx.c

+ 0 - 23
USBCAS/fmrx.c

@@ -16,16 +16,6 @@ static inline void fmrx_led_off(void)
 	PORTB |= (1 << 0);
 }
 
-static void say(const char *str)
-{
-#if 0
-	char c;
-
-	while ((c = *str++))
-		fmrx_recv_byte(c);
-#endif
-}
-
 void fmrx_init(void)
 {
 	uint8_t tccr1b;
@@ -70,11 +60,6 @@ void fmrx_set_speed(uint32_t baudrate)
 	one_bit_hi = 3 * one_bit_lo;
 
 	bytes = 0;
-	sprintf(msg, "\r\nbaudrate   = %lu\r\n"
-		"one_bit_lo = %u\r\n"
-		"one_bit_hi = %u\r\n",
-		baudrate, one_bit_lo, one_bit_hi);
-	say(msg);
 }
 
 /* We "hunt" for a block until we find this bit pattern; same as ABC800 */
@@ -87,7 +72,6 @@ ISR(TIMER1_CAPT_vect)
 	static uint16_t last_edge;
 	static uint16_t data;
 	static uint8_t  bits;
-	char tbuf[16];
 
 	uint16_t edge, delta;
 
@@ -98,21 +82,16 @@ ISR(TIMER1_CAPT_vect)
 
 	if (delta < one_bit_lo) {
 		/* Early edge, no action */
-		say("E");
 		return;
 	} else if (delta < one_bit_hi) {
-		say("D");
 		/* A data bit edge */
 		data |= (1 << 15);
 	} else {
-		say("C");
 		/* Clock edge */
 		last_edge = edge;
 		if (bytes) {
 			if (--bits == 0) {
 				uint8_t outbyte = data >> 8;
-				sprintf(tbuf, "<%02x>", outbyte);
-				say(tbuf);
 				fmrx_recv_byte(outbyte);
 				data = 0; /* To avoid false sync */
 				bits = 8;
@@ -131,6 +110,4 @@ ISR(TIMER1_CAPT_vect)
 		}
 		data >>= 1;
 	}
-	sprintf(tbuf, "%u ", delta);
-	say(tbuf);
 }