summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-02-17 00:08:24 +0000
committerChristian Pointner <equinox@spreadspace.org>2013-02-17 00:08:24 +0000
commitb29fa926a30ee9466b648022c6532960224096e1 (patch)
tree78a2e157df168ad670f7fe5c329c2dfd95665273 /lib
parentrf433send uses usbio now (diff)
improved anyio and usbio
git-svn-id: https://svn.spreadspace.org/avr/trunk@199 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'lib')
-rw-r--r--lib/anyio.c4
-rw-r--r--lib/usbio.c17
2 files changed, 6 insertions, 15 deletions
diff --git a/lib/anyio.c b/lib/anyio.c
index 6344d74..1ad4e96 100644
--- a/lib/anyio.c
+++ b/lib/anyio.c
@@ -68,8 +68,8 @@ void EVENT_USB_Device_ControlRequest(void)
}
/* end LUFA CDC-ACM specific definitions*/
-FILE usb_stream;
-FILE serial_stream;
+static FILE usb_stream;
+static FILE serial_stream;
void anyio_init(const uint32_t baudrate, const uint8_t doublespeed)
{
diff --git a/lib/usbio.c b/lib/usbio.c
index 1107ee4..371f9e7 100644
--- a/lib/usbio.c
+++ b/lib/usbio.c
@@ -68,22 +68,13 @@ void EVENT_USB_Device_ControlRequest(void)
}
/* end LUFA CDC-ACM specific definitions*/
-FILE usb_stream;
-FILE dummy_stream;
-
-int dummy_putchar(char DataByte, FILE *Stream)
-{
- return 0;
-}
-
-int dummy_getchar(FILE *Stream)
-{
- return 0;
-}
+static int dummy_putchar(char DataByte, FILE *Stream) { return 0; }
+static int dummy_getchar(FILE *Stream) { return 0; }
+static FILE dummy_stream = FDEV_SETUP_STREAM(dummy_putchar, dummy_getchar, _FDEV_SETUP_RW);
+static FILE usb_stream;
void usbio_init(void)
{
- dummy_stream = (FILE)FDEV_SETUP_STREAM(dummy_putchar, dummy_getchar, _FDEV_SETUP_RW);
stdin = stdout = stderr = &dummy_stream;
USB_Init();