Documentation ¶
Index ¶
Constants ¶
View Source
const MTU = 1536
Variables ¶
View Source
var ErrRegsFailure = errors.New("tc6regs call failed")
View Source
var ErrSendFailure = errors.New("tc6send failed")
Functions ¶
This section is empty.
Types ¶
type Inst ¶
type Inst struct { MAC *t1s.MACConf PLCA *t1s.PLCAConf UpperProto t1s.UpperProto Dev HwIntf // DebugInfo and DebugError can be set to functions // logging at info resp. error level. // This way a direct dependency on a [slog.Logger] can be // avoided for now, which may increase chances for tinygo // to better optimize for size in case logging is disabled. DebugInfo func(msg string, a ...any) DebugError func(msg string, a ...any) // contains filtered or unexported fields }
Inst contains the state of one LAN865x driver instance. To create an instance, public fields MAC, PLCA, UpperProto, Dev should be populated first. Then .Init may be called to initialize the driver.
If PLCA is set to nil, then CSMA/CD is used.
func (*Inst) SendEthDown ¶
type TicksProvider ¶
type TicksProvider interface {
Milliseconds() uint32
}
var Ticks TicksProvider
Ticks must be set to an actual implementation of TicksProvider before a driver can be initialized.
Click to show internal directories.
Click to hide internal directories.