借鉴原子的程序进行FATFS移植,出现了一个错误实在是找不到原因所在,还肯定大家帮帮忙,不胜感激。。
/* Write Sector(s) */
#if _READONLY == 0
DRESULT disk_write (
BYTE drv, /* Physical drive nmuber (0..) */
const BYTE *buff, /* Data to be written */
DWORD sector, /* Sector address (LBA) */
BYTE count /* Number of sectors to write (1..255) */
)
{
u8 res;
res = SD_WriteDisk(buff, sector, count);
// 返回值转换
if(res == 0)
{
return RES_OK;
}
else
{
return RES_ERROR;
}
}
#endif /* _READONLY */
..\FAT\src\diskio.c(86): error: #167: argument of type "const BYTE *" is incompatible with parameter of type "u8 *"
程序编译报错,还没找到是什么原因引起的 |