📄 spi.h
字号:
/*************************************************************************/
/* */
/* spi.h */
/* */
/* spi系统接口函数接口头文件 */
/* */
/*************************************************************************/
#ifndef __SPI_h__
#define __SPI_h__
/*
****************************************************************************
* BASE OPERATION
****************************************************************************
*/
#define RBR0 0
#define THR0 0
#define IER0 1
#define IIR0 2
#define FCR0 2
#define LCR0 3
#define MCR0 4
#define LSR0 5
#define MSR0 6
#define SCR0 7
#define DLL0 0
#define DLM0 1
#define RBR1 8
#define THR1 8
#define IER1 9
#define IIR1 10
#define FCR1 10
#define LCR1 11
#define MCR1 12
#define LSR1 13
#define MSR1 14
#define SCR1 15
#define DLL1 8
#define DLM1 9
#define UARTCS (1 << 25) //P1.25为CH432T片选管脚
#define SAVECS (1 << 29) //P0.29为AT45DB021片选管脚
#define AT45_RESET (1 << 28) //P0.28为AT45DB021复位管脚
#define CHECK_OUTPUT (1 << 22) //P0.22为底板方波输出管脚
#define CHECK_OUTPUT1 (1 << 25) //P0.25为底板方波输出管脚
uint8 SPI0Init(uint8 Fdiv);
uint8 SPI1Init(uint8 Fdiv);
void CH432T_SPI_Write(uint8 addr, uint8 data);
uint8 CH432T_SPI_Read(uint8 addr);
uint8 SPIRW(uint8 *Rt, uint8 Data);
/*************************************************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -