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.

54 lines
1.4 KiB

  1. /* Copyright 2018 mtdjr - modified by ishtob
  2. * Driver for solenoid written for QMK
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  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. #pragma once
  18. #ifndef SOLENOID_DEFAULT_DWELL
  19. #define SOLENOID_DEFAULT_DWELL 12
  20. #endif
  21. #ifndef SOLENOID_MAX_DWELL
  22. #define SOLENOID_MAX_DWELL 100
  23. #endif
  24. #ifndef SOLENOID_MIN_DWELL
  25. #define SOLENOID_MIN_DWELL 4
  26. #endif
  27. #ifndef SOLENOID_ACTIVE
  28. #define SOLENOID_ACTIVE false
  29. #endif
  30. #ifndef SOLENOID_PIN
  31. #define SOLENOID_PIN F6
  32. #endif
  33. void solenoid_buzz_on(void);
  34. void solenoid_buzz_off(void);
  35. void solenoid_set_buzz(int buzz);
  36. void solenoid_dwell_minus(uint8_t solenoid_dwell);
  37. void solenoid_dwell_plus(uint8_t solenoid_dwell);
  38. void solenoid_set_dwell(uint8_t dwell);
  39. void solenoid_stop(void);
  40. void solenoid_fire(void);
  41. void solenoid_check(void);
  42. void solenoid_setup(void);
  43. void solenoid_shutdown(void);