upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

bluetooth.c 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. Bluefruit Protocol for TMK firmware
  3. Author: Benjamin Gould, 2013
  4. Jack Humbert, 2015
  5. Based on code Copyright 2011 Jun Wako <[email protected]>
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include <stdint.h>
  18. #include "report.h"
  19. #include "print.h"
  20. #include "debug.h"
  21. #include "../serial.h"
  22. #include "bluetooth.h"
  23. void bluefruit_keyboard_print_report(report_keyboard_t *report)
  24. {
  25. if (!debug_keyboard) return;
  26. dprintf("keys: "); for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { debug_hex8(report->keys[i]); dprintf(" "); }
  27. dprintf(" mods: "); debug_hex8(report->mods);
  28. dprintf(" reserved: "); debug_hex8(report->reserved);
  29. dprintf("\n");
  30. }
  31. void bluefruit_serial_send(uint8_t data)
  32. {
  33. serial_send(data);
  34. }