removed delete functions

This commit is contained in:
Robin Müller 2021-10-27 18:38:16 +02:00
parent b6746984d9
commit 02468a838f
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 1 additions and 10 deletions

View File

@ -151,8 +151,6 @@ ReturnValue_t SpiComIF::initializeInterface(CookieIF *cookie) {
sif::printWarning("SpiComIF::initialize: Error initializing SPI\n"); sif::printWarning("SpiComIF::initialize: Error initializing SPI\n");
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
// The MSP configuration struct is not required anymore
spiCookie->deleteMspCfg();
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

View File

@ -59,12 +59,6 @@ spi::MspCfgBase* SpiCookie::getMspCfg() {
return mspCfg; return mspCfg;
} }
void SpiCookie::deleteMspCfg() {
if(mspCfg != nullptr) {
delete mspCfg;
}
}
spi::TransferModes SpiCookie::getTransferMode() const { spi::TransferModes SpiCookie::getTransferMode() const {
return transferMode; return transferMode;
} }

View File

@ -69,7 +69,6 @@ private:
// Only the SpiComIF is allowed to use this to prevent dangling pointers issues // Only the SpiComIF is allowed to use this to prevent dangling pointers issues
spi::MspCfgBase* getMspCfg(); spi::MspCfgBase* getMspCfg();
void deleteMspCfg();
void setTransferState(spi::TransferStates transferState); void setTransferState(spi::TransferStates transferState);
spi::TransferStates getTransferState() const; spi::TransferStates getTransferState() const;

View File

@ -22,7 +22,7 @@ using mspCb = void (*) (void);
namespace spi { namespace spi {
struct MspCfgBase { struct MspCfgBase {
MspCfgBase(); MspCfgBase() {};
MspCfgBase(stm32h7::GpioCfg sck, stm32h7::GpioCfg mosi, stm32h7::GpioCfg miso, MspCfgBase(stm32h7::GpioCfg sck, stm32h7::GpioCfg mosi, stm32h7::GpioCfg miso,
mspCb cleanupCb = nullptr, mspCb setupCb = nullptr): mspCb cleanupCb = nullptr, mspCb setupCb = nullptr):
sck(sck), mosi(mosi), miso(miso), cleanupCb(cleanupCb), sck(sck), mosi(mosi), miso(miso), cleanupCb(cleanupCb),