Documentation
¶
Index ¶
Constants ¶
View Source
const ( Baud = 115200 Ch340VendorId = 0x1a86 Ch340ProductId = 0x7523 Esp32s3VendorId = 0x303a Esp32s3ProductId = 0x1001 )
Variables ¶
View Source
var DefaultDeviceFilters = []core.UsbFilter{ core.UsbFilter{ VendorId: Ch340VendorId, ProductId: Ch340ProductId, }, core.UsbFilter{ VendorId: Esp32s3VendorId, ProductId: Esp32s3ProductId, }, }
Functions ¶
This section is empty.
Types ¶
type MessageCallback ¶
type MessageCallback func(message *pb.FromSmartKnob)
type OnClosedCallback ¶
type OnClosedCallback func()
type OnCreatedCallback ¶
type OnCreatedCallback func(sk *SmartKnob)
type QueueEntry ¶
type QueueEntry struct {
// contains filtered or unexported fields
}
type SmartKnob ¶
type SmartKnob struct {
// contains filtered or unexported fields
}
func New ¶
func New(connection io.ReadWriteCloser, onMessage MessageCallback, onClosed OnClosedCallback) *SmartKnob
func (*SmartKnob) EnqueueMessage ¶
func (skc *SmartKnob) EnqueueMessage(message *pb.ToSmartknob) (uint32, error)
func (*SmartKnob) SendConfig ¶
func (skc *SmartKnob) SendConfig(message *pb.SmartKnobConfig) (uint32, error)
func (*SmartKnob) SetReadWriter ¶
func (skc *SmartKnob) SetReadWriter(readWriter io.ReadWriteCloser)
Click to show internal directories.
Click to hide internal directories.