Specifications

Here are the functions again, but this time broken down by category.
ADC
readAdc(channel)
Sample ADC on specified input channel, returns raw reading
CBUS Master Emulation
cbusRd(numToRead)
Reads numToRead bytes from CBUS, returns string
cbusWr(byteStr)
Writes every byte in byteStr to the CBUS
These functions are discussed in section 6 of this document.
GPIO
setPinDir(pin, isOutput)
Set direction for parallel I/O pin
setPinPullup(pin, isEnabled)
Enable pull-up resistor for Input pin
setPinSlew(pin, isRateControl)
Enable slew rate-control for Output pin
monitorPin(pin, isMonitored)
Enable GPIN events on Input pin
pulsePin(pin, msWidth, isPositive)
Apply pulse to Output pin
readPin(pin)
Read current level of pin
writePin(pin, isHigh)
Set Output pin level
setRate(rateCode)
Set pin sampling rate to off (0), 100 ms (1), 10 ms (2), or 1 ms (3)
I
2
C Master Emulation
getI2cResult()
Returns the result of the most recent I
2
C operation
i2cInit(enablePullups)
Prepare for I
2
C operations
i2cRead(str, numBytes, retries, ignoreFirstAck)
Write str out, then read numBytes back in from I
2
C bus. Parameters
retries and ignoreFirstAck are used with slow or special case
devices
i2cWrite(str, retries, ignoreFirstAck)
Write str out over the I
2
C bus. Parameters retries and
ignoreFirstAck are used with slow or special case devices
These functions are discussed in section 6 of this document.
Misc
setSegments(segments)
Set eval-board LED segments (clockwise bitmask)
bist()
Built-in self test
eraseImage()
Erase user-application FLASH memory
resetVm()
Reset the embedded virtual machine (prep for upload)
initVm()
Initialize embedded virtual machine
vmStat(statusCode, args...)
Solicit a tellVmStat for system parameters
Page 82 of 202 SNAP Reference Manual Document Number 600-0007K