Crate greaseweazle

Crate greaseweazle 

Source
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.
BandwidthStats
Bandwidth statistics.
Delays
Delay/timing settings.
DriveInfo
Information about the current state of a drive.
EncodedFlux
A wrapper around a Greaseweazle flux stream, encoded in the format that the Greaseweazle sends or receives.
FirmwareInfo
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.
CommandError
Error that can occur when executing a Greaseweazle command.
FluxDecodeError
Error that can occur when decoding a Greaseweazle-encoded flux byte stream.
FluxDecodeValue
Value that results from decoding a Greaseweazle-encoded flux byte stream.
GreaseweazleError
An error code that can be returned by the Greaseweazle.
HwModel
Greaseweazle hardware model.
HwSubmodelAdafruitFloppy
Greaseweazle Adafruit Floppy submodel.
HwSubmodelF1
Greaseweazle F1 submodel.
HwSubmodelF7
Greaseweazle F7 submodel.
HwSubmodelV4
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.