如何使用Go序列库检查线路状态(RS232)

I am facing difficulty in checking line status( busy or clear) to send commands from Raspberry pi to voltage device. is there any function to check the line status in Go language or else i need to write a separate function for it???? please help me out.

The library you're using mentions that it doesn't support hardware flow control, so it looks like you'd have to modify it yourself.

However, there is another Go serial library https://github.com/schleibinger/sio that allows you to read/set the RTS,CTS,DTR and DSR pins. If you are using a virtual serial port over USB this should allow you to do what you want to do. The source code is only 1 file--the relevant methods are near the bottom.

However, if you are using the Raspberry Pi's GPIO pins, this library won't work for this.