Documentation
¶
Overview ¶
Package just4trionic drives the Just4Trionic STM32F103C8T6 CAN adapter over its virtual COM port (115200 baud). Importing the package registers the "Just4Trionic" adapter.
Wire protocol (Lawicel-flavoured ASCII, CR terminated):
ESC leave/reset mode (sent on open and close) O / C open / close the CAN channel Sn / s2 set bit-rate (s2 = 615.384 kbit/s for Trionic 5) Mxxxxxxxx acceptance code, mxxxxxxxx acceptance mask t<id><l><data> transmit: unpadded hex id, ascii DLC, data padded to 8 bytes
Received frames arrive as LF-terminated lines "wiiil dd..": 'w', 3 hex id chars, ascii DLC and the data in hex.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Just4Trionic ¶
type Just4Trionic struct {
// contains filtered or unexported fields
}
func (*Just4Trionic) Close ¶
func (a *Just4Trionic) Close() error
func (*Just4Trionic) Send ¶
Send encodes and writes one frame; the write completing is the confirmation (the firmware has no TX ack).
func (*Just4Trionic) SetFilter ¶
func (a *Just4Trionic) SetFilter(filters []uint32) error
SetFilter reprograms the acceptance filter; the channel must be closed while setting M/m, so bounce C -> M -> m -> O.