afLib 1.3 which is supporting both SPI and UART

Dependencies:   vt100 mbed afLib_1_3

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers edgeSerial.h Source File

edgeSerial.h

00001 #ifndef _EDGESERIAL_H_
00002 #define _EDGESERIAL_H_
00003 
00004 #include "mbed.h"
00005 
00006 class edgeSerial : public Serial {
00007 public:
00008     edgeSerial(PinName txPin, PinName rxPin, int baud) ;
00009 
00010     bool edge_available(void) { return Serial::readable() ; }
00011     char edge_peek(void) ;
00012     char edge_read(void) ;
00013     void edge_read(uint8_t *buffer, int len) ;
00014     void edge_write(uint8_t *buffer, int len) ;
00015 private:
00016     bool _is_peeked ;
00017     uint8_t _peeked_byte ;
00018 } ;
00019 
00020 #endif