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.
25 lines
430 B
25 lines
430 B
#pragma once
|
|
|
|
#include "mutex.hpp"
|
|
#include "zbasic.h"
|
|
|
|
|
|
namespace iflytop {
|
|
#ifdef HAL_SPI_MODULE_ENABLED
|
|
class ZSPI {
|
|
private:
|
|
SPI_HandleTypeDef *m_hspi = NULL;
|
|
zmutex m_mutex= {"ZSPI"};
|
|
|
|
public:
|
|
ZSPI(){};
|
|
|
|
void init(SPI_HandleTypeDef *hspi);
|
|
|
|
zmutex &mutex() { return m_mutex; }
|
|
|
|
HAL_StatusTypeDef transmitReceive(uint8_t *pTxData, uint8_t *pRxData, uint16_t Size);
|
|
};
|
|
#endif
|
|
|
|
} // namespace iflytop
|