SPI

1
2
3
4
5
6
7
8
9
10
HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size,uint32_t Timeout)

* @param hspi pointer to a SPI_HandleTypeDef structure that contains
* the configuration information for SPI module.
* @param pTxData pointer to transmission data buffer
* @param pRxData pointer to reception data buffer
* @param Size amount of data to be sent and received
* @param Timeout Timeout duration
* @retval HAL status

例子:
HAL_SPI_TransmitReceive(&hspi2,&TxData,&Rxdata,1,1000)
SPI2   发送地址 接收地址  数量(单位byte)  溢出时间