Read(); Write() - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

4.3.2

read()

The read() function reads a specified number of words from the SCI or SPI module to an user
allocated buffer. This function can operate in Blocking mode (it waits till end of operation),
NonBlocking mode (it exits from the function immediately and the end of operation can be
checked by testing the status word) or in Buffered mode (characters are copied from the internal
circular buffer).
The syntax of read() function call is as follows:
read(peripheral_module_identifier, mode_identifier, buffer_pointer, number_of_words);
Where:
Peripheral_module_identifier parameter is the same as in ioctl(), i.e. the base address of the
peripheral module, which can be either SCI or SPI (because only these two peripheral modules can
transmit/receive data). The predefined symbolic constants SCI or SPI can be used.
Mode_identifier parameter specifies the mode of operation, which can be BLOCKING,
NON_BLOCKING. or BUFFERED.
Buffer_pointer and number_of_words parameters specifies the buffer pointer and the number of
words, which will be read.
See Section 5.15.3.39 and Section 5.16.3.38 where the read() function is described.
4.3.3

write()

The write() function writes a specified number of words to the SCI or SPI module from the user
allocated buffer. This function can operate in Blocking mode (it waits for end of operation),
NonBlocking mode (it exits from the function immediately and the end of operation can be
checked by testing the status word) or in Buffered mode (characters are copied into the internal
circular buffer).
The syntax of the write() function call is as follows:
write(peripheral_module_identifier, mode_identifier, buffer_pointer,
number_of_words);
Where:
Peripheral_module_identifier parameter is the same as in ioctl(), i.e. the base address of the
peripheral module, which can be either SCI or SPI (because only these two peripheral modules can
transmit/receive data). The predefined symbolic constants SCI or SPI can be used.
Mode_identifier parameter specifies the mode of operation, which can be BLOCKING,
NON_BLOCKING. or BUFFERED.
Buffer_pointer and number_of_words parameters specifies the buffer pointer and the number of
words which will be transmitted.
See Section 5.15.3.40 and Section 5.16.3.39 where the write() function is described.
FREESCALE SEMICONDUCTOR
Targeting 56F8xxx Platform
On-chip drivers - interface description
4-5

Advertisement

Table of Contents
loading

Table of Contents