EasyManua.ls Logo

NCR RealPOS 70 - Page 262

NCR RealPOS 70
306 pages
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...
12-22 Chapter 12: Cash Drawer Interface
g_hPortDrvr, // Handle to device
(LPSTR) &gpioport,
(DWORD) 4, // Length of buffer in bytes
&DataRead, // bytes read
NULL ) == FALSE ) ) // NULL means wait till I/O completes.
{
gpioport = 0; //Read failed
DWORD hr = GetLastError();
result = FALSE;
return result;
}
} // end if WriteFile(...)
gpioport &= 0x0FFC0; // strip resource indicator
m_nIOPort_select = (WORD)gpioport+uc_gpsel_offset; // GP Sel Base
address from GPIO Base Register
m_nIOPort = (WORD)gpioport+uc_gp_offset; // GPO Base address from GPIO
Base Register
nUsePort = (WORD)gpioport+uc_gpuse_offset;
} // m_bPortDrvr
} //NT
// End Read Configuration Register
if ( result )
{
if ( (m_nIOPort == 0) || (m_nIOPort_select == 0) )
{
result = FALSE;
}
else
{
DWORD sBytes =0;
// Read USE select register
if ( ReadIOPort(&sBytes, nUsePort) )
{
sBytes = sBytes | CD7402USE_GPIO; //35:32 bits as GPIO
// write new USE
result = WriteIOPort( sBytes, nUsePort );
}
else
result = FALSE;
// Read select register
if (( ReadIOPort(&sBytes, m_nIOPort_select) ) && result)
{

Table of Contents

Related product manuals