DEVICE DRIVERS
msrOpen
M
X
800 SERIES PROGRAMMERS GUIDE 35
msrOpen
This interface prepares the firmware to accept and store card reads. If the
programmer does not make this call, then the terminal will ignore all card reads.
The MSR device allows only one open at a time.
Prototype
int result = msrOpen(int flags, void *callback);
Parameters
Return Values
flags Specify device access permissions for the MSR device. The
pertinent ones are:
callback Pointer to callback function. If available, this callback function will
be called when data is available.
0 Magnetic Stripe Reader is open and ready
< 0 Error
O_RDONLY Read Only
O_RDWR Read and Write
O_NONBLOCK Read is non-blocking (default is
blocking)