summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Burnicki <martin.burnicki@meinberg.de>2022-12-16 18:19:52 +0100
committerMartin Burnicki <martin.burnicki@meinberg.de>2022-12-16 18:19:52 +0100
commitcbd37aa045eb180008ef06a9293ed6c46b128a30 (patch)
tree7cdf70403e9e2dc0a31da68b8e48b17a2ad20d2c
parent8efbee4b28b03891f97910b5ba7fea3322ba8e23 (diff)
downloadmbgtools-lx-cbd37aa045eb180008ef06a9293ed6c46b128a30.tar.gz
mbgtools-lx-cbd37aa045eb180008ef06a9293ed6c46b128a30.zip
Let the kernel driver also check the RECEIVER_INFO to see if time capture inputs are provided
-rw-r--r--mbglib/common/pcpsdrvr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mbglib/common/pcpsdrvr.c b/mbglib/common/pcpsdrvr.c
index d39fa90..fe30501 100644
--- a/mbglib/common/pcpsdrvr.c
+++ b/mbglib/common/pcpsdrvr.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: pcpsdrvr.c 1.78 2022/08/23 15:38:16 martin.burnicki REL_M $
+ * $Id: pcpsdrvr.c 1.79 2022/12/16 17:18:24 martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -64,6 +64,8 @@
*
* -----------------------------------------------------------------------
* $Log: pcpsdrvr.c $
+ * Revision 1.79 2022/12/16 17:18:24 martin.burnicki
+ * Also check the RECEIVER_INFO to see if time capture inputs are provided.
* Revision 1.78 2022/08/23 15:38:16 martin.burnicki
* Check and fix configuration reported by early TCR180USB versions.
* Revision 1.77 2022/03/30 15:38:40 martin.burnicki
@@ -4675,7 +4677,14 @@ void check_receiver_info_and_features( PCPS_DDEV *pddev )
// If the numbers of ports and string types aren't 0 here,
// set the appropriate feature bit.
if ( ( p_ri->n_com_ports > 0 ) && ( p_ri->n_str_type > 0 ) )
- pddev->dev.cfg.features |= PCPS_HAS_SERIAL;
+ pddev->dev.cfg.features |= PCPS_HAS_SERIAL;
+
+ // If the number of capture inputs isn't 0, the device provides
+ // one or more capture inputs, so set the appropriate feature bit.
+ // This may happen if only specific hardware variants of a device
+ // support this, e.g. variants of the TCR180USB.
+ if ( p_ri->n_ucaps > 0 )
+ pddev->dev.cfg.features |= PCPS_HAS_UCAP;
#if REPORT_CFG