类和功能


为了使用此扩展板使用PHPoC数据库的 ExpansionSerial class。

成员函数

ExpansionSerial class可使用的函数如下。

成员函数 说明
int getPID(void) get the product's ID
char *getName(void) get the product's name
ExpansionSerial(int sid) create an instance of the serial port
void begin(void) set the serial communication parameters
int available(void) get the received data size
int peek(void) peek one byte of received data
int read(void) read one byte from the receive buffer
int availableForWrite(void) get the remaining size of receive buffer
void flush(void) flush send buffer
int write(int wbuf, int wlen) send data