eeprom

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: GPL-2.0, GPL-2.0-or-later Imports: 7 Imported by: 0

README

Package eeprom provides the ability to read data from an EEPROM device, connected to an i2c bus, conforming to a TLV format.

The goes 'machine' must set the i2c bus and address before calling the GetInfo() at initialization time to collect data and store it into the Fields structure. Once collected and stored, the fields can be referenced by the goes code.


© 2015-2016 Platina Systems, Inc. All rights reserved. Use of this source code is governed by this BSD-style LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ONIEId = "TlvInfo" + string(0x00)
View Source
var ONIEVer uint8 = 0x01

Functions

This section is empty.

Types

type Device

type Device struct {
	BusIndex   int
	BusAddress int
	Fields     fields
	// contains filtered or unexported fields
}

i2c bus id, i2c bus address, Fields of content, and raw data

func (*Device) AddCrc

func (d *Device) AddCrc() string

func (*Device) CalcCrc

func (d *Device) CalcCrc() string

func (*Device) CopyAll

func (d *Device) CopyAll(rawData []byte) string

func (*Device) DeleteField

func (d *Device) DeleteField(n string) string

func (*Device) DumpProm

func (d *Device) DumpProm() (bool, []byte)

func (*Device) GetInfo

func (d *Device) GetInfo() (err error)

func (*Device) WriteField

func (d *Device) WriteField(n string, v []byte) string

Jump to

Keyboard shortcuts

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