-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
According to the SPI lib reference the usage of SPI.beginTransaction()
and SPI.endTransaction()
allows to restrict SPI access to a specific device. It seems like the SD lib uses SPI.endTransaction()
after init and as part of erase methods only.
Sd2Card::init
:Line 296 in 85dbcca
SDCARD_SPI.endTransaction(); Sd2Card::chipSelectHigh
:Line 182 in 85dbcca
SDCARD_SPI.endTransaction(); uint8_t Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock)
:Line 229 in 85dbcca
chipSelectHigh();
Freeing the SPI resource after usage for classes Sd2Card
and SdVolume
is missing as well. Would it make sense to check if the SD lib frees the SPI resource after usage (e.g. writing, reading, etc.) properly?
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project