提交裸机版工程
This commit is contained in:
parent
0e839fdba3
commit
b0e72aa6df
1099 changed files with 607159 additions and 0 deletions
18
软件/mouse_paw3395/MyCode/usr_spi.h
Normal file
18
软件/mouse_paw3395/MyCode/usr_spi.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue