No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

MinimumSerial.h 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Arduino SdFat Library
  2. * Copyright (C) 2012 by William Greiman
  3. *
  4. * This file is part of the Arduino SdFat Library
  5. *
  6. * This Library is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This Library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with the Arduino SdFat Library. If not, see
  18. * <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef MinimumSerial_h
  21. #define MinimumSerial_h
  22. #include <Arduino.h>
  23. //==============================================================================
  24. /**
  25. * \class MinimumSerial
  26. * \brief mini serial class for the %SdFat library.
  27. */
  28. class MinimumSerial : public Print {
  29. public:
  30. /**
  31. * Set baud rate for serial port zero and enable in non interrupt mode.
  32. * Do not call this function if you use another serial library.
  33. * \param[in] baud rate
  34. */
  35. void begin(uint32_t baud);
  36. /**
  37. * Unbuffered read
  38. * \return -1 if no character is available or an available character.
  39. */
  40. int read();
  41. /**
  42. * Unbuffered write
  43. *
  44. * \param[in] b byte to write.
  45. * \return 1
  46. */
  47. size_t write(uint8_t b);
  48. using Print::write;
  49. };
  50. #endif // MinimumSerial_h