Expand description
§Thread Controller
The thread controller is the main interface for managing device threads. It provides methods for discovering devices, starting threads, and performing device operations.
§Usage Example
ⓘ
use pokeys_thread::{ThreadControllerBuilder, ThreadController, DeviceOperations};
// Create a thread controller
let mut controller = ThreadControllerBuilder::new()
.default_refresh_interval(100)
.build();
// Discover USB devices
let devices = controller.discover_usb_devices().unwrap();
if !devices.is_empty() {
// Start a thread for the first device
let thread_id = controller.start_usb_device_thread(devices[0]).unwrap();
// Perform device operations
controller.set_digital_output(thread_id, 1, true).unwrap();
}Structs§
- Thread
Controller Impl - Thread controller implementation.
Traits§
- Thread
Controller - Thread controller for managing device threads.