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 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. #include "../../../../inc/MarlinConfigPre.h"
  23. #if HAS_TFT_LVGL_UI
  24. #include "tft_lvgl_configuration.h"
  25. #if ENABLED(USE_WIFI_FUNCTION)
  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" { /* C-declarations for 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(void) {
  40. WIFISERIAL.wifi_usart_irq(USART1_BASE);
  41. if (wifi_link_state == WIFI_TRANS_FILE) {
  42. if (WIFISERIAL.available() == (400)) WIFI_IO1_SET();
  43. if (WIFISERIAL.wifi_rb_is_full()) {
  44. if (esp_state == TRANSFER_IDLE) esp_state = TRANSFERING;
  45. if (storeRcvData(UART_RX_BUFFER_SIZE)) {
  46. if (wifiTransError.flag != 0x1) WIFI_IO1_RESET();
  47. }
  48. else {
  49. WIFI_IO1_SET();
  50. esp_state = TRANSFER_STORE;
  51. }
  52. }
  53. }
  54. }
  55. #ifdef __cplusplus
  56. } /* C-declarations for C++ */
  57. #endif
  58. #endif // USE_WIFI_FUNCTION
  59. #endif // HAS_TFT_LVGL_UI