#ifndef __W25Q32_H_
#define __W25Q32_H_
#include "main.h"
#define PAGESIZE 256//一页最多输入256字节
//SPI IO控制
#define SPI_SCL_1(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uSCL_Port, (_HANDLE_)->uSCL_Pin, 1))
#define SPI_SCL_0(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uSCL_Port, (_HANDLE_)->uSCL_Pin, 0))
#define SPI_MOSI_1(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uMOSI_Port, (_HANDLE_)->uMOSI_Pin, 1))
#define SPI_MOSI_0(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uMOSI_Port, (_HANDLE_)->uMOSI_Pin, 0))
#define SPI_MISO_1(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uMISO_Port, (_HANDLE_)->uMISO_Pin, 1))
#define SPI_MISO_0(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uMISO_Port, (_HANDLE_)->uMISO_Pin, 0))
#define SPI_CS_1(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uCS_Port, (_HANDLE_)->uCS_Pin, 1))
#define SPI_CS_0(_HANDLE_) ( GPIO_WritePin((_HANDLE_)->uCS_Port, (_HANDLE_)->uCS_Pin, 0))
#define SPI_MISO_R(_HANDLE_) ( GPIO_ReadPin((_HANDLE_)->uMISO_Port, (_HANDLE_)->uMISO_Pin))
extern void vW25Q32_Init(SPI_ObjectTypedef * hSPIx,
uint8_t uSCL_Port,
uint8_t uSCL_Pin ,
uint8_t uMOSI_Port,
uint8_t uMOSI_Pin ,
uint8_t uMISO_Port,
uint8_t uMISO_Pin ,
uint8_t uCS_Port,
uint8_t uCS_Pin);
//获取Flash ID
extern uint32_t W25Q32_Read_ID(SPI_ObjectTypedef * hSPIx);
//写使能(启动)
extern void W25Q32_Write_Enable(SPI_ObjectTypedef * hSPIx);
//等待保护(等待擦除或写入操作,直到操作完成结束)
extern void W25Q32_Wait_End(SPI_ObjectTypedef * hSPIx);
//读操作,*buf为内容,addr为地址,pagesize为要读出的字节数
extern void W25Q32_Read_Page(SPI_ObjectTypedef * hSPIx, uint8_t *buf,uint32_t addr,uint8_t pagesize);
//芯片擦除,非易失存储器,写数据前应该擦除操作
extern void W25Q32_Delete(SPI_ObjectTypedef * hSPIx);
//页写操作,*buf为内容,addr为地址,pagesize为写入字节数必须小于256个
extern void W25Q32_Write_Page(SPI_ObjectTypedef * hSPIx,uint8_t *buf, uint32_t addr,uint8_t pagesize);
#endif
Core\W25Q32.h(25): error C141: syntax error near '*', expected ')'
Core\W25Q32.h(39): error C141: syntax error near '*', expected ')'
Core\W25Q32.h(41): error C141: syntax error near '*', expected ')'
Core\W25Q32.h(43): error C141: syntax error near '*', expected ')'
Core\W25Q32.h(45): error C141: syntax error near '*', expected ')'
Core\W25Q32.h(47): error C141: syntax error near '*', expected ')'
Core\W25Q32.h(49): error C141: syntax error near '*', expected ')'
想问一下,为什么每个声明语句都有报错
|