Skip to content

Commit

Permalink
Properly advertise PAN/TILT read-only/autoupdate capabilities
Browse files Browse the repository at this point in the history
The Linux kernel added some more input sanitization with kernel 6.10.3
(specifically patch
torvalds/linux@8641968).
We could add a quirk fix to the kernel, but it's a bit easier to update
the hardware as well to behave more correctly.

This will permit reading position data from the BNO on Linux once again.
  • Loading branch information
ximion committed Nov 5, 2024
1 parent 16a1558 commit f7935aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Binary file modified Built_Firmware/Miniscope_DAQ_128K_EEPROM.img
Binary file not shown.
Binary file modified Built_Firmware/Miniscope_DAQ_256K_EEPROM.img
Binary file not shown.
3 changes: 2 additions & 1 deletion Miniscope_DAQ/uvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,8 @@ UVCHandleCameraTerminalRqts (void)
case CY_FX_UVC_CT_ZOOM_ABSOLUTE_CONTROL: // Unused
switch (bRequest) {
case CY_FX_USB_UVC_GET_INFO_REQ:
glEp0Buffer[0] = 3; /* Support GET/SET queries. */
/* we only support reading data from these controls */
glEp0Buffer[0] = UVC_CONTROL_CAP_GET | UVC_CONTROL_CAP_AUTOUPDATE;
CyU3PUsbSendEP0Data (1, (uint8_t *)glEp0Buffer);

break;
Expand Down
7 changes: 7 additions & 0 deletions Miniscope_DAQ/uvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@
#define CY_FX_UVC_VC_ERROR_CODE_INVALID_VAL_IN_RANGE (0x08)
#define CY_FX_UVC_VC_ERROR_CODE_UNKNOWN (0xFF)

/* Capabilities */
#define UVC_CONTROL_CAP_GET (1 << 0)
#define UVC_CONTROL_CAP_SET (1 << 1)
#define UVC_CONTROL_CAP_DISABLED (1 << 2)
#define UVC_CONTROL_CAP_AUTOUPDATE (1 << 3)
#define UVC_CONTROL_CAP_ASYNCHRONOUS (1 << 4)

/* Enum for a DMA reset event */
typedef enum CyFxUvcDmaResetVal
{
Expand Down

0 comments on commit f7935aa

Please sign in to comment.