Hisense HK870 Series All-in-One POS System Integration
ManualPage 39 of 41
Appendix B. Input/Output Information
This section provides input/output information for the HK870 All-in-One POS System.
Input/Output information for the HK870 series
HK870 (D2550) Super I/O Information (BIOS default settings)
COM1
:
3F8/4
COM2
:
2F7/3
COM3
:
3E8/7
COM4
:
2E8/7
HK870 (D2550) Cash Drawer
//Borland C++3.1 + DOS6.22
//XB2550
#ifndef byte
#define byte unsigned char
#endif
#ifndef Sleep
#define Sleep(x) delay(x)
#endif
#ifndef HSOutp
#define HSOutp(add,by) outportb(add,by)
#endif
#ifndef HSInp
#define HSInp(add) inportb(add)
#endif
//OpenDrawer
void OpenDrawer()
{
//GPO38 PIN Bit6 0--->1
byte by = HSInp( 0x538 );
HSOutp( 0x538 , 0xBF & by );
Sleep( 120 ); //200ms-->120ms
by = HSInp( 0x538);
HSOutp( 0x538, 0x40 | by );
}
//status1:Drawer closed
;
0:Drawer open;
bool GetDrwStatus()
{
//GPI22 2PIN Bit6
if( HSInp( 0x50E ) & 0x40)
return 1;
else return 0;
}