logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

qp_comms_dummy.c (866B)


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