Hardware Module for SMDK412

UG_1x22_054 73M1822/73M1922 Hardware Module for SMDK412 User Guide
Rev. 1.1 9
3.5 write
Description
A file descriptor obtained with an open() command can be called with the standard Linux write command
to transmit MAFE audio samples. The write command copy as many 16 bit samples from the user
supplied buffer as possible and return the amount of data that was copied.
Prototype
size_t write (int fd, const void * buf, size_t buf_size);
Parameters
Data Type Name Description
int
fd
File descriptor.
Const void *
buf
Buffer to copy samples from.
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.
3.6 ioctl
Description
A file descriptor obtained with an open() command can be called with the standard Linux ioctl
command to perform various tasks.
Prototype
int ioctl (int fd, int request, … args);
Parameters
Data Type Name Description
int
fd
File descriptor.
int
request
Requested service.
args
Request dependent arguments.
Return Values
Data Type Description
int
Request dependent return value.
The following sections describe the detail of each IOCTL command.