From edce1d19a6af040df994243e7b6b1851e3eccebc Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 21 Oct 2012 22:12:36 +0900 Subject: Add LED feature to Sun converter --- converter/sun_usb/config.h | 17 ++++++++++++++++- converter/sun_usb/led.c | 10 +++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'converter/sun_usb') diff --git a/converter/sun_usb/config.h b/converter/sun_usb/config.h index 66961d9330..b4f0ff977a 100644 --- a/converter/sun_usb/config.h +++ b/converter/sun_usb/config.h @@ -43,8 +43,8 @@ along with this program. If not, see . * asynchronous, negative logic, 1200baud, no flow control * 1-start bit, 8-data bit, non parity, 1-stop bit */ -#define SERIAL_NEGATIVE_LOGIC #define SERIAL_BAUD 1200 + #define SERIAL_RXD_DDR DDRD #define SERIAL_RXD_PORT PORTD #define SERIAL_RXD_PIN PIND @@ -63,5 +63,20 @@ along with this program. If not, see . /* clear interrupt flag */ \ EIFR = (1<. */ #include "stdint.h" +#include "serial.h" #include "led.h" void led_set(uint8_t usb_led) { - // not supported now + uint8_t sun_led = 0; + if (usb_led & (1<