ZuluSCSI_config.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Compile-time configuration parameters.
  2. // Other settings can be set by ini file at runtime.
  3. #pragma once
  4. // Use variables for version number
  5. #define FW_VER_NUM "1.0.6"
  6. #define FW_VER_SUFFIX "rc2"
  7. #define ZULU_FW_VERSION FW_VER_NUM "-" FW_VER_SUFFIX
  8. // Configuration and log file paths
  9. #define CONFIGFILE "zuluscsi.ini"
  10. #define LOGFILE "zululog.txt"
  11. #define CRASHFILE "zuluerr.txt"
  12. // Log buffer size in bytes, must be a power of 2
  13. #ifndef LOGBUFSIZE
  14. #define LOGBUFSIZE 16384
  15. #endif
  16. #define LOG_SAVE_INTERVAL_MS 1000
  17. // Watchdog timeout
  18. // Watchdog will first issue a bus reset and if that does not help, crashdump.
  19. #define WATCHDOG_BUS_RESET_TIMEOUT 15000
  20. #define WATCHDOG_CRASH_TIMEOUT 30000
  21. // HDD image file format
  22. #define HDIMG_ID_POS 2 // Position to embed ID number
  23. #define HDIMG_LUN_POS 3 // Position to embed LUN numbers
  24. #define HDIMG_BLK_POS 5 // Position to embed block size numbers
  25. #define MAX_FILE_PATH 64 // Maximum file name length
  26. // SCSI config
  27. #define NUM_SCSIID 8 // Maximum number of supported SCSI-IDs (The minimum is 0)
  28. #define NUM_SCSILUN 1 // Maximum number of LUNs supported (Currently has to be 1)
  29. #define READ_PARITY_CHECK 0 // Perform read parity check (unverified)
  30. // SCSI raw fallback configuration when no image files are detected
  31. // Presents the whole SD card as an SCSI drive
  32. #define RAW_FALLBACK_ENABLE 1
  33. #define RAW_FALLBACK_SCSI_ID 1
  34. #define RAW_FALLBACK_BLOCKSIZE 512
  35. // Default SCSI drive information (can be overridden in INI file)
  36. // Selected based on device type (fixed, removable, optical, floppy, mag-optical, tape)
  37. // Each entry has {vendor, product, version, serial}
  38. // If serial number is left empty, SD card serial number is used.
  39. #define DRIVEINFO_FIXED {"ZULUSCSI", "HARDDRIVE", PLATFORM_REVISION, ""}
  40. #define DRIVEINFO_REMOVABLE {"ZULUSCSI", "REMOVABLE", PLATFORM_REVISION, ""}
  41. #define DRIVEINFO_OPTICAL {"ZULUSCSI", "CDROM", PLATFORM_REVISION, ""}
  42. #define DRIVEINFO_FLOPPY {"ZULUSCSI", "FLOPPY", PLATFORM_REVISION, ""}
  43. #define DRIVEINFO_MAGOPT {"ZULUSCSI", "MO_DRIVE", PLATFORM_REVISION, ""}
  44. #define DRIVEINFO_TAPE {"ZULUSCSI", "TAPE", PLATFORM_REVISION, ""}
  45. // Default delay for SCSI phases.
  46. // Can be adjusted in ini file
  47. #define DEFAULT_SCSI_DELAY_US 10
  48. #define DEFAULT_REQ_TYPE_SETUP_NS 500
  49. // Use prefetch buffer in read requests
  50. #ifndef PREFETCH_BUFFER_SIZE
  51. #define PREFETCH_BUFFER_SIZE 8192
  52. #endif