类和功能


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

成员函数

ExpansionSerialclass可使用的函数如下。

Member Function Description
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