Advertisement
Guest User

Untitled

a guest
May 11th, 2024
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.83 KB | None | 0 0
  1. diff --git a/apps/main.c b/apps/main.c
  2. index cf7d302fc9..513a6eec7c 100644
  3. --- a/apps/main.c
  4. +++ b/apps/main.c
  5. @@ -509,6 +509,7 @@ static void init(void)
  6.  #elif CONFIG_USBOTG == USBOTG_M5636
  7.      m5636_init();
  8.  #endif
  9. +    usb_start_monitoring();
  10.  
  11.      backlight_init();
  12.  
  13. @@ -611,7 +612,9 @@ static void init(void)
  14.  
  15.              while(button_get(true) != SYS_USB_CONNECTED) {};
  16.              gui_usb_screen_run(true);
  17. +#if !(CONFIG_STORAGE & STORAGE_RAMDISK)
  18.              system_reboot();
  19. +#endif
  20.          }
  21.      }
  22.  
  23. diff --git a/firmware/export/config/ipod6g.h b/firmware/export/config/ipod6g.h
  24. index 50aa5d8e8c..4c3fd65402 100644
  25. --- a/firmware/export/config/ipod6g.h
  26. +++ b/firmware/export/config/ipod6g.h
  27. @@ -10,9 +10,9 @@
  28.  #define MODEL_NAME   "Apple iPod Classic/6G"
  29.  
  30.  /* define this if you use an ATA controller */
  31. -#define CONFIG_STORAGE STORAGE_ATA
  32. +#define CONFIG_STORAGE STORAGE_RAMDISK
  33.  
  34.  #define HAVE_ATA_DMA
  35.  #define ATA_MAX_UDMA 4
  36.  #define ATA_MAX_MWDMA 2
  37.  
  38. diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
  39. index 81d90d01db..b2077803d5 100644
  40. --- a/firmware/usbstack/usb_storage.c
  41. +++ b/firmware/usbstack/usb_storage.c
  42. @@ -793,6 +793,7 @@ static void handle_scsi(struct command_block_wrapper* cbw)
  43.      switch (cbw->command_block[0]) {
  44.          case SCSI_TEST_UNIT_READY:
  45.              logf("scsi test_unit_ready %d",lun);
  46. +#if !(CONFIG_STORAGE & STORAGE_RAMDISK)
  47.              if(!usb_exclusive_storage()) {
  48.                  send_csw(UMS_STATUS_FAIL);
  49.                  cur_sense_data.sense_key=SENSE_NOT_READY;
  50. @@ -800,6 +801,7 @@ static void handle_scsi(struct command_block_wrapper* cbw)
  51.                  cur_sense_data.ascq=0;
  52.                  break;
  53.              }
  54. +#endif
  55.              if(lun_present) {
  56.                  send_csw(UMS_STATUS_GOOD);
  57.              }
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement