mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(serial): add missing options for the open method (#1844)
This commit is contained in:
parent
7c1b409542
commit
1acade4883
@ -12,6 +12,12 @@ export interface SerialPermissionOptions {
|
||||
|
||||
export interface SerialOpenOptions {
|
||||
baudRate: number;
|
||||
dataBits: number;
|
||||
stopBits: number;
|
||||
parity: number;
|
||||
dtr: boolean;
|
||||
rts: boolean;
|
||||
sleepOnPause: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -29,7 +35,13 @@ export interface SerialOpenOptions {
|
||||
*
|
||||
* this.serial.requestPermission().then(() => {
|
||||
* this.serial.open({
|
||||
* baudRate: 9800
|
||||
* baudRate: 9800,
|
||||
* dataBits: 4,
|
||||
* stopBits: 1,
|
||||
* parity: 0,
|
||||
* dtr: true,
|
||||
* rts: true,
|
||||
* sleepOnPause: false
|
||||
* }).then(() => {
|
||||
* console.log('Serial connection opened');
|
||||
* });
|
||||
|
Loading…
Reference in New Issue
Block a user