big_led.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* Copyright 2020 Jay Greco
  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 2 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. #include "big_led.h"
  17. void set_big_LED_r(uint8_t mode) {
  18. switch(mode) {
  19. case LED_ON:
  20. setPinOutput(BIG_LED_R_PIN);
  21. writePin(BIG_LED_R_PIN, GPIO_STATE_HIGH);
  22. break;
  23. case LED_OFF:
  24. setPinOutput(BIG_LED_R_PIN);
  25. writePin(BIG_LED_R_PIN, GPIO_STATE_LOW);
  26. break;
  27. default:
  28. break;
  29. }
  30. }
  31. void set_big_LED_g(uint8_t mode) {
  32. switch(mode) {
  33. case LED_ON:
  34. setPinOutput(BIG_LED_G_PIN);
  35. writePin(BIG_LED_G_PIN, GPIO_STATE_HIGH);
  36. break;
  37. case LED_OFF:
  38. setPinOutput(BIG_LED_G_PIN);
  39. writePin(BIG_LED_G_PIN, GPIO_STATE_LOW);
  40. break;
  41. default:
  42. break;
  43. }
  44. }
  45. void set_big_LED_b(uint8_t mode) {
  46. switch(mode) {
  47. case LED_ON:
  48. setPinOutput(BIG_LED_B_PIN);
  49. writePin(BIG_LED_B_PIN, GPIO_STATE_HIGH);
  50. break;
  51. case LED_OFF:
  52. setPinOutput(BIG_LED_B_PIN);
  53. writePin(BIG_LED_B_PIN, GPIO_STATE_LOW);
  54. break;
  55. default:
  56. break;
  57. }
  58. }