Changes

Jump to navigation Jump to search

Category:ASI

220 bytes added, 13:41, 1 March 2017
no edit summary
Line 16: Line 16:  
: '''port:getIdentifier'''() - Returns the identifier associated to the port as a string, as given by the platform
 
: '''port:getIdentifier'''() - Returns the identifier associated to the port as a string, as given by the platform
 
: '''port:getState'''() - Returns the current state of the port as a constant from the asi table.
 
: '''port:getState'''() - Returns the current state of the port as a constant from the asi table.
: '''port:setBaudRate'''(newBaudRate)
+
: '''port:setBaudRate'''(newBaudRate) - Sets the baud rate for the connection. By default connections are established at 115200 bauds. If a different value is desired, the new baud rate must be set before establishing a connecting to the port. Returns self.
 
: '''port:connect'''(connectionCallback[, object]) - Sends an asynchronous request for connection to the port. When the request is processed, the result is reported to the specified callback.
 
: '''port:connect'''(connectionCallback[, object]) - Sends an asynchronous request for connection to the port. When the request is processed, the result is reported to the specified callback.
 
: '''port:disconnect'''() - Sends an asynchronous request for disconnection from the port. The result will be notified at the callback provided at port:connect().
 
: '''port:disconnect'''() - Sends an asynchronous request for disconnection from the port. The result will be notified at the callback provided at port:connect().

Navigation menu