*/

int main(int argc, char *argv[])

{

printf("\nELO SBC6 Cash Drawer Demo.\n"); if( is_open() )

printf("\nCash register is open.\n"); else

printf("\nCash register is closed.\n"); printf("\nOpening Cash Drawer 1.\n");

open_drawer(DRAWER1); printf("\nOpening Cash Drawer 2.\n"); open_drawer(DRAWER2);

if( is_open() )

printf("\nCash register is open.\n"); else

printf("\nCash register is closed.\n"); return(0);

}

/*

=============================================================================

Function:

Parameters:

Return:

Exit:

Description:

=============================================================================

*/

int is_open(void)

{

int data = 0;/* Chipset register data */ /* Clear status register. */

_outp(GPE0_STS3,CASH_STS_MSK); Sleep(10);

/* Read status register. */ _inp(GPE0_STS3);

data &= CASH_STS_MSK; data >>= 5; return(data);

}

Elo TouchSystems 17A2 User Guide 45

Page 45
Image 45
Tyco Electronics 17A2 manual