@@ -55,9 +55,9 @@ struct gpib_interface_struct {
55
55
/* name of board */
56
56
char * name ;
57
57
/* attach() initializes board and allocates resources */
58
- int (* attach )(gpib_board_t * board , const gpib_board_config_t * config );
58
+ int (* attach )(struct gpib_board * board , const gpib_board_config_t * config );
59
59
/* detach() shuts down board and frees resources */
60
- void (* detach )(gpib_board_t * board );
60
+ void (* detach )(struct gpib_board * board );
61
61
/* read() should read at most 'length' bytes from the bus into
62
62
* 'buffer'. It should return when it fills the buffer or
63
63
* encounters an END (EOI and or EOS if appropriate). It should set 'end'
@@ -68,74 +68,74 @@ struct gpib_interface_struct {
68
68
* return indicates error.
69
69
* nbytes returns number of bytes read
70
70
*/
71
- int (* read )(gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
71
+ int (* read )(struct gpib_board * board , uint8_t * buffer , size_t length , int * end ,
72
72
size_t * bytes_read );
73
73
/* write() should write 'length' bytes from buffer to the bus.
74
74
* If the boolean value send_eoi is nonzero, then EOI should
75
75
* be sent along with the last byte. Returns number of bytes
76
76
* written or negative value on error.
77
77
*/
78
- int (* write )(gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
78
+ int (* write )(struct gpib_board * board , uint8_t * buffer , size_t length , int send_eoi ,
79
79
size_t * bytes_written );
80
80
/* command() writes the command bytes in 'buffer' to the bus
81
81
* Returns zero on success or negative value on error.
82
82
*/
83
- int (* command )(gpib_board_t * board , uint8_t * buffer , size_t length ,
83
+ int (* command )(struct gpib_board * board , uint8_t * buffer , size_t length ,
84
84
size_t * bytes_written );
85
85
/* Take control (assert ATN). If 'asyncronous' is nonzero, take
86
86
* control asyncronously (assert ATN immediately without waiting
87
87
* for other processes to complete first). Should not return
88
88
* until board becomes controller in charge. Returns zero no success,
89
89
* nonzero on error.
90
90
*/
91
- int (* take_control )(gpib_board_t * board , int asyncronous );
91
+ int (* take_control )(struct gpib_board * board , int asyncronous );
92
92
/* De-assert ATN. Returns zero on success, nonzer on error.
93
93
*/
94
- int (* go_to_standby )(gpib_board_t * board );
94
+ int (* go_to_standby )(struct gpib_board * board );
95
95
/* request/release control of the IFC and REN lines (system controller) */
96
- void (* request_system_control )(gpib_board_t * board , int request_control );
96
+ void (* request_system_control )(struct gpib_board * board , int request_control );
97
97
/* Asserts or de-asserts 'interface clear' (IFC) depending on
98
98
* boolean value of 'assert'
99
99
*/
100
- void (* interface_clear )(gpib_board_t * board , int assert );
100
+ void (* interface_clear )(struct gpib_board * board , int assert );
101
101
/* Sends remote enable command if 'enable' is nonzero, disables remote mode
102
102
* if 'enable' is zero
103
103
*/
104
- void (* remote_enable )(gpib_board_t * board , int enable );
104
+ void (* remote_enable )(struct gpib_board * board , int enable );
105
105
/* enable END for reads, when byte 'eos' is received. If
106
106
* 'compare_8_bits' is nonzero, then all 8 bits are compared
107
107
* with the eos bytes. Otherwise only the 7 least significant
108
108
* bits are compared.
109
109
*/
110
- int (* enable_eos )(gpib_board_t * board , uint8_t eos , int compare_8_bits );
110
+ int (* enable_eos )(struct gpib_board * board , uint8_t eos , int compare_8_bits );
111
111
/* disable END on eos byte (END on EOI only)*/
112
- void (* disable_eos )(gpib_board_t * board );
112
+ void (* disable_eos )(struct gpib_board * board );
113
113
/* configure parallel poll */
114
- void (* parallel_poll_configure )(gpib_board_t * board , uint8_t configuration );
114
+ void (* parallel_poll_configure )(struct gpib_board * board , uint8_t configuration );
115
115
/* conduct parallel poll */
116
- int (* parallel_poll )(gpib_board_t * board , uint8_t * result );
116
+ int (* parallel_poll )(struct gpib_board * board , uint8_t * result );
117
117
/* set/clear ist (individual status bit) */
118
- void (* parallel_poll_response )(gpib_board_t * board , int ist );
118
+ void (* parallel_poll_response )(struct gpib_board * board , int ist );
119
119
/* select local parallel poll configuration mode PP2 versus remote PP1 */
120
- void (* local_parallel_poll_mode )(gpib_board_t * board , int local );
120
+ void (* local_parallel_poll_mode )(struct gpib_board * board , int local );
121
121
/* Returns current status of the bus lines. Should be set to
122
122
* NULL if your board does not have the ability to query the
123
123
* state of the bus lines.
124
124
*/
125
- int (* line_status )(const gpib_board_t * board );
125
+ int (* line_status )(const struct gpib_board * board );
126
126
/* updates and returns the board's current status.
127
127
* The meaning of the bits are specified in gpib_user.h
128
128
* in the IBSTA section. The driver does not need to
129
129
* worry about setting the CMPL, END, TIMO, or ERR bits.
130
130
*/
131
- unsigned int (* update_status )(gpib_board_t * board , unsigned int clear_mask );
131
+ unsigned int (* update_status )(struct gpib_board * board , unsigned int clear_mask );
132
132
/* Sets primary address 0-30 for gpib interface card.
133
133
*/
134
- int (* primary_address )(gpib_board_t * board , unsigned int address );
134
+ int (* primary_address )(struct gpib_board * board , unsigned int address );
135
135
/* Sets and enables, or disables secondary address 0-30
136
136
* for gpib interface card.
137
137
*/
138
- int (* secondary_address )(gpib_board_t * board , unsigned int address ,
138
+ int (* secondary_address )(struct gpib_board * board , unsigned int address ,
139
139
int enable );
140
140
/* Sets the byte the board should send in response to a serial poll.
141
141
* This function should also start or stop requests for service via
@@ -149,7 +149,7 @@ struct gpib_interface_struct {
149
149
* by IEEE 488.2 section 11.3.3.4.3 "Allowed Coupled Control of
150
150
* STB, reqt, and reqf".
151
151
*/
152
- void (* serial_poll_response )(gpib_board_t * board , uint8_t status_byte );
152
+ void (* serial_poll_response )(struct gpib_board * board , uint8_t status_byte );
153
153
/* Sets the byte the board should send in response to a serial poll.
154
154
* This function should also request service via IEEE 488.2 reqt/reqf
155
155
* based on MSS (bit 6 of the status_byte) and new_reason_for_service.
@@ -164,15 +164,15 @@ struct gpib_interface_struct {
164
164
* If this method is left NULL by the driver, then the user library
165
165
* function ibrsv2 will not work.
166
166
*/
167
- void (* serial_poll_response2 )(gpib_board_t * board , uint8_t status_byte ,
167
+ void (* serial_poll_response2 )(struct gpib_board * board , uint8_t status_byte ,
168
168
int new_reason_for_service );
169
169
/* returns the byte the board will send in response to a serial poll.
170
170
*/
171
- uint8_t (* serial_poll_status )(gpib_board_t * board );
171
+ uint8_t (* serial_poll_status )(struct gpib_board * board );
172
172
/* adjust T1 delay */
173
- unsigned int (* t1_delay )(gpib_board_t * board , unsigned int nano_sec );
173
+ unsigned int (* t1_delay )(struct gpib_board * board , unsigned int nano_sec );
174
174
/* go to local mode */
175
- void (* return_to_local )(gpib_board_t * board );
175
+ void (* return_to_local )(struct gpib_board * board );
176
176
/* board does not support 7 bit eos comparisons */
177
177
unsigned no_7_bit_eos : 1 ;
178
178
/* skip check for listeners before trying to send command bytes */
@@ -198,7 +198,7 @@ static inline void init_event_queue(gpib_event_queue_t *queue)
198
198
struct gpib_pseudo_irq {
199
199
struct timer_list timer ;
200
200
irqreturn_t (* handler )(int irq , void * arg );
201
- gpib_board_t * board ;
201
+ struct gpib_board * board ;
202
202
atomic_t active ;
203
203
};
204
204
@@ -216,7 +216,7 @@ typedef struct gpib_interface_list_struct {
216
216
struct module * module ;
217
217
} gpib_interface_list_t ;
218
218
219
- /* One gpib_board_t is allocated for each physical board in the computer.
219
+ /* One struct gpib_board is allocated for each physical board in the computer.
220
220
* It provides storage for variables local to each board, and interface
221
221
* functions for performing operations on the board
222
222
*/
0 commit comments