MCPcopy Create free account
hub / github.com/kiibohd/controller / Output_sysCtrlSend_capability

Function Output_sysCtrlSend_capability

Output/USB/output_usb.c:325–363  ·  view source on GitHub ↗

Sends a System Control code to the USB Output buffer

Source from the content-addressed store, hash-verified

323
324// Sends a System Control code to the USB Output buffer
325void Output_sysCtrlSend_capability( TriggerMacro *trigger, uint8_t state, uint8_t stateType, uint8_t *args )
326{
327#if enableKeyboard_define == 1
328 CapabilityState cstate = KLL_CapabilityState( state, stateType );
329
330 switch ( cstate )
331 {
332 case CapabilityState_Initial:
333 // Indicate changed
334 USBKeys_primary.changed |= USBKeyChangeState_System;
335 break;
336 case CapabilityState_Any:
337 // Only set consumer code
338 break;
339 case CapabilityState_Last:
340 // Clear system code
341 USBKeys_primary.changed |= USBKeyChangeState_System;
342 USBKeys_primary.sys_ctrl = 0;
343 return;
344 case CapabilityState_Debug:
345 // Display capability name
346 print("Output_sysCtrlSend(sysCode)");
347
348 // Read arg if not set to 0
349 if ( args != 0 )
350 {
351 uint8_t key = args[0];
352 print(" -> ");
353 printInt8( key );
354 }
355 return;
356 default:
357 return;
358 }
359
360 // Set system control code
361 USBKeys_primary.sys_ctrl = args[0];
362#endif
363}
364
365
366// Adds a single USB Code to the USB Output buffer

Callers

nothing calls this directly

Calls 2

KLL_CapabilityStateFunction · 0.85
printInt8Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…