This list is not yet complete. All objects and methods for impOS™ 36 are included here; objects and methods coming to impOS 38 have not yet been added.
agentThe device-side object which represents the imp’s online agent agent.on()Registers a function to process messages sent from the agent to the device AvailabilityDevice ReturnsNothing Parameters
agent.send()Posts a message from the device to the agent AvailabilityDevice ReturnsInteger — 0 on success or a Send Error Code on failure Parameters
|
amqpThe agent-side object which represents the AMQP protocol amqp.createbinarymessage()Creates a new AMQP message in binary form AvailabilityAgent ReturnsAn amqpmessage object primed for transmission in binary form (‘AMQP DATA’) Parameters
amqp.createmessage()Creates a new AMQP message in UTF-8 form AvailabilityAgent ReturnsAn amqpmessage object primed for transmission in UTF-8 form (‘AMQP VALUE’) Parameters
amqp.openconnection()Initiates and manages a connection between the agent and a remote AMQP message broker AvailabilityAgent ReturnsAn amqpconnection object Parameters
|
amqpconnectionA manager for the connection to an AMQP broker amqpconnection.close()Instructs the target amqpconnection object to close AvailabilityAgent ReturnsNothing ParametersNone amqpconnection.isopen()Indicates whether the target connection is open or closed AvailabilityAgent ReturnsBoolean — ParametersNone amqpconnection.opensession()Attempts to open a new AMQP messaging session AvailabilityAgent ReturnsAn amqpsession object Parameters
|
amqpdeliveryThe entity used to retrieve a message and to settle its delivery with the broker. amqpdelivery.accept()Informs the AMQP broker you have accepted the amqpdelivery’s message AvailabilityAgent ReturnsNothing ParametersNone amqpdelivery.message()Returns the received message AvailabilityAgent ReturnsThe message as an amqpmessage object ParametersNone amqpdelivery.reject()Informs the AMQP broker you have rejected the amqpdelivery’s message AvailabilityAgent ReturnsNothing ParametersNone amqpdelivery.release()Releases the amqpdelivery’s message AvailabilityAgent ReturnsNothing ParametersNone |
amqpmessageThe agent-side object which represents an AMQP message amqpmessage.body()Returns the target AMQP message’s body content AvailabilityAgent ReturnsVarious — see below ParametersNone amqpmessage.properties()Returns the target AMQP message’s properties AvailabilityAgent ReturnsTable — the application-specific message properties ParametersNone |
amqpreceiverAn object which manages the reception of AMQP messages amqpreceiver.close()Instructs the target amqpreceiver object to close AvailabilityAgent ReturnsNothing ParametersNone amqpreceiver.isopen()Indicates whether the target receiver is open or closed AvailabilityAgent ReturnsBoolean — ParametersNone |
amqpsenderAn object which manages the sending of AMQP messages amqpsender.close()Instructs the target amqpsender object to close AvailabilityAgent ReturnsNothing ParametersNone amqpsender.createtransfer()Establish a single transfer to transport an outgoing AMQP message AvailabilityAgent ReturnsAn amqptransfer object Parameters
amqpsender.isopen()Indicates whether the target sender is open or closed AvailabilityAgent ReturnsBoolean — ParametersNone |
amqpsessionRepresents a communication session with an AMQP broker amqpsession.close()Instructs the target amqpsession object to close AvailabilityAgent ReturnsNothing ParametersNone amqpsession.isopen()Indicates whether the target session is open or closed AvailabilityAgent ReturnsBoolean — ParametersNone amqpsession.openreceiver()Establishes a means to receive AMQP messages AvailabilityAgent ReturnsAn amqpreceiver object Parameters
amqpsession.opensender()Establishes a means to send AMQP messages AvailabilityAgent ReturnsAn amqpsender object Parameters
|
amqptransferAn object which manages the transfer of a single AMQP message amqptransfer.cancel()Cancel the AMQP transfer AvailabilityAgent ReturnsNothing ParametersNone amqptransfer.sendasync()Send a specific AMQP message asynchronously AvailabilityAgent ReturnsNothing Parameters
|
cryptoA device-side object which can be used to perform various hash functions crypto.equals()Compares two hashes for equality in constant time AvailabilityDevice (from impOS™ 36) ReturnsBool — true if the hashes are equal, false otherwise Parameters
crypto.hmacsha256()Performs an HMAC-SHA-256 hash function AvailabilityDevice (from impOS™ 36) ReturnsBlob — the hashed data (32 bytes) Parameters
crypto.sha256()Performs an SHA-256 hash function AvailabilityDevice (from impOS™ 36) ReturnsBlob — the hashed data (32 bytes) Parameters
|
deviceAn agent-side object that represents the imp-enabled device to which that agent has been paired device.info()Obtain network and connection information about an agent’s paired device AvailabilityAgent ReturnsA table of device information ParametersNone device.isconnected()Indicates whether the device is currently connected to the server or not AvailabilityAgent ReturnsBool — true if the device is connected or false if it is not ParametersNone device.on()Registers a function to process messages sent from the device to the agent AvailabilityAgent ReturnsNothing Parameters
device.onconnect()Registers a function that will be called when the device connects to the agent AvailabilityAgent ReturnsNothing Parameters
device.ondisconnect()Registers a function that will be called when the device disconnects from the agent AvailabilityAgent ReturnsNothing Parameters
device.send()Posts a message from the agent to the device AvailabilityAgent ReturnsNothing Parameters
|
fixedfrequencydacAn object that represents an imp’s 12-bit fixed-frequency DAC fixedfrequencydac.addbuffer()Queues a fresh buffer for consumption by the DAC AvailabilityDevice ReturnsNothing Parameters
fixedfrequencydac.configure()Configures the fixed-frequency DAC for use AvailabilityDevice ReturnsNothing Parameters
fixedfrequencydac.start()Starts the fixed-frequency DAC AvailabilityDevice ReturnsNothing ParametersNone fixedfrequencydac.stop()Stops the fixed-frequency DAC AvailabilityDevice ReturnsNothing Parameters
|
ftpA class which can be used to mediate FTP transfers ftp.get()Creates a new FTP download request object AvailabilityAgent Returnshttprequest object Parameters
ftp.put()Creates a new FTP upload request object AvailabilityAgent Returnshttprequest object Parameters
|
hardwareA device-only object that represents the device’s IO peripherals. hardware.getdeviceid()Returns the device’s unique ID code AvailabilityDevice (from impOS™ 27) ReturnsString — the device’s ID code ParametersNone hardware.lightlevel()Returns a reading from the imp’s light-level sensor AvailabilityDevice (from impOS™ 27) ReturnsInteger — the 16-bit photosensor reading ParametersNone hardware.micros()Returns the current value of the imp’s free-running microsecond timer AvailabilityDevice ReturnsInteger — the number of microseconds counted ParametersNone hardware.millis()Returns the current value of the imp’s free-running millisecond timer AvailabilityDevice ReturnsInteger — the number of milliseconds counted ParametersNone hardware.vbat()Returns the true battery voltage of imp003-based devices AvailabilityDevice (from impOS™ 32) ReturnsFloat — the actual battery voltage (VBAT) ParametersNone hardware.voltage()Returns the imp power supply voltage AvailabilityDevice ReturnsFloat — the analog supply voltage ParametersNone hardware.wakereason()Returns a constant indicating the reason why the imp was woken AvailabilityDevice ReturnsInteger — the Wake-up Code ParametersNone |
hashA class which can be used to perform various hash functions hash.hmacsha1()Performs an HMAC-SHA1 hash function AvailabilityAgent ReturnsBlob — the hashed data (20 bytes) Parameters
hash.hmacsha256()Performs an HMAC-SHA-256 hash function AvailabilityAgent ReturnsBlob — the hashed data (32 bytes) Parameters
hash.hmacsha512()Performs an HMAC-SHA-512 hash function AvailabilityAgent ReturnsBlob — the hashed data (64 bytes) Parameters
hash.md5()Performs an MD5 hash function AvailabilityAgent ReturnsBlob — the hashed data (16 bytes) Parameters
hash.sha1()Performs an SHA-1 hash function AvailabilityAgent ReturnsBlob — the hashed data (20 bytes) Parameters
hash.sha256()Performs an SHA-256 hash function AvailabilityAgent ReturnsBlob — the hashed data (32 bytes) Parameters
hash.sha512()Performs an SHA-512 hash function AvailabilityAgent ReturnsBlob — the hashed data (64 bytes) Parameters
|
httpA class which provides methods that can be used to mediate HTTP and other Internet messaging http.agenturl()Returns the agent’s unique URL AvailabilityAgent ReturnsString — the agent’s full URL ParametersNone http.base64decode()Decodes a base64-encoded string or blob AvailabilityAgent ReturnsBlob — the decoded bytes, or a zero-length blob if the data is not valid Base64 Parameters
http.base64encode()Encodes a string or blob in Base64 format AvailabilityAgent ReturnsString — the Base64-encoded data Parameters
http.get()Returns a new HTTP GET request object AvailabilityAgent Returnshttprequest object Parameters
http.httpdelete()Returns a new HTTP DELETE request object AvailabilityAgent Returnshttprequest object Parameters
http.jsondecode()Parses JSON data into objects AvailabilityAgent ReturnsAlmost anything (see ‘Description’, below) Parameters
http.jsonencode()Encodes a Squirrel object into JSON data AvailabilityAgent ReturnsString — the JSON data Parameters
http.onrequest()Registers a function to be executed on receipt of an incoming HTTP request AvailabilityAgent ReturnsNothing Parameters
http.post()Returns a new HTTP POST request object AvailabilityAgent Returnshttprequest object Parameters
http.poststream()Returns a new HTTP POST stream request object AvailabilityAgent ReturnsAn httpstream object primed to make a POST request Parameters
http.put()Returns a new HTTP PUT request object AvailabilityAgent Returnshttprequest object Parameters
http.putstream()Returns a new HTTP PUT stream request object AvailabilityAgent ReturnsAn httpstream object primed to make a PUT request Parameters
http.request()Returns a new generic HTTP request object AvailabilityAgent Returnshttprequest object Parameters
http.requeststream()Returns a new HTTP stream request object AvailabilityAgent ReturnsAn httpstream object Parameters
http.urldecode()Parses a string containing URL-encoded key-value pairs AvailabilityAgent ReturnsTable — the URL-encoded data as key-value pairs Parameters
http.urlencode()Encodes a table of key-value pairs into a single URL-encoded string AvailabilityAgent ReturnsString — the URL-encoded data Parameters
|
httprequestA class which represents a single HTTP transaction httprequest.cancel()Cancels an HTTP request sent asynchronously AvailabilityAgent ReturnsNothing ParametersNone httprequest.sendasync()Issues the target HTTP request and registers functions to be executed asynchronously when the HTTP transaction completes AvailabilityAgent ReturnsNothing Parameters
httprequest.sendsync()Issues the target HTTP request and pauses program execution until the transaction completes AvailabilityAgent ReturnsTable — the decoded response from the remote server ParametersNone httprequest.setvalidation()Sets the validation option for Secure HTTP (HTTPS) communications AvailabilityAgent ReturnsNothing Parameters
|
httpresponseAn object which represents the agent’s response to a single incoming HTTP request httpresponse.header()Adds an HTTP header to the response object AvailabilityAgent ReturnsNothing Parameters
httpresponse.send()Issues the response to an incoming HTTP request AvailabilityAgent ReturnsNothing Parameters
|
httpstreamA class which represents a single HTTP streaming transaction httpstream.cancel()Cancel and close an HTTP stream AvailabilityAgent ReturnsNothing ParametersNone httpstream.closeasync()Close an asynchronous HTTP stream AvailabilityAgent ReturnsNothing Parameters
httpstream.closesync()Close a synchronous HTTP stream AvailabilityAgent ReturnsTable — the decoded response from the remote server ParametersNone httpstream.send()Sends data via an outbound HTTP stream AvailabilityAgent ReturnsNothing Parameters
httpstream.setvalidation()Sets the validation option for Secure HTTP (HTTPS) communications AvailabilityAgent ReturnsNothing Parameters
|
I2CA class which represents imp I²C two-wire serial ports i2c.configure()Configures the I²C clock speed and enables the port AvailabilityDevice ReturnsNothing Parameters
i2c.disable()Disables the I²C bus AvailabilityDevice (from impOS™ 30) ReturnsNothing ParametersNone i2c.read()Initiates an I²C read from a specific register within a specific device AvailabilityDevice ReturnsString — the characters read from the I²C bus, or Parameters
i2c.readerror()Returns the error code generated by the last I²C read AvailabilityDevice (from impOS™ 30) ReturnsInteger — an I²C Error Code, or the constant NO_ERROR ParametersNone i2c.write()Initiates an I²C write to the device at the specified address AvailabilityDevice ReturnsInteger — 0 for success, or an I²C Error Code Parameters
|
impAn automatically instantiated object which provides methods that control and yield information about the imp. imp.cancelwakeup()Cancels a timer previously established by imp.wakeup() AvailabilityDevice (from impOS™ 27), agent ReturnsNothing Parameters
imp.clearconfiguration()Erases the network settings and credentials held by a device AvailabilityDevice ReturnsNothing Parameters
imp.configparamsA table of information relevant to imp factory configuration AvailabilityDevice, agent TypeTable imp.deepsleepfor()Disconnects the imp from WiFi and puts it into deep sleep for the specified period AvailabilityDevice ReturnsNothing Parameters
imp.deepsleepuntil()Disconnects the imp from WiFi and puts it into deep sleep until the specified time AvailabilityDevice ReturnsNothing Parameters
imp.enableblinkup()Enables or disables BlinkUp™ on a device AvailabilityDevice ReturnsNothing Parameters
imp.environment()Returns information about the imp’s type AvailabilityDevice, agent ReturnsInteger — the value of the imp’s environment constant ParametersNone imp.getbootromversion()Returns the current version of the imp’s BootROM AvailabilityDevice (from impOS™ 32) ReturnsString — the special version string of the imp’s BootROM firmware ParametersNone imp.getcountry()Returns the imp’s specified WiFi regulatory territory AvailabilityDevice (from impOS™ 30) ReturnsA string constant indicating the imp’s set region ParametersNone imp.getmemoryfree()Returns the amount of currently unused memory in the imp AvailabilityDevice, agent ReturnsInteger — the amount of available RAM in bytes ParametersNone imp.getpoweren()Returns the current state of certain imps’ POWER_EN pin AvailabilityDevice (from impOS™ 27) ReturnsBool — ParametersNone imp.getpowersave()Returns the imp’s current WiFi power-save setting AvailabilityDevice ReturnsBool — ParametersNone imp.getsoftwareversion()Returns the imp or agent’s firmware version as a string AvailabilityDevice, agent ReturnsString — impOS™ version information ParametersNone imp.getuserconfiguration()Retrieves stored device-level persistent user data AvailabilityDevice (from impOS™ 36) ReturnsThe stored user data as a blob ParametersNone imp.info()Returns information about the imp on which your code is running AvailabilityDevice (from impOS™ 36) ReturnsDevice information (see below) ParametersNone imp.onidle()Registers a function to be executed when the imp next goes idle AvailabilityDevice ReturnsNothing Parameters
imp.onunhandledexception()Register a global error handler AvailabilityDevice (from impOS™ 38) ReturnsNothing Parameters
imp.scanwifinetworks()Returns a list of WiFi networks detectable by the imp AvailabilityDevice (from impOS™ 27) ReturnsArray — a list of nearby WiFi networks, each detailed in a table Parameters
imp.setcountry()Specifies the imp’s WiFi regulatory territory at blessing AvailabilityDevice (from impOS™ 30) ReturnsNothing Parameters
imp.setenroltokens()Installs Electric Imp impCloud™ enrolment tokens into the imp AvailabilityDevice (from impOS™ 30) ReturnsNothing Parameters
imp.setnvramimage()Sets the NVRAM image of certain imps at blessing AvailabilityDevice (from impOS™ 30) ReturnsA hash of the NVRAM image as a string Parameters
imp.setpoweren()Attempts to change the state of certain imps’ POWER_EN pin AvailabilityDevice (from impOS™ 27) ReturnsNothing Parameters
imp.setpowersave()Enables or disables the imp WiFi sub-system’s power-save mode AvailabilityDevice ReturnsNothing Parameters
imp.setproxy()Configures the device for Internet access through a proxy server AvailabilityDevice (from impOS™ 33) ReturnsNothing Parameters
imp.setrescuepin()Configures a rescue pin AvailabilityDevice (from impOS™ 36) ReturnsNothing Parameters
imp.setsendbuffersize()Attempts to set the size of the imp’s TCP send window for server communications AvailabilityDevice (from impOS™ 27) ReturnsInteger — the previous size of the imp’s TCP send window in bytes Parameters
imp.setstaticnetworkconfiguration()Allows a static network configuration to be applied to the device AvailabilityDevice (from impOS™ 33) ReturnsNothing Parameters
imp.setuserconfiguration()Sets device-level persistent user data AvailabilityDevice (from impOS™ 36) ReturnsNothing Parameters
imp.setwificonfiguration()Sets an imp’s saved WiFi network access data AvailabilityDevice ReturnsNothing Parameters
imp.sleep()Causes the imp to halt code execution for a specified period AvailabilityDevice, agent ReturnsNothing Parameters
imp.wakeup()Sets a timer and registers a function which will be called when the timer fires AvailabilityDevice, agent ReturnsThe new timer object or Parameters
|
netAn automatically instantiated object which provides methods that yield information about the imp’s network options. net.configurewps()Initiates an attempt to request WiFi credentials from a router using WPS AvailabilityDevice (from impOS™ 36) ReturnsNothing Parameters
net.info()Returns the imp’s stored network configuration information AvailabilityDevice (from impOS™ 33) ReturnsTable containing the network configuration information (see below) ParametersNone |
nvA pre-formed table object which provides non-volatile data storage while the imp is in deep sleep |
PinA class which represents one of the imp’s GPIO pins pin.configure()Configures one of the imp’s GPIO pins for a particular mode of operation AvailabilityDevice ReturnsNothing Parameters
pin.getdelay()Returns the specified PTPG output pin’s current delay value AvailabilityDevice ReturnsFloat — the PTPG delay in seconds ParametersNone pin.getperiod()Returns the period of a pin in PWM or PTPG mode AvailabilityDevice ReturnsFloat — the PTPG or PWM period in seconds ParametersNone pin.getsteps()Returns the step-count of a pin in PWM mode AvailabilityDevice ReturnsInteger — the PWM step-count ParametersNone pin.read()Reads the state of the specified pin AvailabilityDevice ReturnsInteger — the state of the specified pin (see ‘Description’, below) ParametersNone pin.write()Sets the state of the specified pin AvailabilityDevice ReturnsNothing Parameters
|
samplerAn object which represents an imp’s 12-bit ADC sampler.configure()Configures the ADC for use AvailabilityDevice ReturnsNothing Parameters
sampler.getsampleratehz()Returns the ADC’s current sampling rate AvailabilityDevice (from impOS™ 27) ReturnsFloat — the ADC’s sample rate in Hz ParametersNone sampler.reset()Resets the ADC, freeing all sample buffers AvailabilityDevice (from impOS™ 27) ReturnsNothing ParametersNone sampler.start()Starts the ADC AvailabilityDevice ReturnsNothing ParametersNone sampler.stop()Stops the ADC and sends the current buffer to the callback for processing AvailabilityDevice ReturnsNothing ParametersNone |
serverA class which provides methods for communicating with the Electric Imp impCloud™ server.bless()Binds a production device to specified application firmware and registers a function to be executed when the blessing attempt completes AvailabilityDevice ReturnsNothing Parameters
server.connect()Attempts to establish a connection between the device and the server AvailabilityDevice ReturnsNothing Parameters
server.disconnect()Disconnects the devices from the server and turns WiFi off AvailabilityDevice ReturnsNothing ParametersNone server.error()Posts an error message to the server-hosted log and highlighted as such in the IDE AvailabilityDevice, agent ReturnsInteger — 0 on success, or a Send Error Code on failure Parameters
server.factoryblinkup()Triggers an imp to perform a BlinkUp operation on a second imp AvailabilityDevice ReturnsNothing Parameters
server.flush()Suspends code execution until any pending data has been sent to the server AvailabilityDevice ReturnsBool — true if the data has been sent, or false on any other outcome Parameters
server.isconnected()Indicates to the device whether or not it is currently connected to the server AvailabilityDevice ReturnsBool — true if the device is connected to the server, or false otherwise ParametersNone server.load()Returns the most recent data stored using server.save() AvailabilityAgent ReturnsTable — the data read from persistent storage ParametersNone server.log()Adds a message to the server-hosted log, which is presented in the IDE AvailabilityDevice, agent ReturnsInteger — 0 on success, or a Send Error Code on failure Parameters
server.onshutdown()Registers a function to be executed when the server requests a restart AvailabilityDevice ReturnsNothing Parameters
server.onunexpecteddisconnect()Registers a function to be called if the imp unexpectedly disconnects from the server AvailabilityDevice ReturnsNothing Parameters
server.restart()Manually restarts the device or agent AvailabilityDevice, agent ReturnsDoes not return (see ‘Description’, below) ParametersNone server.save()Stores data in server-side persistent storage AvailabilityAgent ReturnsInteger — 0 on success, or a Send Error Code on failure Parameters
server.setsendtimeoutpolicy()Sets the device’s disconnection handling policy and its reconnection timeout period AvailabilityDevice ReturnsNothing Parameters
server.sleepfor()Disconnects from WiFi and puts the imp into a deep sleep state for the specified duration AvailabilityDevice ReturnsDoes not return (see ‘Description’, below) Parameters
server.sleepuntil()Disconnects from WiFi and puts the imp into a deep sleep state until a specified time AvailabilityDevice ReturnsDoes not return (see ‘Description’, below) Parameters
|
SPIA class which represents one of an imp’s SPI synchronous serial ports spi.chipselect()Controls the imp005’s dedicated SPI Chip Select pins AvailabilityDevice (from impOS™ 33) ReturnsNothing Parameters
spi.configure()Configures the SPI data format and rate AvailabilityDevice ReturnsInteger — the actual SPI data rate in kHz Parameters
spi.disable()Disables the specified SPI bus AvailabilityDevice (from impOS™ 30) ReturnsNothing ParametersNone spi.readblob()Reads data from SPI port and returns it as a series of bytes AvailabilityDevice ReturnsBlob — the bytes read from the SPI bus Parameters
spi.readstring()Reads data from the SPI port and returns it as a string AvailabilityDevice ReturnsString — the characters read from the SPI bus Parameters
spi.write()Sends data to the SPI port AvailabilityDevice ReturnsInteger — the number of bytes written to the SPI bus Parameters
spi.writeread()Sends data to the SPI serial port and simultaneously reads the same amount of data AvailabilityDevice ReturnsString or blob — the data that was read during the write Parameters
|
spiflashA class which represents SPI flash storage connected to an imp003 or later spiflash.chipid()Returns the identity code of the SPI flash chip AvailabilityDevice (from impOS™ 30) ReturnsInteger — the SPI flash chip’s standard ID code ParametersNone spiflash.disable()Disables the SPI flash for reading and writing AvailabilityDevice (from impOS™ 30) ReturnsNothing ParametersNone spiflash.enable()Enables the SPI flash for reading and writing AvailabilityDevice (from impOS™ 30) ReturnsNothing ParametersNone spiflash.erasesector()Erases a 4KB sector of the SPI flash AvailabilityDevice (from impOS™ 30) ReturnsNothing Parameters
spiflash.info()Returns SPI flash User Info settings AvailabilityDevice (from impOS™ 33) ReturnsTable of SPI flash User Info settings ParametersNone spiflash.read()Copies data from the SPI flash and returns it as a series of bytes AvailabilityDevice (from impOS™ 30) ReturnsBlob — the bytes read from the SPI flash Parameters
spiflash.readintoblob()Copies data from the SPI flash storage into a pre-existing blob AvailabilityDevice (from impOS™ 30) ReturnsNothing Parameters
spiflash.setspeed()Sets the speed of SPI flash accesses on imp003 and imp004m devices AvailabilityDevice (from impOS™ 34) ReturnsInteger — the actual speed of the SPI flash in Hertz Parameters
spiflash.size()Returns the total number of bytes in the SPI flash that are available to Squirrel AvailabilityDevice (from impOS™ 30) ReturnsInteger — the number of bytes of storage in the SPI flash available for user code use ParametersNone spiflash.write()Writes a full or partial blob into the SPI flash AvailabilityDevice (from impOS™ 30) ReturnsInteger — 0 if no write verification selected or verification was successful, otherwise a verification failure indicator Parameters
|
UARTA class which represents one of an imp’s UART asynchronous serial ports uart.configure()Configures the UART serial bus AvailabilityDevice ReturnsInteger — the actual connection speed in bits per second Parameters
uart.disable()Disables the UART interface AvailabilityDevice ReturnsNothing ParametersNone uart.flags()Returns event flags set by the previous UART transaction AvailabilityDevice (from impOS™ 30) ReturnsInteger — the UART transaction event flags bitfield ParametersNone uart.flush()Pauses program execution until the UART’s output FIFO has drained AvailabilityDevice ReturnsNothing ParametersNone uart.read()Reads a byte from the serial port AvailabilityDevice ReturnsInteger — the value read from the UART FIFO, or -1 if the FIFO is empty ParametersNone uart.readblob()Reads a specified number of bytes from the serial port AvailabilityDevice (from impOS™ 30) ReturnsBlob — the bytes read from the UART FIFO, or a zero-length blob if the FIFO is empty Parameters
uart.readstring()Reads a string of characters from the serial port AvailabilityDevice (from impOS™ 30) ReturnsString — the characters read from the UART FIFO, or an empty string if the FIFO is empty Parameters
uart.setrxfifosize()Specifies the size of the UART receive FIFO AvailabilityDevice (from impOS™ 32) ReturnsNothing Parameters
uart.settxactive()Configures a pin as a UART-transmit-active indicator AvailabilityDevice (from impOS™ 33.20) ReturnsNothing Parameters
uart.settxfifosize()Sets the size of the UART transmit FIFO AvailabilityDevice (from impOS™ 32) Returnsnothing Parameters
uart.write()Sends one or more bytes to the serial port AvailabilityDevice ReturnsNothing Parameters
|
usbAn object which represents the imp005’s USB bus usb.configure()Configure the imp005’s USB AvailabilityDevice (from impOS™ 33) ReturnsNothing Parameters
usb.controltransfer()Initiates a control transfer via the imp005’s USB AvailabilityDevice (from impOS™ 33) ReturnsNothing Parameters
usb.disable()Disables the imp005’s USB AvailabilityDevice (from impOS™ 33) ReturnsNothing ParametersNone usb.generaltransfer()Initiates a transfer via the imp005’s USB AvailabilityDevice (from impOS™ 33) ReturnsNothing Parameters
usb.openendpoint()Opens the endpoint for reading or writing via the imp005’s USB AvailabilityDevice (from impOS™ 34) Returns
Parameters
|