afLib 1.3 which is supporting both SPI and UART

Dependencies:   vt100 mbed afLib_1_3

af_utils/edgeSerial.h

Committer:
Rhyme
Date:
2018-04-23
Revision:
0:87662653a3c6

File content as of revision 0:87662653a3c6:

#ifndef _EDGESERIAL_H_
#define _EDGESERIAL_H_

#include "mbed.h"

class edgeSerial : public Serial {
public:
    edgeSerial(PinName txPin, PinName rxPin, int baud) ;

    bool edge_available(void) { return Serial::readable() ; }
    char edge_peek(void) ;
    char edge_read(void) ;
    void edge_read(uint8_t *buffer, int len) ;
    void edge_write(uint8_t *buffer, int len) ;
private:
    bool _is_peeked ;
    uint8_t _peeked_byte ;
} ;

#endif