정의
serial_set_inter_byte_timeout(ser, timeout=None)
기능
포트에 읽기/쓰기를 수행할 때 바이트 간(inter-byte)의 timeout을 설정합니다.
인수
|
인수명 |
자료형 |
기본값 |
설명 |
|---|---|---|---|
|
ser |
serial.Serial |
- |
Serial instance |
|
timeout |
float |
None |
읽기/쓰기 수행 시, 바이트 간의 timeout
|
리턴
|
값 |
설명 |
|---|---|
|
0 |
성공 |
예외
|
예외 |
설명 |
|---|---|
|
DR_Error (DR_ERROR_TYPE) |
인수의 데이터형 오류 시 |
예제
Python
ser = serial_open(port="COM", baudrate=115200, bytesize=DR_EIGHTBITS,
parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE)
res = serial_set_inter_byte_timeout(ser, 0.1)
serial_close(ser)