Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PHY ¶
type PHY struct { // Port is the device used to communicate with the target. Port io.ReadWriteCloser // RXHandlePresense is an optional callback that is called when a target device may be present. RXHandlePresense func(byte) error // RXHandlePacket is a callback that is called each time a valid packet is received. Please note // that, depending on your hardware configuration, you may receive your own packets. RXHandlePacket func(addrSource uint8, addrDest uint8, payload []byte) error // TXDisableScrambler disables scrambling on outgoing packets when set. TXDisableScrambler bool // TXSendBreak is a callback that should send a low state on the serial line for at least // the given duration. If your hardware does not allow duration control, ensure it is at // least 70ms. TXSendBreak func(t time.Duration) error // contains filtered or unexported fields }
PHY implements functions for receiving and transmitting data to ISDT BattGO devices.
func NewSerialSimple ¶
NewSerialSimple is a convenience function that sets the PHY up for a standard serial port.
Click to show internal directories.
Click to hide internal directories.