bspspi.h

来自「这是单板上DPRAM的驱动程序」· C头文件 代码 · 共 24 行

H
24
字号
#ifndef _SPI_H
#define _SPI_H

#define SDB_BSPSPI    50000

typedef struct{
    char *UncachedBuffer; 
    int ch;        /* SPI_RFIU1 ,SPI_RFIU2 */
    int MaxRecvBD; /* 1 */
    int MaxSendBD; /* 5 */
    int MaxBufLen; /* 8 */
    int BaudRate;  /* 40000 */
	int UcodeAdress; /* ucode adress  offset from Dpram*/
	int UseUcode; /*1->use ucode,0->no use*/
	}SpiCfgStruct;

void SpiInit(void *pDatabuf, SpiCfgStruct *pCfg);
int SpiRead(void *pDataBuf,void *pBuf, int MaxLen);
int SpiWrite(void *pDataBuf,void *pBuf, int MaxLen);         
int SpiCntrl(void *pDataBuf, int cmd, void *pParam, int maxlen);
char *SpiBspInit(int DEV, char *FreeMemPtr, SpiCfgStruct *cfg);

#endif /* _SPI_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?