Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
169 | f9daq | 1 | #ifndef SIS3153W_H_ |
2 | #define SIS3153W_H_ |
||
3 | |||
4 | /***************************************************************************/ |
||
5 | /* Filename: sis3153w.h */ |
||
6 | /* */ |
||
7 | /* Funktion: */ |
||
8 | /* */ |
||
9 | /* Autor: TH */ |
||
10 | /* date: 01.07.2013 */ |
||
11 | /* last modification: 19.01.2015 */ |
||
12 | /* */ |
||
13 | /* - 19.01.2015 */ |
||
14 | /* add sis3153Usb_read_fx3_phy_info_counters */ |
||
15 | /* */ |
||
16 | /* ----------------------------------------------------------------------- */ |
||
17 | /* */ |
||
18 | /* SIS Struck Innovative Systeme GmbH */ |
||
19 | /* */ |
||
20 | /* Harksheider Str. 102A */ |
||
21 | /* 22399 Hamburg */ |
||
22 | /* */ |
||
23 | /* Tel. +49 (0)40 60 87 305 0 */ |
||
24 | /* Fax +49 (0)40 60 87 305 20 */ |
||
25 | /* */ |
||
26 | /* http://www.struck.de */ |
||
27 | /* */ |
||
28 | /* © 2015 */ |
||
29 | /* */ |
||
30 | /***************************************************************************/ |
||
31 | |||
32 | #ifdef SIS3153W_EXPORTS |
||
33 | #define SIS3153W_API __declspec(dllexport) |
||
34 | #else |
||
35 | #define SIS3153W_API __declspec(dllimport) |
||
36 | #endif |
||
37 | |||
38 | #include <windows.h> |
||
39 | |||
40 | #include "sis3153wStat.h" |
||
41 | #include "sis3153wType.h" |
||
42 | |||
43 | #ifdef __cplusplus |
||
44 | extern "C" { |
||
45 | #endif |
||
46 | |||
47 | // device handling |
||
48 | SIS3153W_API SIS3153W_STATUS __cdecl FindAll_SIS3153USB_Devices(struct SIS3153USB_Device_Struct* sis3153usb_Device, UINT *nof_usbdevices, UINT max_usb_device_Number); |
||
49 | SIS3153W_API SIS3153W_STATUS __cdecl Sis3153usb_OpenDriver(struct SIS3153USB_Device_Struct* sis3153usb_Device); |
||
50 | SIS3153W_API SIS3153W_STATUS __cdecl Sis3153usb_CloseDriver(struct SIS3153USB_Device_Struct* sis3153usb_Device); |
||
51 | |||
52 | // api information |
||
53 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_version(PSIS3153W_VERSION version); |
||
54 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_getLastError(int *err); |
||
55 | |||
56 | // local register access |
||
57 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Single_Read(HANDLE usbDevice, UINT addr, UINT* data); |
||
58 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Single_Write(HANDLE usbDevice, UINT addr, UINT data); |
||
59 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Dma_Read(HANDLE usbDevice, UINT addr, UINT *dmabufs, UINT req_nof_data, UINT *got_nof_data); |
||
60 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Dma_Write(HANDLE usbDevice, UINT addr, UINT *dmabufs, UINT req_nof_data, UINT *put_nof_data); |
||
61 | |||
62 | // remote vme access |
||
63 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Vme_Single_Read(HANDLE usbDevice, UINT addr, UINT am, UINT size, UINT *data); |
||
64 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Vme_Single_Write(HANDLE usbDevice, UINT addr, UINT am, UINT size, UINT data); |
||
65 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Vme_Dma_Read(HANDLE usbDevice, UINT addr, UINT am, UINT size, UINT fifo_mode, UINT *dmabufs, UINT req_nof_data, UINT *got_nof_data); |
||
66 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Vme_Dma_Write(HANDLE usbDevice, UINT addr, UINT am, UINT size, UINT fifo_mode, UINT *dmabufs, UINT req_nof_data, UINT *put_nof_data); |
||
67 | |||
68 | // remote vme handling |
||
69 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_VmeSysreset(HANDLE usbDevice); |
||
70 | |||
71 | // fpga flash utils |
||
72 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_fpga_ctrl(HANDLE usbDevice, UCHAR val); |
||
73 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_cs_ctrl(HANDLE usbDevice, UCHAR val); |
||
74 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_byte_io(HANDLE usbDevice, UCHAR byteIn, PUCHAR byteOut); |
||
75 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_read_id(HANDLE usbDevice, PUCHAR id); |
||
76 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_read_sr(HANDLE usbDevice, PUCHAR sr); |
||
77 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_sr(HANDLE usbDevice, UCHAR sr); |
||
78 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_en(HANDLE usbDevice); |
||
79 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_en_volatile(HANDLE usbDevice); |
||
80 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_dis(HANDLE usbDevice); |
||
81 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_set_address(HANDLE usbDevice, UINT address); |
||
82 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_read(HANDLE usbDevice, USHORT len, PUCHAR data); |
||
83 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_prog_page(HANDLE usbDevice, USHORT len, PUCHAR data); |
||
84 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_erase_sector(HANDLE usbDevice); |
||
85 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_erase_block64(HANDLE usbDevice); |
||
86 | |||
87 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_update_firmware(HANDLE usbDevice, PCHAR bin, void(__cdecl *cb)(int percent)); |
||
88 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_program_devinfo(HANDLE usbDevice, USHORT serno); |
||
89 | |||
90 | // read FX3 Firmware Version |
||
91 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_read_fx3_firmware_version(HANDLE usbDevice, UINT *data); |
||
92 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_cmd_fx3_vme_interface_reset(HANDLE usbDevice); |
||
93 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_cmd_fx3_fpga_reset(HANDLE usbDevice); |
||
94 | |||
95 | SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_read_fx3_phy_info_counters(HANDLE usbDevice, USHORT write_data, UINT *read_data); |
||
96 | |||
97 | #ifdef __cplusplus |
||
98 | } |
||
99 | #endif |
||
100 | |||
101 | #endif // SIS3153W_H_ |