diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-03-14 15:52:30 -0700 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-03-14 15:52:30 -0700 |
commit | 9a607474bdd66dd716635cfed7f2c832c39b4523 (patch) | |
tree | c5f65b4cecd6376a3b99646679f9714d5f9213a2 /include/qhy/cmosdll.h | |
parent | ac7604616ab2e44ad12a9d8d5dd90dec15feb5cc (diff) |
add qhy headers.........
Diffstat (limited to 'include/qhy/cmosdll.h')
-rw-r--r-- | include/qhy/cmosdll.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/include/qhy/cmosdll.h b/include/qhy/cmosdll.h new file mode 100644 index 0000000..8ace907 --- /dev/null +++ b/include/qhy/cmosdll.h @@ -0,0 +1,69 @@ +// The following ifdef block is the standard way of creating macros which make exporting
+// from a DLL simpler. All files within this DLL are compiled with the CMOSDLL_EXPORTS
+// symbol defined on the command line. this symbol should not be defined on any project
+// that uses this DLL. This way any other project whose source files include this file see
+// CMOSDLL_API functions as being imported from a DLL, whereas this DLL sees symbols
+// defined with this macro as being exported.
+
+
+#include "qhyccdstruct.h"
+
+#ifdef WIN32
+
+#include "stdint.h"
+#include "CyAPI.h"
+#include <process.h>
+
+// live interface
+int32_t InitAsyQCamLive(CCyUSBDevice *Camera, uint32_t x, uint32_t y, uint32_t depth, uint32_t frameSize);
+void StopAsyQCamLive(CCyUSBDevice *Camera);
+void BeginAsyQCamLive(CCyUSBDevice *Camera);
+uint32_t ReadAsyQCamLiveFrame(CCyUSBDevice *Camera, uint8_t *pBuffer, int32_t *pFrameFlag);
+
+// other functions
+void SetTransferSize(int length);
+void InitAsyTransfer(CCyUSBDevice *Camera, int framesize);
+void StartSingleExposure(CCyUSBDevice *Camera);
+void StartLiveExposure(CCyUSBDevice *Camera);
+void StopCapturing(CCyUSBDevice *Camera);
+DWORD IsExposing();
+DWORD ReadAsySingleFrame(PUCHAR pBuffer , DWORD size, int *pFrameFlag);
+
+#else // Linux & Mac
+
+#include <stdint.h>
+
+// live interface
+int32_t InitAsyQCamLive(qhyccd_handle *pDevHandle, uint32_t x, uint32_t y, uint32_t depth, uint32_t frameSize);
+bool BeginAsyQCamLive(qhyccd_handle *pDevHandle);
+void StopAsyQCamLive(qhyccd_handle *pDevHandle);
+uint32_t ReadAsyQCamLiveFrame(qhyccd_handle *pDevHandle, uint8_t *pBuffer, int32_t *pFrameFlag);
+uint32_t ReadAsyQCamLiveFrame(qhyccd_handle *pDevHandle, uint8_t *pBuffer, int32_t *pFrameFlag, UnlockImageQueue *pImageQueue);
+uint32_t ClearEndpoint(qhyccd_handle *pDevHandle);
+uint32_t ProcessAllPendingTransfers(qhyccd_handle *pDevHandle);
+uint32_t CancelAllPendingTransfers(qhyccd_handle *pDevHandle);
+void asyImageDataCallBack(struct libusb_transfer *transfer);
+
+// other functions
+void SetTransferSize(int length);
+void InitAsyTransfer(qhyccd_handle *pDevHandle, uint32_t frameSize);
+void ReleaseAsyTransfer(qhyccd_handle *pDevHandle);
+void StartSingleExposure(qhyccd_handle *pDevHandle);
+void StartLiveExposure(qhyccd_handle *pDevHandle);
+void StopCapturing(qhyccd_handle *pDevHandle);
+uint32_t IsExposing();
+uint32_t ReadAsySingleFrame(uint8_t *pBuffer, uint32_t size, int *pFrameFlag);
+
+void SetThreadExitFlag(int idx, bool val);
+bool IsThreadExitFlag(int idx);
+
+void IncrementEventCount(int idx);
+void DecrementEventCount(int idx);
+void ClearEventCount(int idx);
+int GetEventCount(int idx);
+
+void SetFirstExposureFlag(int idx, bool value);
+bool IsFirstExpousureFlag(int idx);
+
+#endif // WIN32
+
|