Documentation ¶
Index ¶
- type ComparatorLatching
- type ComparatorMode
- type ComparatorPolarity
- type ComparatorQueue
- type DataRate
- type Dev
- func (d *Dev) GetComparatorLatch() (ComparatorLatching, error)
- func (d *Dev) GetComparatorMode() (ComparatorMode, error)
- func (d *Dev) GetComparatorPolarity() (ComparatorPolarity, error)
- func (d *Dev) GetComparatorQueue() (ComparatorQueue, error)
- func (d *Dev) GetDataRate() (DataRate, error)
- func (d *Dev) GetHighThreshold() (int16, error)
- func (d *Dev) GetLowThreshold() (int16, error)
- func (d *Dev) GetMode() (OperatingMode, error)
- func (d *Dev) GetMux() (InputMuxSetting, error)
- func (d *Dev) GetNormalizedConversion() (float64, error)
- func (d *Dev) GetNormalizedSingle() (float64, error)
- func (d *Dev) GetRange() (FullScaleRange, error)
- func (d *Dev) GetScaledConversion(r FullScaleRange) (float64, error)
- func (d *Dev) GetScaledSingle(r FullScaleRange) (float64, error)
- func (d *Dev) SetComparatorLatch(v ComparatorLatching) error
- func (d *Dev) SetComparatorMode(v ComparatorMode) error
- func (d *Dev) SetComparatorPolarity(v ComparatorPolarity) error
- func (d *Dev) SetComparatorQueue(v ComparatorQueue) error
- func (d *Dev) SetDataRate(v DataRate) error
- func (d *Dev) SetHighThreshold(v int16) error
- func (d *Dev) SetLowThreshold(v int16) error
- func (d *Dev) SetMode(v OperatingMode) error
- func (d *Dev) SetMux(v InputMuxSetting) error
- func (d *Dev) SetRange(v FullScaleRange) error
- type FullScaleRange
- type InputMuxSetting
- type OperatingMode
- type Register
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComparatorLatching ¶
type ComparatorLatching byte
const ( ComparatorLatchingFalse ComparatorLatching = 0 ComparatorLatchingTrue ComparatorLatching = 1 )
func (ComparatorLatching) String ¶
func (c ComparatorLatching) String() string
type ComparatorMode ¶
type ComparatorMode byte
const ( ComparatorModeTraditional ComparatorMode = 0 ComparatorModeWindow ComparatorMode = 1 )
func (ComparatorMode) String ¶
func (c ComparatorMode) String() string
type ComparatorPolarity ¶
type ComparatorPolarity byte
const ( ComparatorPolarityActiveLow ComparatorPolarity = 0 ComparatorPolarityActiveHigh ComparatorPolarity = 1 )
func (ComparatorPolarity) String ¶
func (c ComparatorPolarity) String() string
type ComparatorQueue ¶
type ComparatorQueue byte
const ( ComparatorQueue1Sample ComparatorQueue = 0 ComparatorQueue2Sample ComparatorQueue = 1 ComparatorQueue3Sample ComparatorQueue = 2 ComparatorDisable ComparatorQueue = 3 )
type Dev ¶
Dev - i2c.Dev associated with mcp9600
func (*Dev) GetComparatorLatch ¶
func (d *Dev) GetComparatorLatch() (ComparatorLatching, error)
GetComparatorLatch -
func (*Dev) GetComparatorMode ¶
func (d *Dev) GetComparatorMode() (ComparatorMode, error)
GetComparatorMode -
func (*Dev) GetComparatorPolarity ¶
func (d *Dev) GetComparatorPolarity() (ComparatorPolarity, error)
GetComparatorPolarity -
func (*Dev) GetComparatorQueue ¶
func (d *Dev) GetComparatorQueue() (ComparatorQueue, error)
GetComparatorQueue -
func (*Dev) GetMux ¶
func (d *Dev) GetMux() (InputMuxSetting, error)
GetMux - Get conversion multiplexer configuration
func (*Dev) GetNormalizedConversion ¶
GetNormalizedConversion - return ranges between 1 and -1 of full-scale value
func (*Dev) GetNormalizedSingle ¶
GetNormalizedSingle - In single mode, trigger, wait for, then return a conversion
func (*Dev) GetRange ¶
func (d *Dev) GetRange() (FullScaleRange, error)
GetRange - Set programmable gain amplifier config
func (*Dev) GetScaledConversion ¶
func (d *Dev) GetScaledConversion(r FullScaleRange) (float64, error)
GetScaledConversion - return current scaled value given fullscalerange
func (*Dev) GetScaledSingle ¶
func (d *Dev) GetScaledSingle(r FullScaleRange) (float64, error)
GetScaledSingle - Same as GetNormalizedSingle, but scaled given fullscalerange
func (*Dev) SetComparatorLatch ¶
func (d *Dev) SetComparatorLatch(v ComparatorLatching) error
SetComparatorLatch -
func (*Dev) SetComparatorMode ¶
func (d *Dev) SetComparatorMode(v ComparatorMode) error
SetComparatorMode -
func (*Dev) SetComparatorPolarity ¶
func (d *Dev) SetComparatorPolarity(v ComparatorPolarity) error
SetComparatorPolarity -
func (*Dev) SetComparatorQueue ¶
func (d *Dev) SetComparatorQueue(v ComparatorQueue) error
SetComparatorQueue -
func (*Dev) SetMux ¶
func (d *Dev) SetMux(v InputMuxSetting) error
SetMux - Set conversion multiplexer configuration
func (*Dev) SetRange ¶
func (d *Dev) SetRange(v FullScaleRange) error
SetRange - Set programmable gain amplifier config
type FullScaleRange ¶
type FullScaleRange byte
const ( Range6p144 FullScaleRange = 0 Range4p096 FullScaleRange = 1 Range2p048 FullScaleRange = 2 Range1p024 FullScaleRange = 3 Range0p512 FullScaleRange = 4 Range0p256 FullScaleRange = 5 )
func (FullScaleRange) String ¶
func (f FullScaleRange) String() string
func (FullScaleRange) ToFloat ¶
func (f FullScaleRange) ToFloat() float64
type InputMuxSetting ¶
type InputMuxSetting byte
const ( Mux0v1 InputMuxSetting = 0 Mux0v3 InputMuxSetting = 1 Mux1v3 InputMuxSetting = 2 Mux2v3 InputMuxSetting = 3 Mux0vG InputMuxSetting = 4 Mux1vG InputMuxSetting = 5 Mux2vG InputMuxSetting = 6 Mux3vG InputMuxSetting = 7 )
func (InputMuxSetting) String ¶
func (i InputMuxSetting) String() string
type OperatingMode ¶
type OperatingMode byte
const ( ModeContinuous OperatingMode = 0 ModeSingle OperatingMode = 1 )
func (OperatingMode) String ¶
func (o OperatingMode) String() string