Kiibohd Controller
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ce dépôt est archivé. Vous pouvez voir les fichiers et le cloner, mais vous ne pouvez pas pousser ni ouvrir de ticket/demande d'ajout.

matrix_setup.h 1.1KB

123456789101112131415161718192021222324252627
  1. /* Copyright (C) 2016 by Jacob Alexander
  2. *
  3. * This file is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This file is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this file. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. // ----- Macros -----
  18. // Convenience Macros
  19. #define gpio( port, pin ) { Port_##port, Pin_##pin }
  20. #define sense( port, pin, adc, ch ) { Port_##port, Pin_##pin, ADC_##adc, Channel_##ch }
  21. #define Matrix_colsNum sizeof( Matrix_cols ) / sizeof( GPIO_Pin )
  22. #define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin )
  23. #define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState )