Skip to content

Commit

Permalink
Merge pull request #40 from jepler/build-floppsy-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler authored Nov 28, 2024
2 parents 4d6c233 + 13f1081 commit f898470
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arduino-platform: ["feather_m4_express_tinyusb", "feather_rp2040_tinyusb"]
arduino-platform: ["feather_m4_express_tinyusb", "feather_rp2040_tinyusb", "floppsy_rp2040_tinyusb"]
runs-on: ubuntu-latest

steps:
Expand Down
Empty file.
36 changes: 19 additions & 17 deletions examples/apple2_test/apple2_test.ino
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
#include <Adafruit_Floppy.h>

#if defined(ADAFRUIT_FEATHER_M4_EXPRESS)
#define ENABLE_PIN (6)
#define PHASE1_PIN (A2)
#define PHASE2_PIN (13)
#define PHASE3_PIN (12)
#define PHASE4_PIN (11)
#define RDDATA_PIN (5)
#define INDEX_PIN (A3)
#define APPLE2_ENABLE_PIN (6)
#define APPLE2_PHASE1_PIN (A2)
#define APPLE2_PHASE2_PIN (13)
#define APPLE2_PHASE3_PIN (12)
#define APPLE2_PHASE4_PIN (11)
#define APPLE2_RDDATA_PIN (5)
#define APPLE2_INDEX_PIN (A3)
#define APPLE2_PROTECT_PIN (21) // "SDA"
#elif defined (ARDUINO_ADAFRUIT_FEATHER_RP2040)
#define ENABLE_PIN (8) // D6
#define PHASE1_PIN (A2)
#define PHASE2_PIN (13)
#define PHASE3_PIN (12)
#define PHASE4_PIN (11)
#define RDDATA_PIN (7) // D5
#define INDEX_PIN (A3)
#define APPLE2_ENABLE_PIN (8) // D6
#define APPLE2_PHASE1_PIN (A2)
#define APPLE2_PHASE2_PIN (13)
#define APPLE2_PHASE3_PIN (12)
#define APPLE2_PHASE4_PIN (11)
#define APPLE2_RDDATA_PIN (7) // D5
#define APPLE2_INDEX_PIN (A3)
#define APPLE2_PROTECT_PIN (2) // "SDA"
#elif defined(ARDUINO_ADAFRUIT_FLOPPSY_RP2040)
// Yay built in pin definitions!
#else
#error "Please set up pin definitions!"
#endif

Adafruit_Apple2Floppy floppy(INDEX_PIN, ENABLE_PIN,
PHASE1_PIN, PHASE2_PIN, PHASE3_PIN, PHASE4_PIN,
-1, -1, APPLE2_PROTECT_PIN, RDDATA_PIN);
Adafruit_Apple2Floppy floppy(APPLE2_INDEX_PIN, APPLE2_ENABLE_PIN,
APPLE2_PHASE1_PIN, APPLE2_PHASE2_PIN, APPLE2_PHASE3_PIN, APPLE2_PHASE4_PIN,
-1, -1, APPLE2_PROTECT_PIN, APPLE2_RDDATA_PIN);

// WARNING! there are 150K max flux pulses per track!
uint8_t flux_transitions[MAX_FLUX_PULSE_PER_TRACK];
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ paragraph=Adafruit's floppy disk drive interfacing library
category=Communication
url=https://github.com/adafruit/Adafruit_Floppy
architectures=*
depends=Adafruit BusIO, SdFat - Adafruit Fork
depends=Adafruit BusIO, SdFat - Adafruit Fork, Adafruit ST7735 and ST7789 Library

0 comments on commit f898470

Please sign in to comment.