1 #ifndef __RP5H01_H__
2 #define __RP5H01_H__
3 
4 /* max simultaneous chips supported. change if you need more */
5 #define MAX_RP5H01	1
6 
7 struct RP5H01_interface {
8 	int num;					/* number of chips */
9 	int region[MAX_RP5H01];		/* memory region where data resides */
10 	int offset[MAX_RP5H01];		/* memory offset within the above region where data resides */
11 };
12 
13 int RP5H01_init( struct RP5H01_interface *interface );
14 void RP5H01_enable_w( int which, int data );				/* /CE */
15 void RP5H01_reset_w( int which, int data );				/* RESET */
16 void RP5H01_clock_w( int which, int data );				/* DATA CLOCK (active low) */
17 void RP5H01_test_w( int which, int data );				/* TEST */
18 int RP5H01_counter_r( int which );						/* COUNTER OUT */
19 int RP5H01_data_r( int which );							/* DATA */
20 
21 /* direct-access stubs */
22 WRITE_HANDLER( RP5H01_0_enable_w );
23 WRITE_HANDLER( RP5H01_0_reset_w );
24 WRITE_HANDLER( RP5H01_0_clock_w );
25 WRITE_HANDLER( RP5H01_0_test_w );
26 READ_HANDLER( RP5H01_0_counter_r );
27 READ_HANDLER( RP5H01_0_data_r );
28 
29 #endif /* __RP5H01_H__ */
30