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

SoftwareSerial.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #pragma once
  20. #include <stdint.h>
  21. #ifndef HAVE_SW_SERIAL
  22. #define SW_SERIAL_PLACEHOLDER 1
  23. #endif
  24. class SoftwareSerial {
  25. public:
  26. SoftwareSerial(int8_t RX_pin, int8_t TX_pin);
  27. void begin(const uint32_t baudrate);
  28. bool available();
  29. uint8_t read();
  30. uint16_t write(uint8_t byte);
  31. void flush();
  32. void listen();
  33. void stopListening();
  34. protected:
  35. bool listening;
  36. };