/*
 * linpac.h
 * (C) 2004 Moki Matsushima <moki@icpdas.com>
 *
 * All this is intended to be used with a ISA-like slot on the SA1100's 
 * static memory bus. 
 * This is included by slot.c.
 */
//for lp-52xx by cindy 20170910
#ifdef __cplusplus
extern "C" {
#endif


extern long GetTimeTicks();
extern int GetSlotCount();   //getport 9 35
extern void GetRotaryID(int type,unsigned int *id);
extern float GetSDKversion(void);

extern unsigned int inb(unsigned int slot,unsigned int offset);
//extern unsigned char inb(unsigned int slot,unsigned int offset);
extern void outb(unsigned int slot,unsigned int offset, unsigned int data);
//extern void outb(unsigned int slot,unsigned int offset, unsigned char data);
extern int setSignal(int slot,int signal,pid_t pid);
extern int GetModuleType(int slot);
extern void ChangeToSlot(int slot);
extern void Read_SN(unsigned char serial_num[8]);
extern int GetNameOfModule(int slot);
extern unsigned int getSystemStatus(void);
extern unsigned char Read_SRAM(int offset);
extern void Write_SRAM(int offset, unsigned char data);

extern void EnableTimer(unsigned int usecond);
extern void DisableTimer(void);
extern long GetTimeTicks_ms(void);


#define	IoRead	inb
#define	IoWrite	outb
#define	SLOT0	0
#define	SLOT1	1
#define	SLOT2	2
#define	SLOT3	3
#define	SLOT4	4
#define	SLOT5	5
#define	SLOT6	6
#define	SLOT7	7
#define	SLOT8	8
#define	SLOT9	9
#define	SLOT10	10

#ifdef __cplusplus
}
#endif
