Skip to content

Commit 6e997b5

Browse files
committed
fix(readme): correct indentation and enhance serial port listening example
1 parent df46965 commit 6e997b5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,16 @@ pnpm add tauri-plugin-serialplugin-api
140140
});
141141
await port.open();
142142

143-
// Write data
144-
await port.write("Hello, Serial Port!");
143+
// Write data
144+
await port.write("Hello, Serial Port!");
145145

146-
// Start port listening
147-
await port.startListening();
146+
// Start port listening
147+
await port.startListening();
148148

149-
// Start port listening
150-
const unsubscribe = await port.listen((data) => {
151-
console.log("Received:", data);
152-
});
149+
// Start port listening
150+
const unsubscribe = await port.listen((data) => {
151+
console.log("Received:", data);
152+
});
153153

154154
// Stop listening when done
155155
await port.cancelListen();

0 commit comments

Comments
 (0)