RobotHardware-UESTC/Hardware/银星机器人底盘/PiRobot-YH_Firmware v1.1/STM32/BSPLIB/spi.h

21 lines
453 B
C
Raw Normal View History

2024-01-24 20:47:03 +08:00
#ifndef SPI_H
#define SPI_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stm32f10x.h"
//Initialize serial external interface of SPI, config SPI working on master mode
void PB_SPI_Init(uint8_t SPI_Channel , unsigned char GPIO_AF); //SPI interface initialization, input parameter SPI1 SPI2
uint8_t PB_SPI_ReadWriteByte(uint8_t SPI_Channel , uint8_t TxData); //SPI w/r data function
#ifdef __cplusplus
}
#endif
#endif // #ifndef SPI_H