mirror of
https://github.com/Lorenzooone/cc3dsfs.git
synced 2026-08-26 02:24:30 -05:00
Proper IS TWL Capture initialization
This commit is contained in:
@@ -78,13 +78,23 @@ struct is_device_device_handlers {
|
||||
libusb_device_handle* usb_handle;
|
||||
void* read_handle;
|
||||
void* write_handle;
|
||||
void* ctrl_in_handle;
|
||||
void* mutex;
|
||||
std::string path;
|
||||
};
|
||||
|
||||
struct is_device_twl_enc_dec_table {
|
||||
uint32_t rotating_value;
|
||||
uint8_t num_values;
|
||||
uint8_t num_iters_full;
|
||||
uint8_t num_iters_before_refresh;
|
||||
uint16_t action_values[8];
|
||||
};
|
||||
|
||||
int GetNumISDeviceDesc(void);
|
||||
const is_device_usb_device* GetISDeviceDesc(int index);
|
||||
int DisableLca2(is_device_device_handlers* handlers, const is_device_usb_device* device_desc);
|
||||
int StartUsbCaptureDma(is_device_device_handlers* handlers, const is_device_usb_device* device_desc);
|
||||
int StartUsbCaptureDma(is_device_device_handlers* handlers, const is_device_usb_device* device_desc, bool enable_sound_capture = false, is_device_twl_enc_dec_table* enc_table = NULL, is_device_twl_enc_dec_table* dec_table = NULL);
|
||||
int StopUsbCaptureDma(is_device_device_handlers* handlers, const is_device_usb_device* device_desc);
|
||||
int SetForwardFrameCount(is_device_device_handlers* handlers, uint16_t count, const is_device_usb_device* device_desc);
|
||||
int SetForwardFramePermanent(is_device_device_handlers* handlers, const is_device_usb_device* device_desc);
|
||||
@@ -105,6 +115,7 @@ int ReadFrame(is_device_device_handlers* handlers, uint8_t* buf, int length, con
|
||||
void ReadFrameAsync(is_device_device_handlers* handlers, uint8_t* buf, int length, const is_device_usb_device* device_desc, isd_async_callback_data* cb_data);
|
||||
void CloseAsyncRead(is_device_device_handlers* handlers, isd_async_callback_data* cb_data);
|
||||
int ResetUSBDevice(is_device_device_handlers* handlers);
|
||||
int PrepareEncDecTable(is_device_device_handlers* handlers, is_device_twl_enc_dec_table* enc_table, is_device_twl_enc_dec_table* dec_table, const is_device_usb_device* device_desc);
|
||||
|
||||
void SetupISDeviceAsyncThread(is_device_device_handlers* handlers, void* user_data, std::thread* thread_ptr, bool* keep_going, ConsumerMutex* is_data_ready);
|
||||
void EndISDeviceAsyncThread(is_device_device_handlers* handlers, void* user_data, std::thread* thread_ptr, bool* keep_going, ConsumerMutex* is_data_ready);
|
||||
|
||||
@@ -10,8 +10,11 @@
|
||||
void is_driver_list_devices(std::vector<CaptureDevice>& devices_list, bool* not_supported_elems, int* curr_serial_extra_id_is_device, const size_t num_is_device_desc);
|
||||
is_device_device_handlers* is_driver_serial_reconnection(CaptureDevice* device);
|
||||
void is_driver_end_connection(is_device_device_handlers* handlers);
|
||||
bool is_driver_prepare_ctrl_in_handle(is_device_device_handlers* handlers);
|
||||
void is_driver_close_ctrl_in_handle(is_device_device_handlers* handlers);
|
||||
int is_driver_bulk_out(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, int* transferred);
|
||||
int is_driver_bulk_in(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, int* transferred);
|
||||
int is_driver_ctrl_in(is_device_device_handlers* handlers, uint8_t* buf, int length, uint8_t request, uint16_t index, int* transferred);
|
||||
int is_drive_async_in_start(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, isd_async_callback_data* cb_data);
|
||||
void is_device_is_driver_cancel_callback(isd_async_callback_data* cb_data);
|
||||
int is_device_is_driver_reset_device(is_device_device_handlers* handlers);
|
||||
|
||||
@@ -10,6 +10,7 @@ is_device_device_handlers* is_device_libusb_serial_reconnection(const is_device_
|
||||
void is_device_libusb_end_connection(is_device_device_handlers* handlers, const is_device_usb_device* device_desc, bool interface_claimed);
|
||||
int is_device_libusb_bulk_out(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, int* transferred);
|
||||
int is_device_libusb_bulk_in(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, int* transferred);
|
||||
int is_device_libusb_ctrl_in(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, uint8_t request, uint16_t index, int* transferred);
|
||||
void is_device_libusb_async_in_start(is_device_device_handlers* handlers, const is_device_usb_device* usb_device_desc, uint8_t* buf, int length, isd_async_callback_data* cb_data);
|
||||
void is_device_libusb_cancell_callback(isd_async_callback_data* cb_data);
|
||||
int is_device_libusb_reset_device(is_device_device_handlers* handlers);
|
||||
|
||||
Reference in New Issue
Block a user