11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The DLIB runtime environmentScanf configuration symbols_DLIB_SCANF_SCANSET Scanset ([*])_DLIB_SCANF_WIDTHWidth_DLIB_SCANF_ASSIGNMENT_SUPPRESSING Assignment suppressing ([*])Table 16: Descriptions of scanf configuration symbols (Continued)Includes support forCUSTOMIZING FORMATTING CAPABILITIESTo customize the formatting capabilities, you need to set up a library project, seeBuilding and using a customized library, page 55. Define the configuration symbolsaccording to your application requirements.File input and outputThe library contains a large number of powerful functions for file I/O operations. If youuse any of these functions you need to customize them to suit your hardware. In orderto simplify adaptation to specific hardware, all I/O functions call a small set of primitivefunctions, each designed to accomplish one particular task; for example, __open opensa file, and __write outputs a number of characters.Note that file I/O capability in the library is only supported by libraries with full libraryconfiguration, see Library configurations, page 47. In other words, file I/O is supportedwhen the configuration symbol __DLIB_FILE_DESCRIPTOR is enabled. If not enabled,functions taking a FILE * argument cannot be used.Template code for the following I/O files are included in the product:I/O function File Description__close close.c Closes a file.__lseek lseek.c Sets the file position indicator.__open open.c Opens a file.__read read.c Reads a character buffer.__write write.c Writes a character buffer.remove remove.c Removes a file.rename rename.c Renames a file.Table 17: Low-level I/O filesThe primitive functions identify I/O streams, such as an open file, with a file descriptorthat is a unique integer. The I/O streams normally associated with stdin, stdout, andstderr have the file descriptors 0, 1, and 2, respectively.Part 1. Using the compiler63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!