sensor_2026/HARDWARE/SPI/spi.h

17 lines
497 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef __SPI_H
#define __SPI_H
#include "sys.h"
//////////////////////////////////////////////////////////////////////////////////
//SPI 驱动代码
//STM32F4工程模板-库函数版本
//淘宝店铺http://mcudev.taobao.com
//////////////////////////////////////////////////////////////////////////////////
void SPI1_Init(void); //初始化SPI1口
void SPI1_SetSpeed(u8 SpeedSet); //设置SPI1速度
u8 SPI1_ReadWriteByte(u8 TxData);//SPI1总线读写一个字节
#endif