t1s

package module
v0.0.0-...-8fa69d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MIT Imports: 0 Imported by: 1

README

LAN865x 10BASE-T1S user space driver for Go

This repository contains a Go wrapper around Microchip's OPEN Alliance TC6 Protocol Driver for LAN8650/1, oa-tc6-lib.

The experimental driver has been created as a development tool to help getting started using the LAN8651 on a generic microcontroller.

The HTTP server example from soypat's cyw43439 driver package has been adapted to provide a simple http server over T1S (see examples/internal/soypat-cyw43439 for license and imported files). The HTTP server example can be run on Raspberry Pi 4B making use of the periph library, or, compiled with TinyGo, on the Raspberry Pi Pico.

The HTTP server can be accessed from a client at another T1S node, which can, for instance, be a RPi 4 using Microchip's LAN865x linux driver. As in the original example for the Pico W, an LED can be toggled from within a web browser running on the client node.

To access a T1S network a Two-Wire ETH Click board or similar boards can be used.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MACConf

type MACConf struct {
	Addr [6]byte

	CopyAllFrames bool

	TxCutThrough bool
	RxCutThrough bool
}

type PLCAConf

type PLCAConf struct {
	NodeID     uint8
	NodeCount  uint8
	BurstCount uint8
	BurstTimer uint8
}

PLCAConf defines the Physical Layer Collision Avoidance mode settings.

type UpperProto

type UpperProto interface {
	// SendEthUp propagates a packet to the upper layer.
	SendEthUp(pkt []byte) error

	// PollForEth calls the upper protocol layers for ethernet packets
	// to be transmitted. If a packet is available, it is copied
	// to the buffer, and the packet's number of bytes is returned.
	// The capacity of buf must match the MTU of the upper layer.
	PollForEth(buf []byte) (n int, err error)
}

UpperProto defines the interface to the layer above the ethernet layer.

Directories

Path Synopsis
examples module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL