From 6afb32b2cd04cdb4cea85ff5dd61f3ea896dc0d8 Mon Sep 17 00:00:00 2001 From: Trygve Laugstol Date: Tue, 27 Mar 2012 22:00:12 +0200 Subject: o Working on firmware. --- firmware/VirtualSerial.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'firmware/VirtualSerial.c') diff --git a/firmware/VirtualSerial.c b/firmware/VirtualSerial.c index 2fccda6..0fdc31c 100644 --- a/firmware/VirtualSerial.c +++ b/firmware/VirtualSerial.c @@ -171,6 +171,18 @@ void handle_command(const char *buf) else fputs("doorstatus: closed\n", &USBSerialStream); } + + else if (strcmp("on", buf) == 0) + { + PORTB |= 1 << PB4; + PORTB |= 1 << PB0; + } + + else if (strcmp("off", buf) == 0) + { + PORTB &= ~(1 << PB4); + PORTB &= ~(1 << PB0); + } } void CheckACMStatus() @@ -281,6 +293,7 @@ void EVENT_USB_Device_ControlRequest(void) ISR(TIMER1_COMPA_vect) { +return; if(PINB & (1 << PB5)) PORTB |= 1 << PB4; -- cgit v1.2.3