cc3dsfs/include/CaptureDeviceSpecific/Nisetro/cypress_nisetro_communications.hpp
Lorenzooone 4189884ded
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions
Implement ability to use high bw mode for Optimize - Add ability to not scan for some devices
2025-05-01 00:30:40 +02:00

44 lines
1.7 KiB
C++

#ifndef __CYPRESS_NISETRO_DEVICE_COMMUNICATIONS_HPP
#define __CYPRESS_NISETRO_DEVICE_COMMUNICATIONS_HPP
#include <libusb.h>
#include <vector>
#include <fstream>
#include <thread>
#include "utils.hpp"
#include "capture_structs.hpp"
#include "cypress_shared_communications.hpp"
enum cypress_nisetro_device_type {
CYPRESS_NISETRO_BLANK_DEVICE,
CYPRESS_NISETRO_DS_DEVICE,
};
struct cyni_device_usb_device {
std::string name;
std::string long_name;
cypress_nisetro_device_type device_type;
InputVideoDataType video_data_type;
uint8_t* firmware_to_load;
size_t firmware_size;
cypress_nisetro_device_type next_device;
bool has_bcd_device_serial;
PossibleCaptureDevices index_in_allowed_scan;
cy_device_usb_device usb_device_info;
};
int GetNumCyNiDeviceDesc(void);
const cyni_device_usb_device* GetCyNiDeviceDesc(int index);
const cyni_device_usb_device* GetNextDeviceDesc(const cyni_device_usb_device* device);
const cy_device_usb_device* get_cy_usb_info(const cyni_device_usb_device* usb_device_desc);
bool has_to_load_firmware(const cyni_device_usb_device* device);
bool load_firmware(cy_device_device_handlers* handlers, const cyni_device_usb_device* device, uint8_t patch_id);
int capture_start(cy_device_device_handlers* handlers, const cyni_device_usb_device* device);
int StartCaptureDma(cy_device_device_handlers* handlers, const cyni_device_usb_device* device);
int capture_end(cy_device_device_handlers* handlers, const cyni_device_usb_device* device);
int ReadFrame(cy_device_device_handlers* handlers, uint8_t* buf, int length, const cyni_device_usb_device* device_desc);
int ReadFrameAsync(cy_device_device_handlers* handlers, uint8_t* buf, int length, const cyni_device_usb_device* device_desc, cy_async_callback_data* cb_data);
#endif