/* 
**	File:	elo_memory.h
**	Project:	"Desk-games" terminal (DGT): Elo TouchScreen
**	Author:	Nikolay Nikitin
**	Version:	1.0
*/

#ifndef	__ELO_MEMORY_H
#define	__ELO_MEMORY_H

#define	SCREEN_MIN_X_ADDRESS		0
#define	SCREEN_MIN_X_SIZE				4
#define	SCREEN_MAX_X_ADDRESS		4
#define	SCREEN_MAX_X_SIZE				4
#define	SCREEN_MIN_Y_ADDRESS		8
#define	SCREEN_MIN_Y_SIZE				4
#define	SCREEN_MAX_Y_ADDRESS		12
#define	SCREEN_MAX_Y_SIZE				4
#define	SCREEN_X_ADDRESS				16
#define	SCREEN_X_SIZE						4
#define	SCREEN_Y_ADDRESS				20
#define	SCREEN_Y_SIZE						4
#define	SCREEN_UNLOCK_ADDRESS		24
#define	SCREEN_UNLOCK_SIZE			1
#define	SCREEN_WAIT_ADDRESS			25
#define	SCREEN_WAIT_SIZE				1
#define	SCREEN_READY_ADDRESS		26
#define	SCREEN_READY_SIZE				1
#define	SCREEN_STATE_SIZE				27
#define	STATE_MEMORY_SIZE				(SCREEN_STATE_SIZE * 2) /* 2 max screen number */

#define	STATE_MEMORY_KEY			2010
#define PERM									0666

static char *state_memory;
static int MemoryOffset;

/******************************************************************************
 *		Declarations
 *****************************************************************************/

static Bool MemoryCreate( xf86key_t key, int size ); // Create memory
static Bool MemoryOpen( xf86key_t key, int size ); // Open memory


#endif	__ELO_MEMORY_H

/*	End of file "elo_memory.h" */

