1
0
Fork 0

提交裸机版工程

This commit is contained in:
ldz 2024-09-06 17:10:09 +08:00
parent 0e839fdba3
commit b0e72aa6df
1099 changed files with 607159 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#ifndef _SPI_H_
#define _SPI_H_
#include "stdint.h"
#include "gpio.h"
#define CS_High HAL_GPIO_WritePin(CS_GPIO_Port, CS_Pin, GPIO_PIN_SET)
#define CS_Low HAL_GPIO_WritePin(CS_GPIO_Port, CS_Pin, GPIO_PIN_RESET)
#define SPI_I2S_FLAG_RXNE ((uint16_t)0x0001)
#define SPI_I2S_FLAG_TXE ((uint16_t)0x0002)
/**********************************************************************************************************/
void SPI1_Init(void);
uint8_t SPI_SendReceive(uint8_t data);
uint8_t read_register(uint8_t adress);
void writr_register(uint8_t adress,uint8_t vlue);
#endif