Adafruit Library
Public Member Functions | Public Attributes | List of all members
Adafruit_Floppsy Class Reference

Board setup for RP2350 Floppsy in drive-controller mode. More...

#include <Adafruit_Floppsy.h>

Public Member Functions

 Adafruit_Floppsy ()
 Construct the two drive interfaces without touching hardware.
 
bool begin ()
 Initialize the drive pins, level shifters, BOOT button, and power monitor. More...
 
bool enable (bool enabled)
 Connect the drive interface, or stop both drives and isolate the cable. More...
 
void end ()
 Stop both drives, isolate the cable, and release the drive GPIO pins.
 
 Adafruit_Floppsy (const Adafruit_Floppsy &)=delete
 Board hardware ownership cannot be copied.
 
Adafruit_Floppsy & operator= (const Adafruit_Floppsy &)=delete
 Board hardware ownership cannot be assigned. More...
 

Public Attributes

Adafruit_Floppy drive0
 Drive interface using the DS0 output.
 
Adafruit_Floppy drive1
 Drive interface using the DS1 output.
 
Adafruit_INA3221 powerMonitor
 Three supply monitors, with 50 milliohm shunts.
 

Detailed Description

Board setup for RP2350 Floppsy in drive-controller mode.

Own one instance per board. The two drive interfaces share the cable and motor signal; select only one drive at a time. Call begin(), check the supply voltages required by your drive, then enable(true) before drive operations. Display, touch, SD, USB host, and drive-emulation setup are separate.

Member Function Documentation

◆ begin()

bool Adafruit_Floppsy::begin ( )

Initialize the drive pins, level shifters, BOOT button, and power monitor.

Returns
True when both drive interfaces and the power monitor are initialized.
Note
The cable remains isolated on both success and failure. No drive is selected, no motor starts, and write gate remains inactive. Repeat calls stop any active drive and restore the default drive timings.

◆ enable()

bool Adafruit_Floppsy::enable ( bool  enabled)

Connect the drive interface, or stop both drives and isolate the cable.

Parameters
enabledTrue to connect the controller signals; false to stop/isolate.
Returns
False if enabling before a successful begin(); true otherwise.
Note
This controls signal buffers, not drive power. The caller must check the rails required by its drive. Enabling does not require 12 V universally. Use only between synchronous drive operations, not during capture or writing.

◆ operator=()

Adafruit_Floppsy& Adafruit_Floppsy::operator= ( const Adafruit_Floppsy &  )
delete

Board hardware ownership cannot be assigned.

Returns
Unavailable because copy assignment is deleted.

The documentation for this class was generated from the following files: