BufferedSerial.h
Go to the documentation of this file.
1 
24 #ifndef BUFFEREDSERIAL_H
25 #define BUFFEREDSERIAL_H
26 
27 #include "mbed.h"
28 #include "Buffer.h"
29 
71 class BufferedSerial : public RawSerial
72 {
73 private:
76  uint32_t _buf_size;
77  uint32_t _tx_multiple;
78 
79  void rxIrq(void);
80  void txIrq(void);
81  void prime(void);
82 
83 public:
92  BufferedSerial(PinName tx, PinName rx, uint32_t buf_size = 256, uint32_t tx_multiple = 4,const char* name=NULL);
93 
96  virtual ~BufferedSerial(void);
97 
101  virtual int readable(void);
102 
106  virtual int writeable(void);
107 
112  virtual int getc(void);
113 
118  virtual int putc(int c);
119 
124  virtual int puts(const char *s);
125 
130  virtual int printf(const char* format, ...);
131 
137  virtual ssize_t write(const void *s, std::size_t length);
138 };
139 
140 #endif
virtual ssize_t write(const void *s, std::size_t length)
BufferedSerial(PinName tx, PinName rx, uint32_t buf_size=256, uint32_t tx_multiple=4, const char *name=NULL)
Software buffers and interrupt driven tx and rx for Serial.
virtual int readable(void)
virtual int puts(const char *s)
virtual int getc(void)
virtual int putc(int c)
virtual int printf(const char *format,...)
Buffer< char > _txbuf
virtual ~BufferedSerial(void)
virtual int writeable(void)
uint32_t _tx_multiple
Buffer< char > _rxbuf
Software Buffer - Templated Ring Buffer for most data types.
uint32_t _buf_size


rosserial_mbed
Author(s): Gary Servin
autogenerated on Fri Jun 7 2019 22:02:48