Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Version 1.19RC2
Browse files Browse the repository at this point in the history
Support builds with no SPI SD cards
  • Loading branch information
dc42 committed Aug 4, 2017
1 parent 071a196 commit bb80505
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion asf/conf_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
# define USB_DEVICE_MANUFACTURE_NAME "Duet3D"
# define USB_DEVICE_PRODUCT_NAME "Duet"
#endif
// #define USB_DEVICE_SERIAL_NAME "12...EF"

/**
* USB Device Callbacks definitions (Optional)
Expand Down
4 changes: 3 additions & 1 deletion libraries/Storage/sd_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ static bool sd_mmc_mci_install_mmc(void)

void sd_mmc_init(const Pin cdPins[], const Pin wpPins[], const Pin spiCsPins[])
{
for (uint8_t slot = 0; slot < SD_MMC_MEM_CNT; slot++)
for (size_t slot = 0; slot < SD_MMC_MEM_CNT; slot++)
{
struct sd_mmc_card *card = &sd_mmc_cards[slot];
card->state = SD_MMC_CARD_STATE_NO_CARD;
Expand All @@ -1798,8 +1798,10 @@ void sd_mmc_init(const Pin cdPins[], const Pin wpPins[], const Pin spiCsPins[])
else
#endif
{
#if (SD_MMC_SPI_MEM_CNT != 0)
card->iface = &spiInterface;
card->slot = slot - SD_MMC_HSMCI_MEM_CNT;
#endif
}
}
sd_mmc_slot_sel = 0xFF; // No slot selected
Expand Down

0 comments on commit bb80505

Please sign in to comment.