You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
405 B
16 lines
405 B
#include "zspi.hpp"
|
|
|
|
using namespace iflytop;
|
|
#ifdef HAL_SPI_MODULE_ENABLED
|
|
|
|
void ZSPI::init(SPI_HandleTypeDef *hspi) {
|
|
m_hspi = hspi;
|
|
m_mutex.init();
|
|
}
|
|
|
|
HAL_StatusTypeDef ZSPI::transmitReceive(uint8_t *pTxData, uint8_t *pRxData, uint16_t Size) {
|
|
HAL_StatusTypeDef status = HAL_OK;
|
|
status = HAL_SPI_TransmitReceive(m_hspi, pTxData, pRxData, Size, 1000);
|
|
return status;
|
|
}
|
|
#endif
|