Skip to main content

IAR Embedded Workbench for RX 5.20

__readFileByte

In this section:
Syntax
__readFileByte(fileHandle)
Parameters
fileHandle

A macro variable used as filehandle by the __openFile macro.

Return value

-1 upon error or end-of-file, otherwise a value between 0 and 255.

For use with

All C-SPY drivers.

Description

Reads one byte from a file.

Example
__var byte;
while ( (byte = __readFileByte(myFileHandle)) != -1 )
{
  /* Do something with byte */
}