0.1.1 • Published 19 days ago

usb-serial-plugin-edited v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

usb-serial-plugin

This plugin can be used for reading data from other device over the usb channel

Install

npm install usb-serial-plugin
npx cap sync

API

usbAttachedDetached(...)

usbAttachedDetached(callback: MyPluginCallback) => any
ParamType
callback(data: UsbSerialResponse) => void

Returns: any


connectedDevices()

connectedDevices() => any

Returns: any


openSerial(...)

openSerial(options: UsbSerialOptions) => any
ParamType
optionsUsbSerialOptions

Returns: any


closeSerial()

closeSerial() => any

Returns: any


readSerial()

readSerial() => any

Returns: any


writeSerial(...)

writeSerial(data: UsbSerialWriteOptions) => any
ParamType
dataUsbSerialWriteOptions

Returns: any


writeSerialHex(...)

writeSerialHex(data: UsbSerialWriteOptions) => any
ParamType
dataUsbSerialWriteOptions

Returns: any


registerReadCall(...)

registerReadCall(callback: MyPluginCallback) => any
ParamType
callback(data: UsbSerialResponse) => void

Returns: any


Interfaces

UsbSerialResponse

PropType
successboolean
errorUsbSerialError
dataany

UsbSerialError

PropType
messagestring
causestring

UsbSerialOptions

PropType
deviceIdnumber
portNumnumber
baudRatenumber
dataBitsnumber
stopBitsnumber
paritynumber
dtrboolean
rtsboolean
sleepOnPauseboolean

UsbSerialWriteOptions

PropType
datastring
0.1.1

19 days ago

0.1.0

5 months ago