From dfa2676fe9524ba07cdcf1b0d9398e9fc19dabd7 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 24 Feb 2015 17:37:11 +0100 Subject: cleanups --- usb-midi/Makefile | 2 +- usb-midi/usb-midi.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'usb-midi') diff --git a/usb-midi/Makefile b/usb-midi/Makefile index ba3d8f7..f8f4f34 100644 --- a/usb-midi/Makefile +++ b/usb-midi/Makefile @@ -23,7 +23,7 @@ NAME := usb-midi BOARD_TYPE := rhmixxx OBJ := $(NAME).o -LIBS := util led lufa-descriptor-midi +LIBS := util led lufa-descriptor-midi serialio EXTERNAL_LIBS := lufa SPREADAVR_PATH := .. diff --git a/usb-midi/usb-midi.c b/usb-midi/usb-midi.c index 7b8d68c..6339646 100644 --- a/usb-midi/usb-midi.c +++ b/usb-midi/usb-midi.c @@ -27,6 +27,9 @@ #include #include +#include "serialio.h" +#include "led.h" + /* LUFA Library Copyright (C) Dean Camera, 2012. @@ -37,7 +40,6 @@ #include #include #include "lufa-descriptor-midi.h" -#include "LUFA/Drivers/Peripheral/Serial.h" /** LUFA MIDI Class driver interface configuration and state information. This structure is * passed to all MIDI Class driver functions, so that multiple instances of the same class @@ -78,8 +80,6 @@ void EVENT_USB_Device_ControlRequest(void) #include "util.h" #include "led.h" -static FILE serial_stream; - #define KEY_PIN PINA #define KEY_PORT PORTA #define KEY_DDR DDRA @@ -101,11 +101,7 @@ int main(void) cpu_init(); led_init(); key_init(); - - Serial_Init(38400, 0); - Serial_CreateStream(&serial_stream); - stdin = stdout = stderr = &serial_stream; - + serialio_init(38400, 0); USB_Init(); sei(); -- cgit v1.2.3