MCPcopy Create free account

hub / github.com/SpaceLeap/go-embedded / functions

Functions97 in github.com/SpaceLeap/go-embedded

↓ 27 callersFunctionwrapErr
(method string, err error)
i2c/i2c.go:28
↓ 11 callersMethodsmbusAccess
(readWrite, register uint8, size int, data unsafe.Pointer)
i2c/i2c.go:82
↓ 6 callersMethodClose
()
pwm/pwm.go:111
↓ 4 callersFunctionSwapBytes
(word uint16)
i2c/i2c.go:15
↓ 4 callersMethodsetModeFlag
(flag bool, mask uint8)
spi/spi.go:290
↓ 3 callersMethodClose
Close unexports the GPIO pin.
gpio/gpio.go:85
↓ 3 callersMethodensureValueFileIsOpen
func (gpio *GPIO) SetPullUpDown(pull PullUpDown) error { file, err := os.OpenFile("/sys/kernel/debug/omap_mux/", os.O_WRONLY, 0660) if err != nil {
gpio/gpio.go:119
↓ 2 callersFunctionIsDeviceTreeLoaded
(name string)
common.go:39
↓ 2 callersFunctionIsExported
(nr int)
gpio/gpio.go:54
↓ 2 callersMethodReadUint16Reg
ReadUint16Reg is very like ReadUint8Reg; again, data is read from a device, from a designated register. But this time, the data is a complete word (16
i2c/i2c.go:163
↓ 2 callersMethodSetDuty
(duty time.Duration)
pwm/pwm.go:140
↓ 2 callersMethodWriteUint16Reg
WriteUint16Reg is the opposite of the ReadUint16Reg operation. 16 bits of data is written to a device, to the designated register.
i2c/i2c.go:173
↓ 2 callersFunctionservoPositionToDuty
(position float32)
pwm/servo.go:10
↓ 2 callersMethodsetEdge
(edge Edge)
gpio/gpio.go:152
↓ 2 callersMethodsetModeInt
(mode uint8)
spi/spi.go:304
↓ 1 callersFunctionBuildPath
(partialPath, prefix string)
common.go:26
↓ 1 callersMethodClose
()
adc/adc.go:65
↓ 1 callersMethodClose
()
i2c/i2c.go:63
↓ 1 callersMethodDisableEdgeDetection
()
gpio/gpio.go:213
↓ 1 callersFunctionNewPWM
(key string, period, duty time.Duration, polarity Polarity)
pwm/pwm.go:47
↓ 1 callersMethodProcessCall
ProcessCall selects a device register (through the register byte), sends 16 bits of data to it, and reads 16 bits of data in return.
i2c/i2c.go:223
↓ 1 callersMethodReadRaw
()
adc/adc.go:73
↓ 1 callersMethodReadUint16RegSwapped
ReadUint16RegSwapped is very like ReadUint8Reg; again, data is read from a device, from a designated register. But this time, the data is a complete w
i2c/i2c.go:181
↓ 1 callersMethodReadUint8
ReadUint8 reads a single byte from a device, without specifying a device register. Some devices are so simple that this interface is enough; for other
i2c/i2c.go:106
↓ 1 callersMethodReadUint8Reg
ReadUint8Reg reads a single byte from a device, from a designated register.
i2c/i2c.go:135
↓ 1 callersMethodSetAddress
(address int)
i2c/i2c.go:71
↓ 1 callersMethodSetDirection
(direction Direction)
gpio/gpio.go:104
↓ 1 callersMethodSetPeriod
(period time.Duration)
pwm/pwm.go:127
↓ 1 callersMethodSetPolarity
(polarity Polarity)
pwm/pwm.go:153
↓ 1 callersMethodStartEdgeDetectCallbacks
StartEdgeDetectCallbacks starts a thread that calls callback for every detected edge. An error or DisableEdgeDetection stops the thread.
gpio/gpio.go:224
↓ 1 callersMethodValue
()
gpio/gpio.go:131
↓ 1 callersMethodWaitForEdge
(edge Edge)
gpio/gpio.go:166
↓ 1 callersMethodWrite
Write data to SPI device.
spi/spi.go:117
↓ 1 callersMethodWriteUint16RegSwapped
WriteUint16RegSwapped is the opposite of the ReadUint16RegSwapped operation. 16 bits of data is written to a device, to the designated register. The b
i2c/i2c.go:189
↓ 1 callersMethodWriteUint8
WriteUint8 sends a single byte to a device.
i2c/i2c.go:115
↓ 1 callersMethodWriteUint8Reg
WriteUint8Reg writes a single byte to a device, to a designated register.
i2c/i2c.go:144
MethodAIn
()
adc/adc.go:69
MethodAddress
()
i2c/i2c.go:67
MethodBitsPerWord
()
spi/spi.go:238
MethodCSHigh
CS active high
spi/spi.go:203
FunctionCleanup
()
adc/adc.go:46
FunctionCleanup
()
pwm/pwm.go:43
MethodClose
Disconnects the object from the interface.
spi/spi.go:107
MethodClose
Closes the current servo instance
pwm/servo.go:53
MethodDirection
()
gpio/gpio.go:98
MethodDuty
()
pwm/pwm.go:136
MethodError
()
i2c/i2c.go:24
FunctionInit
(devicesDir string)
common.go:17
FunctionInit
(deviceTreePrefix string)
adc/adc.go:27
FunctionInit
(deviceTree string)
spi/spi.go:49
FunctionInit
(deviceTreePrefix, pwmDevicePrefix string)
pwm/pwm.go:33
MethodIsEdgeDetectionEnabled
()
gpio/gpio.go:209
MethodKey
()
pwm/pwm.go:119
MethodLSBFirst
()
spi/spi.go:212
FunctionLoadDeviceTree
(name string)
common.go:47
MethodLoop
Loop returns the loopback configuration.
spi/spi.go:229
MethodMaxSpeedHz
()
spi/spi.go:266
MethodMode
()
spi/spi.go:189
FunctionNewADC
(ain Name)
adc/adc.go:55
FunctionNewGPIO
NewGPIO exports the GPIO pin nr.
gpio/gpio.go:66
FunctionNewI2C
Connects the object to the specified SMBus.
i2c/i2c.go:46
FunctionNewSPI
NewSPI returns a new SPI object that is connected to the specified SPI device interface. NewSPI(X,Y) will open /dev/spidev-X.Y SPI is an object type
spi/spi.go:74
FunctionNewServo
(key string, position float32)
pwm/servo.go:19
MethodPeriod
()
pwm/pwm.go:123
MethodPolarity
()
pwm/pwm.go:149
MethodPosition
Position returns the servo position in the range from 0.0 to 1.0
pwm/servo.go:32
MethodProcessCallBlock
ProcessCallBlock reads a block of up to 32 bytes from a device, from a designated register.
i2c/i2c.go:241
MethodProcessCallSwapped
ProcessCallSwapped selects a device register (through the register byte), sends 16 bits of data to it, and reads 16 bits of data in return. The bytes
i2c/i2c.go:234
MethodRead
Read len(data) bytes from SPI device.
spi/spi.go:112
MethodRead
TODO: Perform I2C Block Read transaction. With if len == 32 then arg = C.I2C_SMBUS_I2C_BLOCK_BROKEN instead of I2C_SMBUS_I2C_BLOCK_DATA ???
i2c/i2c.go:283
MethodReadBlock
ReadBlock writes up to 32 bytes to a device, to a designated register.
i2c/i2c.go:257
MethodReadInt16Reg
ReadInt16Reg is very like ReadInt8Reg; again, data is read from a device, from a designated register. But this time, the data is a complete word (16 b
i2c/i2c.go:195
MethodReadInt16RegSwapped
ReadInt16RegSwapped is very like ReadInt8RegSwapped; again, data is read from a device, from a designated register. But this time, the data is a compl
i2c/i2c.go:209
MethodReadInt8
ReadInt8 reads a single byte from a device, without specifying a device register. Some devices are so simple that this interface is enough; for others
i2c/i2c.go:124
MethodReadInt8Reg
ReadInt8Reg reads a single byte from a device, from a designated register.
i2c/i2c.go:150
MethodReadValue
()
adc/adc.go:79
MethodSetBitsPerWord
(bits uint8)
spi/spi.go:242
MethodSetCSHigh
CS active high
spi/spi.go:208
MethodSetLSBFirst
(lsbFirst bool)
spi/spi.go:216
MethodSetLoop
SetLoop sets the loopback configuration.
spi/spi.go:234
MethodSetMaxSpeedHz
(maxSpeedHz uint32)
spi/spi.go:270
MethodSetMode
(mode Mode)
spi/spi.go:193
MethodSetPosition
SetPosition sets the servo position in the range from 0.0 to 1.0. position will be clamped if outside 0.0 to 1.0
pwm/servo.go:38
MethodSetThreeWire
(threeWire bool)
spi/spi.go:224
MethodSetValue
(value Value)
gpio/gpio.go:143
MethodStartEdgeDetectEvents
StartEdgeDetectEvents starts a thread that sends EdgeEvent instances into the events channel for every edge. EdgeEvent contains the time of the event,
gpio/gpio.go:241
MethodThreeWire
()
spi/spi.go:220
FunctionUnloadDeviceTree
(name string)
common.go:59
MethodWrite
(p []byte)
i2c/i2c.go:288
MethodWriteBlock
WriteBlock selects a device register, sends 1 to 31 bytes of data to it, and reads 1 to 31 bytes of data in return.
i2c/i2c.go:268
MethodWriteInt16Reg
WriteInt16Reg is the opposite of the ReadInt16Reg operation. 16 bits of data is written to a device, to the designated register.
i2c/i2c.go:202
MethodWriteInt16RegSwapped
WriteInt16RegSwapped is the opposite of the ReadInt16RegSwapped operation. 16 bits of data is written to a device, to the designated register. The byt
i2c/i2c.go:217
MethodWriteInt8
WriteInt8 sends a single byte to a device.
i2c/i2c.go:130
MethodWriteInt8Reg
WriteInt8Reg writes a single byte to a device, to a designated register.
i2c/i2c.go:156
MethodWriteQuick
WriteQuick sends a single bit to the device, at the place of the Rd/Wr bit.
i2c/i2c.go:97
MethodXfer
Xfer performs a SPI transaction. CS will be released and reactivated between blocks. delay specifies delay in usec between blocks.
spi/spi.go:135
MethodXfer2
Xfer2 performs a SPI transaction. CS will be held active between blocks.
spi/spi.go:164