Expand description
A Rust library for controlling a Greaseweazle from the host system.
A Greaseweazle is a device that provides direct control and raw flux-level access to a floppy drive; see https://github.com/keirf/greaseweazle/ for more information. This project is not maintained by Keir Fraser and is not affiliated with the official Greaseweazle project in any way.
§Usage
The Greaseweazle object represents a connection to the Greaseweazle. When you create it,
it will establish a serial connection to the device. You can then call its methods to send
commands.
§Example
use greaseweazle::Greaseweazle;
let port_infos = greaseweazle::enumerate()?;
let mut gw = Greaseweazle::new(&port_infos[0].port_name).unwrap();
let info = gw.get_firmware_info().unwrap();
println!("{info:?}");
Ok::<(), greaseweazle::CommandError>(())Structs§
- Bandwidth
- Bandwidth value.
- Bandwidth
Stats - Bandwidth statistics.
- Delays
- Delay/timing settings.
- Drive
Info - Information about the current state of a drive.
- Encoded
Flux - A wrapper around a Greaseweazle flux stream, encoded in the format that the Greaseweazle sends or receives.
- Firmware
Info - Information about the hardware and firmware of the Greaseweazle device.
- Greaseweazle
- The connection to the Greaseweazle device.
- Ticks
- A time duration expressed in Greaseweazle sample ticks.
Enums§
- BusType
- The floppy bus type to be used.
- Command
Error - Error that can occur when executing a Greaseweazle command.
- Flux
Decode Error - Error that can occur when decoding a Greaseweazle-encoded flux byte stream.
- Flux
Decode Value - Value that results from decoding a Greaseweazle-encoded flux byte stream.
- Greaseweazle
Error - An error code that can be returned by the Greaseweazle.
- HwModel
- Greaseweazle hardware model.
- HwSubmodel
Adafruit Floppy - Greaseweazle Adafruit Floppy submodel.
- HwSubmodel
F1 - Greaseweazle F1 submodel.
- HwSubmodel
F7 - Greaseweazle F7 submodel.
- HwSubmodel
V4 - Greaseweazle V4 submodel.
- McuId
- Microcontroller type.
- Pin
- A pin on the floppy interface of the Greaseweazle.
- PinLevel
- Possible levels for a pin.
- UsbSpeed
- USB speed.
Functions§
- enumerate
- Returns a list of all Greaseweazle devices that can be found on the system.