Module mobile_api

Module mobile_api 

Source
Expand description

Mobile API module providing serial port functionality for mobile platforms

This module contains the mobile-specific implementation of serial port operations. It provides a unified interface for managing serial ports on Android devices.

§Examples

use tauri_plugin_serialplugin::mobile_api::SerialPort;
use tauri_plugin_serialplugin::state::{DataBits, FlowControl, Parity, StopBits};
use tauri::AppHandle;
use std::time::Duration;
 
// Note: In a real Tauri app, you would get the AppHandle from the command context
// let serial = SerialPort::new(app_handle);
// serial.open("/dev/ttyUSB0".to_string(), 9600, Some(DataBits::Eight), 
//             Some(FlowControl::None), Some(Parity::None), 
//             Some(StopBits::One), Some(1000))
//             .expect("Failed to open port");

Structs§

SerialPort
Access to the serial port APIs for mobile platforms.