mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
Added support for 1-line bus width SDMMC device mode (#482)
This commit is contained in:
parent
4fe4faf422
commit
ecc0a9c076
@ -31,7 +31,8 @@ public:
|
||||
gpio_num_t pinD1,
|
||||
gpio_num_t pinD2,
|
||||
gpio_num_t pinD3,
|
||||
MountBehaviour mountBehaviourAtBoot
|
||||
MountBehaviour mountBehaviourAtBoot,
|
||||
uint8_t busWidth = 4
|
||||
) :
|
||||
pinClock(pinClock),
|
||||
pinCmd(pinCmd),
|
||||
@ -39,7 +40,8 @@ public:
|
||||
pinD1(pinD1),
|
||||
pinD2(pinD2),
|
||||
pinD3(pinD3),
|
||||
mountBehaviourAtBoot(mountBehaviourAtBoot)
|
||||
mountBehaviourAtBoot(mountBehaviourAtBoot),
|
||||
busWidth(busWidth)
|
||||
{}
|
||||
|
||||
int spiFrequencyKhz;
|
||||
@ -50,6 +52,7 @@ public:
|
||||
gpio_num_t pinD2;
|
||||
gpio_num_t pinD3;
|
||||
MountBehaviour mountBehaviourAtBoot;
|
||||
uint8_t busWidth;
|
||||
bool formatOnMountFailed = false;
|
||||
uint16_t maxOpenFiles = 4;
|
||||
uint16_t allocUnitSize = 16 * 1024;
|
||||
|
||||
@ -41,7 +41,7 @@ bool SdmmcDevice::mountInternal(const std::string& newMountPath) {
|
||||
.d7 = static_cast<gpio_num_t>(0),
|
||||
.cd = GPIO_NUM_NC,
|
||||
.wp = GPIO_NUM_NC,
|
||||
.width = 4,
|
||||
.width = config->busWidth,
|
||||
.flags = 0
|
||||
};
|
||||
|
||||
@ -120,4 +120,4 @@ SdmmcDevice::State SdmmcDevice::getState(TickType_t timeout) const {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user