ZuluSCSI_disk.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * SCSI2SD V6 - Copyright (C) 2013 Michael McMaster <michael@codesrc.com>
  3. * Copyright (C) 2014 Doug Brown <doug@downtowndougbrown.com
  4. * ZuluSCSI™ - Copyright (c) 2022 Rabbit Hole Computing™
  5. *
  6. * It is derived from disk.h in SCSI2SD V6.
  7. *
  8. * This file is licensed under the GPL version 3 or any later version. 
  9. *
  10. * https://www.gnu.org/licenses/gpl-3.0.html
  11. * ----
  12. * This program is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation, either version 3 of the License, or
  15. * (at your option) any later version. 
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. * GNU General Public License for more details. 
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  24. **/
  25. // SCSI disk access routines
  26. // Implements both SCSI2SD V6 disk.h functions and some extra.
  27. #pragma once
  28. #include <stdint.h>
  29. #include <scsi2sd.h>
  30. #include <scsiPhy.h>
  31. extern "C" {
  32. #include <disk.h>
  33. #include <config.h>
  34. #include <scsi.h>
  35. }
  36. void scsiDiskResetImages();
  37. bool scsiDiskOpenHDDImage(int target_idx, const char *filename, int scsi_id, int scsi_lun, int blocksize, S2S_CFG_TYPE type = S2S_CFG_FIXED);
  38. void scsiDiskLoadConfig(int target_idx);
  39. // Clear the ROM drive header from flash
  40. bool scsiDiskClearRomDrive();
  41. // Program ROM drive and rename image file
  42. bool scsiDiskProgramRomDrive(const char *filename, int scsi_id, int blocksize, S2S_CFG_TYPE type);
  43. // Check if there is ROM drive configured in microcontroller flash
  44. bool scsiDiskCheckRomDrive();
  45. bool scsiDiskActivateRomDrive();
  46. // Returns true if there is at least one image active
  47. bool scsiDiskCheckAnyImagesConfigured();