XBee API operation library for mbed for miniprojects
Dependencies: SmartLabXBeeCore
Fork of SmartLabXBeeAPI2 by
SerialData Class Reference
The detailed implementation of ISerial, which is responsible for sending and receiving seial data. More...
#include <SerialData.h>
Public Member Functions | |
SerialData (PinName tx, PinName rx) | |
Create a SerialData instance which using pin tx and rx. | |
SerialData (PinName tx, PinName rx, int baudRate) | |
Create a SerialData instance which using pin tx and rx. | |
virtual int | readByte () |
Read the next avaliable data. | |
virtual void | writeByte (char data) |
Write one byte of data. | |
virtual bool | isOpen () |
Check if the serial port is open, not implemented and has no affect,. | |
virtual void | open () |
Open the serial port, not implemented and has no affect. | |
virtual void | close () |
Close the serial port, not implemented and has no affect. | |
virtual bool | peek () |
Check if data is ready to read. |
Detailed Description
The detailed implementation of ISerial, which is responsible for sending and receiving seial data.
Definition at line 8 of file SerialData.h.
Constructor & Destructor Documentation
SerialData | ( | PinName | tx, |
PinName | rx | ||
) |
Create a SerialData instance which using pin tx and rx.
- Parameters:
-
tx data transmission line rx data receiving line
Definition at line 3 of file SerialData.cpp.
SerialData | ( | PinName | tx, |
PinName | rx, | ||
int | baudRate | ||
) |
Create a SerialData instance which using pin tx and rx.
- Parameters:
-
tx data transmission line rx data receiving line baudRate baud rate
Definition at line 9 of file SerialData.cpp.
Member Function Documentation
void close | ( | ) | [virtual] |
Close the serial port, not implemented and has no affect.
Definition at line 46 of file SerialData.cpp.
bool isOpen | ( | ) | [virtual] |
Check if the serial port is open, not implemented and has no affect,.
- Returns:
- always true
Definition at line 38 of file SerialData.cpp.
void open | ( | ) | [virtual] |
Open the serial port, not implemented and has no affect.
Definition at line 43 of file SerialData.cpp.
bool peek | ( | ) | [virtual] |
Check if data is ready to read.
- Returns:
- true data avaliable. false data not avaliable.
Definition at line 31 of file SerialData.cpp.
int readByte | ( | ) | [virtual] |
Read the next avaliable data.
- Returns:
- [0x00-0xFF], -1 means data not avaliable.
Definition at line 21 of file SerialData.cpp.
void writeByte | ( | char | data ) | [virtual] |
Generated on Sun Jul 17 2022 19:50:18 by 1.7.2