Blame |
Last modification |
View Log
| RSS feed
#ifndef SIS3153W_H_
#define SIS3153W_H_
/***************************************************************************/
/* Filename: sis3153w.h */
/* */
/* Funktion: */
/* */
/* Autor: TH */
/* date: 01.07.2013 */
/* last modification: 19.01.2015 */
/* */
/* - 19.01.2015 */
/* add sis3153Usb_read_fx3_phy_info_counters */
/* */
/* ----------------------------------------------------------------------- */
/* */
/* SIS Struck Innovative Systeme GmbH */
/* */
/* Harksheider Str. 102A */
/* 22399 Hamburg */
/* */
/* Tel. +49 (0)40 60 87 305 0 */
/* Fax +49 (0)40 60 87 305 20 */
/* */
/* http://www.struck.de */
/* */
/* © 2015 */
/* */
/***************************************************************************/
#ifdef SIS3153W_EXPORTS
#define SIS3153W_API __declspec(dllexport)
#else
#define SIS3153W_API __declspec(dllimport)
#endif
#include <windows.h>
#include "sis3153wStat.h"
#include "sis3153wType.h"
#ifdef __cplusplus
extern "C" {
#endif
// device handling
SIS3153W_API SIS3153W_STATUS __cdecl FindAll_SIS3153USB_Devices(struct SIS3153USB_Device_Struct* sis3153usb_Device, UINT *nof_usbdevices, UINT max_usb_device_Number);
SIS3153W_API SIS3153W_STATUS __cdecl Sis3153usb_OpenDriver(struct SIS3153USB_Device_Struct* sis3153usb_Device);
SIS3153W_API SIS3153W_STATUS __cdecl Sis3153usb_CloseDriver(struct SIS3153USB_Device_Struct* sis3153usb_Device);
// api information
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_version(PSIS3153W_VERSION version);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_getLastError(int *err);
// local register access
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Single_Read(HANDLE usbDevice, UINT addr, UINT* data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Single_Write(HANDLE usbDevice, UINT addr, UINT data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Dma_Read(HANDLE usbDevice, UINT addr, UINT *dmabufs, UINT req_nof_data, UINT *got_nof_data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Register_Dma_Write(HANDLE usbDevice, UINT addr, UINT *dmabufs, UINT req_nof_data, UINT *put_nof_data);
// remote vme access
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Vme_Single_Read(HANDLE usbDevice, UINT addr, UINT am, UINT size, UINT *data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_Vme_Single_Write(HANDLE usbDevice, UINT addr, UINT am, UINT size, UINT data);
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);
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);
// remote vme handling
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_VmeSysreset(HANDLE usbDevice);
// fpga flash utils
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_fpga_ctrl(HANDLE usbDevice, UCHAR val);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_cs_ctrl(HANDLE usbDevice, UCHAR val);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_byte_io(HANDLE usbDevice, UCHAR byteIn, PUCHAR byteOut);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_read_id(HANDLE usbDevice, PUCHAR id);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_read_sr(HANDLE usbDevice, PUCHAR sr);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_sr(HANDLE usbDevice, UCHAR sr);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_en(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_en_volatile(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_write_dis(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_set_address(HANDLE usbDevice, UINT address);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_read(HANDLE usbDevice, USHORT len, PUCHAR data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_prog_page(HANDLE usbDevice, USHORT len, PUCHAR data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_erase_sector(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_flash_erase_block64(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_update_firmware(HANDLE usbDevice, PCHAR bin, void(__cdecl *cb)(int percent));
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_program_devinfo(HANDLE usbDevice, USHORT serno);
// read FX3 Firmware Version
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_read_fx3_firmware_version(HANDLE usbDevice, UINT *data);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_cmd_fx3_vme_interface_reset(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_cmd_fx3_fpga_reset(HANDLE usbDevice);
SIS3153W_API SIS3153W_STATUS __cdecl sis3153Usb_read_fx3_phy_info_counters(HANDLE usbDevice, USHORT write_data, UINT *read_data);
#ifdef __cplusplus
}
#endif
#endif // SIS3153W_H_