Skip to content

Commit

Permalink
Merge pull request #106 from chegewara/revert-103-master
Browse files Browse the repository at this point in the history
Revert "SdFat32 support"
  • Loading branch information
chegewara authored Aug 4, 2022
2 parents 567ffd7 + e98e66e commit 96e69ff
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 358 deletions.
86 changes: 0 additions & 86 deletions examples/device/msc/sdfat32/sdfat32.ino

This file was deleted.

6 changes: 2 additions & 4 deletions src/device/msc/flashdisk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FlashCallbacks : public MSCCallbacks {
public:
FlashCallbacks(FlashUSB* ram, wl_handle_t handle, int pdrv) { m_parent = ram; wl_handle_thandle = handle; s_pdrv = pdrv; }
~FlashCallbacks() { }
void onInquiry(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
void onInquiry(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
{
if (m_parent->m_private)
{
Expand Down Expand Up @@ -128,8 +128,6 @@ class FlashCallbacks : public MSCCallbacks {
return bufsize;
}
}

void onFlush(uint8_t lun) {}
};

FlashUSB::FlashUSB(bool _aes)
Expand All @@ -151,7 +149,7 @@ bool FlashUSB::begin(char* str)

bool FlashUSB::init(char* path, char* label)
{
esp_vfs_fat_mount_config_t mount_config =
esp_vfs_fat_mount_config_t mount_config =
{
.format_if_mount_failed = true,
.max_files = 5,
Expand Down
12 changes: 0 additions & 12 deletions src/device/msc/mscusb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@ TU_ATTR_WEAK int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offs
return -1;
}

TU_ATTR_WEAK void tud_msc_write10_complete_cb(uint8_t lun)
{
for (size_t i = 0; i < 4; i++)
{
if(_MSCusb[i] && _MSCusb[i]->m_callbacks && _MSCusb[i]->m_lun == lun) {
return _MSCusb[i]->m_callbacks->onFlush(lun);
}
}

return;
}

TU_ATTR_WEAK int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize)
{

Expand Down
5 changes: 2 additions & 3 deletions src/device/msc/ramdisk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RAMCallbacks : public MSCCallbacks {
public:
RAMCallbacks(USBramdisk* ram) { m_parent = ram; }
~RAMCallbacks() { }
void onInquiry(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
void onInquiry(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
{
if (m_parent->m_private)
{
Expand Down Expand Up @@ -88,7 +88,6 @@ class RAMCallbacks : public MSCCallbacks {

return bufsize;
}
void onFlush(uint8_t lun) {}
};

USBramdisk::USBramdisk( )
Expand All @@ -115,7 +114,7 @@ bool USBramdisk::begin(char* str)
setContent(&ram_disk_demo[0][0], sizeof(ram_disk_demo));
log_e("init ram disk size: %d", sizeof(ram_disk)/sizeof(*ram_disk));
ram_disk[20] = (uint8_t)(block_count >> 8);
ram_disk[19] = (uint8_t)(block_count & 0xff);
ram_disk[19] = (uint8_t)(block_count & 0xff);
}
return MSCusb::begin(str);
}
Expand Down
5 changes: 2 additions & 3 deletions src/device/msc/sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SDCallbacks : public MSCCallbacks {
public:
SDCallbacks(SDCard2USB* ram) { m_parent = ram; }
~SDCallbacks() { }
void onInquiry(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
void onInquiry(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
{
if (m_parent->m_private)
{
Expand Down Expand Up @@ -76,7 +76,6 @@ class SDCallbacks : public MSCCallbacks {

return bufsize;
}
void onFlush(uint8_t lun) {}
};

SDCard2USB::SDCard2USB( )
Expand Down Expand Up @@ -112,7 +111,7 @@ bool SDCard2USB::initSD(int8_t sck, int8_t miso, int8_t mosi, int8_t ss)
Serial.println("Card Mount Failed");
return false;
}

uint8_t cardType = SD.cardType();

if(cardType == CARD_NONE){
Expand Down
116 changes: 0 additions & 116 deletions src/device/msc/sdfatusb.cpp

This file was deleted.

Loading

0 comments on commit 96e69ff

Please sign in to comment.