logo

qmk_firmware

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

gpio.h (1476B)


  1. /* Copyright 2021 QMK
  2. *
  3. * This program 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 program 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 program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include "pin_defs.h"
  18. #if __has_include_next("gpio.h")
  19. # include_next "gpio.h" /* Include the platforms gpio.h */
  20. #endif
  21. // ======== DEPRECATED DEFINES - DO NOT USE ========
  22. #define setPinInput(pin) gpio_set_pin_input(pin)
  23. #define setPinInputHigh(pin) gpio_set_pin_input_high(pin)
  24. #define setPinInputLow(pin) gpio_set_pin_input_low(pin)
  25. #define setPinOutputPushPull(pin) gpio_set_pin_output_push_pull(pin)
  26. #define setPinOutputOpenDrain(pin) gpio_set_pin_output_open_drain(pin)
  27. #define setPinOutput(pin) gpio_set_pin_output_push_pull(pin)
  28. #define writePinHigh(pin) gpio_write_pin_high(pin)
  29. #define writePinLow(pin) gpio_write_pin_low(pin)
  30. #define writePin(pin, level) gpio_write_pin(pin, level)
  31. #define readPin(pin) gpio_read_pin(pin)
  32. #define togglePin(pin) gpio_toggle_pin(pin)