[EthercatDevice_QECRXXHU]
描述
設定封包格式。
模組類別
class EthercatDevice_QECR11HU5S; /* MPG + Keypad + LCM + RS232x2, RJ45 power [1, 1] */ class EthercatDevice_QECR00HU5S; /* MPG + Keypad + LCM + RS232x2, RJ45 power [0, 0] */ class EthercatDevice_QECR11HU9S; /* MPG + Keypad + LCM + RS232/485x2, RJ45 power [1, 1] */ class EthercatDevice_QECR00HU9S; /* MPG + Keypad + LCM + RS232/485x2, RJ45 power [0, 0] */
格式
int uartSetFormat(int dev, uint8_t format);
語法
EthercatDevice_QECRXXHU slave;
slave.uartSetFormat(0, ECAT_UART_BYTESIZE8 + ECAT_UART_STOPBIT1 + ECAT_UART_NOPARITY);
參數
int dev:UART 編號 (0/1).
uint8_t format:
ECAT_UART_BYTESIZE5
ECAT_UART_BYTESIZE6
ECAT_UART_BYTESIZE7
ECAT_UART_BYTESIZE8
ECAT_UART_STOPBIT1
ECAT_UART_STOPBIT2
ECAT_UART_NOPARITY
ECAT_UART_ODDPARITY
ECAT_UART_EVENPARITY
回傳
Int:0表示成功;如果返回值小於0表示錯誤。
函式庫參考主頁面
86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。