EasyManua.ls Logo

VeriFone MX800 Series - Page 203

VeriFone MX800 Series
344 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
USB - DEVICE / HOST
USB Host
M
X
800 SERIES PROGRAMMERS GUIDE 203
Each directory will be used in order as the devices are plugged into the unit. If a
device is removed, it is automatically unmounted from the directory mount point
and the data on it is no longer accessible. While the device is plugged in, the data
can be accessed by an application. The application can determine if a memory/
mass storage device has been detected, mounted properly, and is ready to be
accessed by making a call to the function svcUsbStorPresent().
This function call is described in greater detail in Chapter 5. It expects a pointer to
a char which can hold at least 4 bytes. When the function is called, it determines
which mount points have a device currently plugged in and mounted on its
directory and available for access. It will return the pointer with a value of 1 for
each device that is mounted and a 0 for each device that is not. All files located on
the device can be accessed at that mount point. For example, if the function
returns the values: 0, 1, 0, 1
then,
These directories exist on the terminal regardless if a device is detected and
mounted on them or not. The application must be aware not to write to a directory
without the device being present. If this is done then the files will remain on the
terminal in the directory written to instead of going to the memory device as the
application intended. It is only when the device is present as indicated by the
svcUsbStorPresent() function, that a file can be written to a memory device
correctly where the file will remain on the memory device and not the terminal.
/mnt/usbstor1 does not have a usb memory/storage device plugged in and
mounted on this directory.
/mnt/usbstor2 does have a device plugged in and the files located on the
memory device can be accessed at this point.
/mnt/usbstor3 does not have a usb memory/storage device plugged in and
mounted on this directory.
/mnt/usbstor4 does have a device plugged in and the files located on the
memory device can be accessed at this point.
NOTE
USB device detection is performed by plug and play hardware and software. It
typically takes approximately 10 seconds for all devices to be detected,
enumerated, and initialized before available for use. Applications and users
should be aware of this delay before a device can be accessed every time a
device is plugged in or removed from the M
x
800 series terminal.
NOTE
USB host can be reset by removing all plugged in devices and waiting for
approximately 10-15 seconds. All entries, environment variables, and mounted
devices will be removed and cleared. USB host port will then be ready to accept
newly inserted devices at that point.

Table of Contents