prevent MMC preemption by TS thread (#1949)

* prevent preemption by TS thread

* didn't need that
This commit is contained in:
Matthew Kennedy 2020-11-15 17:44:36 -08:00 committed by GitHub
parent 775bba6b09
commit 5a443501fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -435,6 +435,11 @@ static THD_FUNCTION(MMCmonThread, arg) {
chRegSetThreadName("MMC_Monitor");
while (true) {
// if the SPI device got un-picked somehow, cancel SD card
if (CONFIG(sdCardSpiDevice) == SPI_NONE) {
return;
}
if (CONFIG(debugMode) == DBG_SD_CARD) {
tsOutputChannels.debugIntField1 = totalLoggedBytes;
tsOutputChannels.debugIntField2 = totalWritesCounter;
@ -491,7 +496,7 @@ void initMmcCard(void) {
mmcObjectInit(&MMCD1); // Initializes an instance.
mmcStart(&MMCD1, &mmccfg);
chThdCreateStatic(mmcThreadStack, sizeof(mmcThreadStack), LOWPRIO, (tfunc_t)(void*) MMCmonThread, NULL);
chThdCreateStatic(mmcThreadStack, sizeof(mmcThreadStack), NORMALPRIO, (tfunc_t)(void*) MMCmonThread, NULL);
addConsoleAction("mountsd", MMCmount);
addConsoleAction("umountsd", mmcUnMount);