logo

qmk_firmware

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

keymap.c (612B)


  1. // Copyright 2024 QMK
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include QMK_KEYBOARD_H
  4. #include "battery.h"
  5. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  6. LAYOUT_ortho_1x1(KC_A)
  7. };
  8. void keyboard_post_init_user(void) {
  9. // Customise these values to desired behaviour
  10. debug_enable=true;
  11. // debug_matrix=false;
  12. // debug_keyboard=true;
  13. // debug_mouse=false;
  14. battery_init();
  15. }
  16. void housekeeping_task_user(void) {
  17. static uint32_t last = 0;
  18. if (timer_elapsed32(last) > 2000) {
  19. uprintf("Bat: %d!\n", battery_get_percent());
  20. last = timer_read32();
  21. }
  22. }