]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
Fixing uartOut for ARM
authorJacob Alexander <haata@kiibohd.com>
Sat, 27 Sep 2014 20:20:09 +0000 (13:20 -0700)
committerJacob Alexander <haata@kiibohd.com>
Sat, 27 Sep 2014 20:20:09 +0000 (13:20 -0700)
- Added fake capability for compilation

Output/uartOut/capabilities.kll [new file with mode: 0644]
Output/uartOut/output_com.c
Output/uartOut/output_com.h

diff --git a/Output/uartOut/capabilities.kll b/Output/uartOut/capabilities.kll
new file mode 100644 (file)
index 0000000..d45e181
--- /dev/null
@@ -0,0 +1,12 @@
+Name = uartOutCapabilities;
+Version = 0.1;
+Author = "HaaTa (Jacob Alexander) 2014";
+KLL = 0.3;
+
+# Modified Date
+Date = 2014-09-27;
+
+
+# Capabilties available to the uartOut output module
+usbKeyOut   => Output_usbCodeSend_capability( usbCode : 1 );
+
index 7f01a4bd140a21c01b69128cc2779e53220c7f23..f3466afe0a73d8b6e4835241e83a35d0c4a8cc40 100644 (file)
@@ -49,6 +49,7 @@ void cliFunc_setKeys    ( char* args );
 void cliFunc_setMod     ( char* args );
 
 
+
 // ----- Variables -----
 
 // Output Module command dictionary
@@ -93,6 +94,24 @@ volatile uint8_t USBKeys_Protocol = 1;
          uint8_t USBKeys_Idle_Count = 0;
 
 
+
+// ----- Capabilities -----
+
+// Adds a single USB Code to the USB Output buffer
+// Argument #1: USB Code
+void Output_usbCodeSend_capability( uint8_t state, uint8_t stateType, uint8_t *args )
+{
+       // Display capability name
+       if ( stateType == 0xFF && state == 0xFF )
+       {
+               print("Output_usbCodeSend(usbCode)");
+               print("Not used in uartOut...");
+               return;
+       }
+}
+
+
+
 // ----- Functions -----
 
 // USB Module Setup
@@ -161,7 +180,10 @@ inline int Output_putstr( char* str )
 // Soft Chip Reset
 inline void Output_softReset()
 {
-       usb_device_software_reset();
+#if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_) // AVR
+#elif defined(_mk20dx128_) || defined(_mk20dx128vlf5_) || defined(_mk20dx256_) // ARM
+       SOFTWARE_RESET();
+#endif
 }
 
 
index 84b22ae0a00967597287fbdb97a7a8662f01d5e0..7257ed4b95dbe173816e596125ae3b5d06e80930 100644 (file)
@@ -57,6 +57,12 @@ extern                       uint8_t USBKeys_Idle_Count;
 
 
 
+// ----- Capabilities -----
+
+void Output_usbCodeSend_capability( uint8_t state, uint8_t stateType, uint8_t *args );
+
+
+
 // ----- Functions -----
 
 void Output_setup();