comparison Output/usbMuxUart/output_com.c @ 445:380e1f0123d0

Adding toggleKbdProtocol capability
author José Luis Salvador Rufo <salvador.joseluis@gmail.com>
date Thu, 26 May 2016 13:06:12 +0200
parents 68e19d7c953e
children 56237ba5da6f
comparison
equal deleted inserted replaced
444:a6370d67f460 445:380e1f0123d0
220 // Set the keyboard protocol to NKRO Mode 220 // Set the keyboard protocol to NKRO Mode
221 USBKeys_Protocol = 1; 221 USBKeys_Protocol = 1;
222 } 222 }
223 223
224 224
225 // Toggle Keyboard Protocol
226 void Output_toggleKbdProtocol_capability( uint8_t state, uint8_t stateType, uint8_t *args )
227 {
228 // Display capability name
229 if ( stateType == 0xFF && state == 0xFF )
230 {
231 print("Output_toggleKbdProtocol()");
232 return;
233 }
234
235 // Only toggle protocol if release state
236 if ( stateType == 0x00 && state == 0x03 )
237 {
238 // Flush the key buffers
239 Output_flushBuffers();
240
241 // Toggle the keyboard protocol Mode
242 USBKeys_Protocol = !USBKeys_Protocol;
243 }
244 }
245
246
225 // Sends a Consumer Control code to the USB Output buffer 247 // Sends a Consumer Control code to the USB Output buffer
226 void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *args ) 248 void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *args )
227 { 249 {
228 // Display capability name 250 // Display capability name
229 if ( stateType == 0xFF && state == 0xFF ) 251 if ( stateType == 0xFF && state == 0xFF )