qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

qp_comms_dummy.c (883B)


      1 // Copyright 2023 Nick Brassel (@tzarc)
      2 // SPDX-License-Identifier: GPL-2.0-or-later
      3 
      4 #ifdef QUANTUM_PAINTER_DUMMY_COMMS_ENABLE
      5 
      6 #    include "qp_comms_dummy.h"
      7 
      8 static bool dummy_comms_init(painter_device_t device) {
      9     // No-op.
     10     return true;
     11 }
     12 
     13 static bool dummy_comms_start(painter_device_t device) {
     14     // No-op.
     15     return true;
     16 }
     17 
     18 static bool dummy_comms_stop(painter_device_t device) {
     19     // No-op.
     20     return true;
     21 }
     22 
     23 uint32_t dummy_comms_send(painter_device_t device, const void *data, uint32_t byte_count) {
     24     // No-op.
     25     return byte_count;
     26 }
     27 
     28 painter_comms_vtable_t dummy_comms_vtable = {
     29     // These are all effective no-op's because they're not actually needed.
     30     .comms_init  = dummy_comms_init,
     31     .comms_start = dummy_comms_start,
     32     .comms_stop  = dummy_comms_stop,
     33     .comms_send  = dummy_comms_send};
     34 
     35 #endif // QUANTUM_PAINTER_DUMMY_COMMS_ENABLE