converted files to cpp
This commit is contained in:
@ -37,14 +37,14 @@ void SpiComIF::configureCacheMaintenanceOnTxBuffer(bool enable) {
|
||||
}
|
||||
|
||||
void SpiComIF::addDmaHandles(DMA_HandleTypeDef *txHandle, DMA_HandleTypeDef *rxHandle) {
|
||||
set_dma_handles(txHandle, rxHandle);
|
||||
spi::setDmaHandles(txHandle, rxHandle);
|
||||
}
|
||||
|
||||
ReturnValue_t SpiComIF::initialize() {
|
||||
if(transferMode == spi::TransferModes::DMA) {
|
||||
DMA_HandleTypeDef *txHandle = nullptr;
|
||||
DMA_HandleTypeDef *rxHandle = nullptr;
|
||||
get_dma_handles(&txHandle, &rxHandle);
|
||||
spi::getDmaHandles(&txHandle, &rxHandle);
|
||||
if(txHandle == nullptr or rxHandle == nullptr) {
|
||||
sif::printError("SpiComIF::initialize: DMA handles not set!\n");
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
@ -197,6 +197,10 @@ ReturnValue_t SpiComIF::handlePollingSendOperation(uint8_t* recvPtr, SpiCookie *
|
||||
|
||||
ReturnValue_t SpiComIF::handleInterruptSendOperation(uint8_t* recvPtr, SpiCookie* spiCookie,
|
||||
const uint8_t * sendData, size_t sendLen) {
|
||||
auto gpioPort = spiCookie->getChipSelectGpioPort();
|
||||
auto gpioPin = spiCookie->getChipSelectGpioPin();
|
||||
spiMutex->lockMutex(timeoutType, timeoutMs);
|
||||
HAL_GPIO_WritePin(gpioPort, gpioPin, GPIO_PIN_RESET);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user