factored out serial_mouse_init() into serial_mouse.h
authorRobin Haberkorn <robin.haberkorn@googlemail.com>
Sun, 27 Jul 2014 15:18:14 +0000 (17:18 +0200)
committerRobin Haberkorn <robin.haberkorn@googlemail.com>
Sun, 27 Jul 2014 15:38:31 +0000 (17:38 +0200)
protocol/serial_mouse.h
protocol/serial_mouse_microsoft.c
protocol/serial_mouse_mousesystems.c

index c3c19d7696bb47596a6f31d126ae64df1bef1261..2ccd3d900c5d8ca537b9dd0afcf10f968d408bf3 100644 (file)
@@ -20,7 +20,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <stdint.h>
 
-uint8_t serial_mouse_init(void);
+#include "serial.h"
+
+static inline uint8_t serial_mouse_init(void)
+{
+    serial_init();
+    return 0;
+}
+
 void serial_mouse_task(void);
 
 #endif
index 6b3f80648bc6e93079afbf46e1d35e4228912005..f83036a317591333572438872efdb3491b4ef106 100644 (file)
@@ -29,12 +29,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 static void print_usb_data(const report_mouse_t *report);
 
-uint8_t serial_mouse_init(void)
-{
-    serial_init();
-    return 0;
-}
-
 void serial_mouse_task(void)
 {
     /* 3 byte ring buffer */
index 68b2b5b3593081a3a7888a3815d3877c75ab7164..36c67386f7e090bccbf09d2843d3e89638449850 100644 (file)
@@ -31,12 +31,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 static void print_usb_data(const report_mouse_t *report);
 
-uint8_t serial_mouse_init(void)
-{
-    serial_init();
-    return 0;
-}
-
 void serial_mouse_task(void)
 {
     /* 5 byte ring buffer */
Imprint / Impressum