BEST PCIe driver
 All Data Structures Files Functions Variables Macros Pages
BEST_PCIe.h
Go to the documentation of this file.
1 #ifndef BEST_PCIE_H_
10 #define BEST_PCIE_H_
11 
12 #include <asm/ioctl.h>
13 
14 #ifndef __KERNEL__
15 #include <stdint.h>
16 #endif
17 
18 
20 #define DMA_DISP_BUF_SIZE (128*1024)
21 
23 #define DMA_DISP_BUF_NR 30
24 
25 
26 
28 // IOCTL commands
29 
31 #define BEST_IOCTL_NUMBER 'B'
32 
33 
34 
35 //------------------------------------------------
37 struct __attribute__((__packed__)) tetramm_data {
38  uint32_t comm_resp_val1;
39  uint32_t comm_resp_val0;
40  uint32_t comm_resp;
41  float hvi;
42  float hvv;
43  uint64_t status;
44  double ch3;
45  double ch2;
46  double ch1;
47  double ch0;
48  uint32_t seq_nr;
49 };
50 
51 //------------------------------------------------
53 struct __attribute__((__packed__)) tetramm_data_fast {
54  double ch3;
55  double ch2;
56  double ch1;
57  double ch0;
58  uint32_t seq_nr;
59 };
60 
61 
62 //------------------------------------------------
64 struct __attribute__((__packed__)) dac_data {
65  double ch0;
66  double ch1;
67  double ch2;
68  double ch3;
69  uint32_t control;
70 
71 };
72 
73 //------------------------------------------------
75 struct __attribute__((__packed__)) mail {
76  uint32_t cmd;
77  char payload[28];
78 };
79 
80 
82 #define IOCTL_MAIL_COMM _IOWR(BEST_IOCTL_NUMBER, 10, struct mail *)
83 
85 #define IOCTL_READ_TETRAMM _IOR(BEST_IOCTL_NUMBER, 20, struct tetramm_data *)
86 
88 #define IOCTL_READ_T_FAST _IOR(BEST_IOCTL_NUMBER, 30, struct tetramm_data_fast *)
89 
91 #define IOCTL_WRITE_DAC _IOW(BEST_IOCTL_NUMBER, 40, struct dac_data *)
92 
94 #define IOCTL_FLASH_PASSWD _IOW(BEST_IOCTL_NUMBER, 50, char*)
95 
97 #define IOCTL_FLASH_ERASE _IOW(BEST_IOCTL_NUMBER, 60, unsigned int)
98 
99 
102 #define FLASH_PASSWORD "careful!!"
103 
104 
105 
106 
107 
108 #endif /* BEST_PCIE_H_ */
struct __attribute__((__packed__)) tetramm_data
TetrAMM data.
Definition: BEST_PCIe.h:37