Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef GPIB_PROTO_INCLUDED
4#define GPIB_PROTO_INCLUDED
5
6#include <linux/fs.h>
7
8int ibopen(struct inode *inode, struct file *filep);
9int ibclose(struct inode *inode, struct file *file);
10long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg);
11void os_start_timer(struct gpib_board *board, unsigned int usec_timeout);
12void os_remove_timer(struct gpib_board *board);
13void init_gpib_board(struct gpib_board *board);
14static inline unsigned long usec_to_jiffies(unsigned int usec)
15{
16 unsigned long usec_per_jiffy = 1000000 / HZ;
17
18 return 1 + (usec + usec_per_jiffy - 1) / usec_per_jiffy;
19};
20
21int serial_poll_all(struct gpib_board *board, unsigned int usec_timeout);
22void init_gpib_descriptor(struct gpib_descriptor *desc);
23int dvrsp(struct gpib_board *board, unsigned int pad, int sad,
24 unsigned int usec_timeout, u8 *result);
25int ibcac(struct gpib_board *board, int sync, int fallback_to_async);
26int ibcmd(struct gpib_board *board, u8 *buf, size_t length, size_t *bytes_written);
27int ibgts(struct gpib_board *board);
28int ibonline(struct gpib_board *board);
29int iboffline(struct gpib_board *board);
30int iblines(const struct gpib_board *board, short *lines);
31int ibrd(struct gpib_board *board, u8 *buf, size_t length, int *end_flag, size_t *bytes_read);
32int ibrpp(struct gpib_board *board, u8 *buf);
33int ibrsv2(struct gpib_board *board, u8 status_byte, int new_reason_for_service);
34int ibrsc(struct gpib_board *board, int request_control);
35int ibsic(struct gpib_board *board, unsigned int usec_duration);
36int ibsre(struct gpib_board *board, int enable);
37int ibpad(struct gpib_board *board, unsigned int addr);
38int ibsad(struct gpib_board *board, int addr);
39int ibeos(struct gpib_board *board, int eos, int eosflags);
40int ibwait(struct gpib_board *board, int wait_mask, int clear_mask, int set_mask,
41 int *status, unsigned long usec_timeout, struct gpib_descriptor *desc);
42int ibwrt(struct gpib_board *board, u8 *buf, size_t cnt, int send_eoi, size_t *bytes_written);
43int ibstatus(struct gpib_board *board);
44int general_ibstatus(struct gpib_board *board, const struct gpib_status_queue *device,
45 int clear_mask, int set_mask, struct gpib_descriptor *desc);
46int io_timed_out(struct gpib_board *board);
47int ibppc(struct gpib_board *board, u8 configuration);
48
49#endif /* GPIB_PROTO_INCLUDED */