Hardware Module for SMDK412

73M1822/73M1922 Hardware Module for SMDK412 User Guide UG_1x22_054
8 Rev. 1.1
3.3 close
Description
A file descriptor obtained with an open() command must be subsequently released with a corresponding
close..
Prototype
int close (int fd);
Parameters
Data Type Name Description
int
fd
File descriptor to close.
Return Values
Data Type Description
int
0 = Success.
-1 = Failure.
3.4 read
Description
A file descriptor obtained with an open() command can be called with the standard Linux read command
to obtain MAFE audio samples. The read command reads as many 16 bit samples into the user supplied
buffer as possible and return the amount of data that was copied.
Prototype
size_t read (int fd, void * buf, size_t buf_size);
Parameters
Data Type Name Description
int
fd
File descriptor.
void *
buf
Buffer to read samples into.
size_t
buf_size
Maximum size of data that can be copied.
Return Values
Data Type Description
size_t
Amount of data that was actually copied.