Commits

Trammell Hudson committed e91207b

Retrieve bits from the 5bit teletype

Comments (0)

Files changed (2)

 
 # Define programs and commands.
 SHELL = sh
-AVR_PATH = /Applications/Arduino.app/Contents//Resources/Java/hardware/tools/avr
+#AVR_PATH = /Applications/Arduino.app/Contents//Resources/Java/hardware/tools/avr
+AVR_PATH = $(HOME)/arduino-1.0.5/hardware/tools/avr
 CC = $(AVR_PATH)/bin/avr-gcc
 OBJCOPY = $(AVR_PATH)/bin/avr-objcopy
 OBJDUMP = $(AVR_PATH)/bin/avr-objdump
 
 	while (1)
 	{
+		if (bit_is_set(UCSR1A, RXC1))
+		{
+			uint8_t ch = UDR1;
+			char buf[] = {
+				hexdigit(ch >> 4),
+				hexdigit(ch >> 0),
+				'\r',
+				'\n',
+			};
+			usb_serial_write(buf, sizeof(buf));
+		}
+
 		int c = usb_serial_getchar();
 		if (c == -1)
 			continue;