My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

irq_overrid.cpp 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #ifdef __STM32F1__
  23. #include "../../../inc/MarlinConfigPre.h"
  24. #if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE)
  25. #include "tft_lvgl_configuration.h"
  26. #include "draw_ui.h"
  27. #include "wifiSerial.h"
  28. #include <libmaple/libmaple.h>
  29. #include <libmaple/gpio.h>
  30. #include <libmaple/timer.h>
  31. #include <libmaple/usart.h>
  32. #include <libmaple/ring_buffer.h>
  33. #include "../../../inc/MarlinConfig.h"
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH);
  38. #define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW);
  39. void __irq_usart1() {
  40. if ((USART1_BASE->CR1 & USART_CR1_RXNEIE) && (USART1_BASE->SR & USART_SR_RXNE))
  41. WRITE(WIFI_IO1_PIN, HIGH);
  42. WIFISERIAL.wifi_usart_irq(USART1_BASE);
  43. }
  44. #ifdef __cplusplus
  45. } /* C-declarations for C++ */
  46. #endif
  47. #endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE
  48. #endif // __STM32F1__