OOOOPS,我刚刚发现我发布了一个程序,它也可以工作。这就是我如何将缓冲区从搜索结果填充到缓冲区。如果是SyTeX,我认为它可能会有帮助。//我尝试在生成相同错误的系统提供的结果缓冲区中定义uu88t。我还尝试将搜索结果缓冲区更改为字符,以避免任何类型的CAST问题。结果缓冲区填充(内置警告)在Syth.TyPulfStrut{chAR/*或uTn8*t*/StaseFieleNoNe[短文件FielnMaEnEithLime]中…配置文件;外部配置调用(Max);如果(FieloOxOnEngt(&;MyField,调用[0).StaskFieleNeNeX,FieloOx OpenSRead)!=文件UIT1616T与搜索返回UIT88T/CHAR有冲突。这看起来像是芯片上的一个问题?//.pdf int FieloOxOPEN(FieloObObjultFielpTR,const UINT1616T*PATNEXT,UIN1616T模式);//C实现…int FieloOxOPEN(FieloObObjultFielpTR,const char *文件名,UIN1616T模式)// C函数使用…如果(FieloOxOnLead(和;MyField,SqrReult.StimFrimeNeNe,FieloOxOpenSyRead)!/在所有情况下,它返回错误-IF(FieloOyErrRoGET(“a”)=FieloOyErrrOrthRO).FieloOyErrrOrthOndo-无法找到目录条目。//使用搜索结果的目录错误?将搜索返回的字节宽转换为UTI1616T是有意义的吗?使用.txt打开文件。
以上来自于百度翻译
以下为原文
Oooops, i just caught I posted the routine that also works.
Works - This is showing how I filled the buffer for reference full path from search.results to my buffer. If it's syntex, I thought it might help.
// I tried char in place of uint8_t as defined in the result buffer provided by the system generating the same error. I also tried changing the search result buffer to char to avoid any type cast issues. The result buffer filled (built with warnings) correctly in both scenarios.
typedef struct{
char /*or uint8_t*/ short_file_name[SHORT_FILE_NAME_LENGTH];
.... } PROFILE; extern PROFILE call[MAX_NUM];
if (FILEIO_Open(&myFile, call[0].short_file_name, FILEIO_OPEN_READ) != FILEIO_RESULT_SUCCESS)
// Is it possible the documented uint16_t conflicts with with the searches returned uint8_t/char. This looks like an issue on the Microchip side?
// .pdf
int FILEIO_Open(FILEIO_OBJECT * filePtr, const uint16_t * pathName, uint16_t mode);
//.c - implementation....
int FILEIO_Open (FILEIO_OBJECT * filePtr, const char * fileName, uint16_t mode)
//.c - function use....
if (FILEIO_Open(&myFile, SearchResult.shortFileName, FILEIO_OPEN_READ) != FILEIO_RESULT_SUCCESS)
// In all cases it returns the error - if(FILEIO_ErrorGet('A') == FILEIO_ERROR_DONE)
• FILEIO_ERROR_DONE - The directory entry could not be found.
// Directory error using SearchResult?
Would converting the search returned BYTE wide into a uint16_t make sense? Using .TXT works for opening a file.