mbgtools-lx  4.2.8
pcpsdrvr.c File Reference
#include <pcpsdrvr.h>
#include <identdec.h>
#include <mbgddmsg.h>
#include <plxdefs.h>
#include <pci_asic.h>
#include <amccdefs.h>
#include <pcidefs.h>
#include <pci.h>

Go to the source code of this file.

Macros

#define _PCPSDRVR
 
#define REPORT_CFG   10
 
#define REPORT_CFG_DETAILS   1
 
#define REPORT_CFG_LOG_LVL   MBG_LOG_INFO
 
#define TEST_CFG_DETAILS   0
 
#define USE_CMD_PTR   1
 
#define DEBUG_ACCESS_TIMING   0
 
#define DEBUG_IO_TIMING   0
 
#define DEBUG_IO   1
 
#define DEBUG_PORTS   1
 
#define DEBUG_SERNUM   1
 
#define USE_USB_MICRO_FRAMES   0
 
#define TEST_PORT_ACCESS   0
 
#define MUST_REPORT_PROBE_DEVICE_DETAILS   1
 
#define MUST_REPORT_ACCESS_MODE   1
 
#define PCPS_LOG_STD_MSGS   0
 
#define _do_div(_x, _y)   do { _x /= _y; } while ( 0 )
 
#define MAX_BOOT_TIME_PTP270PEX   27
 Max. time required for PTP270PEX v1 card to be ready after power-up. More...
 
#define _fmemcpy(_d, _s, _n)   memcpy( _d, _s, _n )
 
#define _fstrlen(_s)   strlen( _s )
 
#define _fstrncmp(_s1, _s2, _n)   strncmp( (_s1), (_s2), (_n) )
 
#define static_wc
 
#define FMT_03X   "%03X"
 
#define FMT_08X   "%08lX"
 
#define _pcps_irq_flags   unsigned long irq_flags;
 
#define _pcps_disb_local_irq_save()   local_irq_save( irq_flags )
 
#define _pcps_local_irq_restore()   local_irq_restore( irq_flags )
 
#define _pcps_time_after(_curr, _tmo)   ( _curr >= _tmo )
 
#define MBG_TGT_HAS_UPTIME   1
 
#define FP_FMT   "%p"
 

Typedefs

typedef unsigned int PCI_DWORD
 

Functions

static __mbg_inline int pcps_ddev_is_ptp270pex (const PCPS_DDEV *pddev)
 Check if a device is a PTP270PEX card. More...
 
static int mbg_plx_read_pecs_reg (struct pci_dev *pNode, uint16_t reg, uint32_t *pval)
 Read a dword from a PLX PECS register. More...
 
static bool ptp270pex_can_flag_ready (const PCPS_DDEV *pddev)
 Check if a PTP270PEX card can indicate when it's ready. More...
 
static bool ptp270pex_has_flagged_ready (const PCPS_DDEV *pddev)
 Check if a PTP270PEX card indicates it is ready. More...
 
static void report_uptime (const MBG_SYS_UPTIME *p_uptime)
 Report the system uptime. More...
 
static void wait_ptp270pex_ready (const PCPS_DDEV *pddev)
 Wait until a PTP270PEX card is ready after power-up. More...
 
static bool pcps_check_pex_irq_unsafe (PCPS_DDEV *pddev, uint16_t req_fw_ver, uint8_t req_asic_ver_major, uint8_t req_asic_ver_minor)
 Check if IRQ usage with a device is unsafe. More...
 
static int setup_mm_addr (PCPS_DDEV *pddev)
 Setup the memory mapped addresses depending on the device type. More...
 
void pcps_dump_data (const void *buffer, size_t count, const char *info)
 
static void report_io_cmd (uint8_t cmd, uint16_t count, const char *info)
 
static void report_ret_val (int rc, const char *info)
 Report the return code to be returned by a function. More...
 
__mbg_inline int pcps_wait_busy (PCPS_DDEV *pddev)
 Wait as long as a device is busy, or until timeout. More...
 
static int pcps_read_null (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count)
 Dummy read function. More...
 
static int pcps_read_std (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count)
 Read function for devices with ISA or micro channel bus. More...
 
static int pcps_read_amcc_s5933 (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count)
 Read function for devices with AMCC S5933 PCI interface chip. More...
 
static int pcps_read_amcc_s5920 (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count)
 Read function for devices with AMCC S5920 PCI interface chip. More...
 
static int pcps_read_asic (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count)
 Read function for devices with Meinberg PCI interface ASIC. More...
 
int pcps_write (PCPS_DDEV *pddev, uint8_t cmd, const void FAR *buffer, uint16_t count)
 Write data to a device. More...
 
int pcps_generic_io (PCPS_DDEV *pddev, uint8_t type, const void FAR *in_buff, uint8_t in_cnt, void FAR *out_buff, uint8_t out_cnt)
 Generic I/O function. More...
 
static int pcps_check_gps_data_size (PCPS_DDEV *pddev, uint16_t count, const char *info)
 Determine which interface buffer size is supported. More...
 
static int pcps_init_gps_transfer (PCPS_DDEV *pddev, uint8_t cmd, uint8_t data_type, uint16_t count, const char *info)
 Initialize GPS data transfer. More...
 
static int pcps_read_gps_block (PCPS_DDEV *pddev, uint8_t data_type, void FAR *buffer, uint16_t count, uint8_t block_num, uint8_t block_size)
 Get a block of data from a GPS device. More...
 
int pcps_read_gps (PCPS_DDEV *pddev, uint8_t data_type, void FAR *buffer, uint16_t count)
 Read a large data structure from a device. More...
 
int pcps_write_gps (PCPS_DDEV *pddev, uint8_t data_type, const void FAR *buffer, uint16_t count)
 Write a large data structure to a device. More...
 
static int pcps_get_fw_id (PCPS_DDEV *pddev, PCPS_ID_STR FAR fw_id)
 Read the firmware ID from a device. More...
 
static int pcps_check_id (PCPS_DDEV *pddev, const char FAR *ref)
 Check an ASCIIZ string for a valid signature. More...
 
static PCPS_FW_REV_NUM pcps_get_rev_num (char FAR *idstr)
 Retrieve a version number from a firmware ID string. More...
 
static bool str_remove_unprintables (char *s, size_t max_len)
 Remove unprintable characters from a string. More...
 
static void beautify_sernum (char *s, size_t max_len)
 
static void check_unknown_sernum (char *s, size_t max_len)
 
static const char * get_bus_type_str (const PCPS_DDEV *pddev)
 
static void report_probe_device (const PCPS_DDEV *pddev)
 
static const char * get_pcps_feature_name (PCPS_FEATURES flag_mask)
 Get the name assigned to one of the PCPS_FEATURE_MASKS flags. More...
 
static void dump_receiver_info (const PCPS_DDEV *pddev)
 
static void dump_xfeature_buffer (const PCPS_DDEV *pddev)
 
static void dump_tlv_info (const PCPS_DDEV *pddev)
 
static void check_feature (PCPS_DDEV *pddev, ushort req_rev_num, PCPS_FEATURES flag_mask)
 Check the firmware to see if a specific feature is supported. More...
 
static void check_ri_features (PCPS_DDEV *pddev)
 Check the receiver info features to see if a specific feature is supported. More...
 
int setup_sernum_and_receiver_info (PCPS_DDEV *pddev)
 Read the serial number and receiver info from the device. More...
 
void check_receiver_info_and_features (PCPS_DDEV *pddev)
 Check the receiver info and features. More...
 
void pcps_release_rsrcs (PCPS_DDEV *pddev)
 Release I/O port and memory resource that have been claimed before. More...
 
PCPS_DEV_TYPEpcps_get_dev_type_table_entry (PCPS_BUS_FLAGS bus_mask, PCPS_DEV_ID dev_id)
 Lookup a specific device in the device table. More...
 
static void pcps_free_ddev_struc (PCPS_DDEV **ppddev)
 Free a previously allocated device info structure. More...
 
static int pcps_alloc_ddev_struc (PCPS_DDEV **ppddev)
 Allocate a device info structure for a device. More...
 
int pcps_init_ddev (PCPS_DDEV **ppddev)
 Allocate and initialize a device info structure. More...
 
void pcps_cleanup_ddev (PCPS_DDEV *pddev)
 Clean up and free a previously initialized device info structure. More...
 
static void rsrc_port_to_cfg_port (PCPS_SHORT_PORT_RSRC *p_short_port_rsrc, const MBG_IOPORT_RSRC *p_io_rsrc)
 Convert a raw I/O base address to a short format. More...
 
int pcps_add_rsrc_io (PCPS_DDEV *pddev, MBG_IOPORT_ADDR_RAW base, ulong num)
 Add an I/O address range resource to the device structure. More...
 
int pcps_add_rsrc_mem (PCPS_DDEV *pddev, MBG_IOMEM_ADDR_RAW start, ulong len)
 Add a memory address range resource to the device structure. More...
 
int pcps_add_rsrc_irq (PCPS_DDEV *pddev, int16_t irq_num)
 Add an IRQ number resource to the device structure. More...
 
int pcps_chk_dev_feat (PCPS_DDEV *p_ddev, uint feat_type, uint feat_num)
 Check if a specific feature of a specific feature type is supported. More...
 
static void set_access_mode (PCPS_DDEV *pddev, uint mode, bool forced, PCPS_READ_FNC *read_fnc)
 
static void report_access_mode (const PCPS_DDEV *pddev)
 
int pcps_probe_device (PCPS_DDEV *pddev, PCPS_BUS_NUM bus_num, PCPS_SLOT_NUM dev_fnc_num)
 Probe if a device is supported, and allocate and setup the device structure. More...
 
void pcps_cleanup_device (PCPS_DDEV *pddev)
 Clean up function called by pcps_probe_device on error. More...
 
void pcps_detect_isa_devices (PCPS_DDEV_INIT_FNC *ddev_init_fnc, PCPS_DDEV_CLEANUP_FNC *ddev_cleanup_fnc, PCPS_DDEV_REGISTER_FNC *ddev_register_fnc, int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS])
 Detect and initialize ISA devices in a non-PnP system. More...
 
static void _MBG_INIT_CODE_ATTR pcps_detect_devices_init (PCPS_DDEV_INIT_FNC *ddev_init_fnc, PCPS_DDEV_CLEANUP_FNC *ddev_cleanup_fnc, int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS])
 _PCPS_USE_ISA_PNP More...
 
void _MBG_INIT_CODE_ATTR pcps_detect_devices (int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS])
 Detect all bus-level devices in a non-PnP system. More...
 

Variables

static const char str_empty [] = ""
 
static const char str_unkn_braced [] = "(unknown)"
 
static const char str_spc_gps [] = " GPS"
 
static MBG_PC_CYCLES_FREQUENCY pc_cycles_frequency
 Clock frequency of the PC's cycles counter, in [Hz]. More...
 
static uint32_t ri_feat_tbl [N_GPS_FEATURE]
 A table used to map RECEIVER_INFO::features to PCPS_DEV_CFG::features. More...
 
static const char * gps_ri_feature_names [N_GPS_FEATURE] = DEFAULT_GPS_FEATURE_NAMES
 A table of name strings associated with GPS_FEATURE_BITS. More...
 
static const char * pcps_feature_names [N_PCPS_FEATURE_BITS] = PCPS_FEATURE_NAMES
 A table of name strings associated with PCPS_FEATURE_BITS. More...
 
PCPS_READ_FNC pcps_read_null
 
PCPS_READ_FNC pcps_read_std
 
PCPS_READ_FNC pcps_read_amcc_s5933
 
PCPS_READ_FNC pcps_read_amcc_s5920
 
PCPS_READ_FNC pcps_read_asic
 
PCPS_WRITE_FNC pcps_write
 Write data to a device. More...
 
PCPS_READ_FNC pcps_read_gps
 Read a large data structure from a device. More...
 
PCPS_WRITE_FNC pcps_write_gps
 Write a large data structure to a device. More...
 

Macro Definition Documentation

◆ _do_div

#define _do_div (   _x,
  _y 
)    do { _x /= _y; } while ( 0 )

Definition at line 516 of file pcpsdrvr.c.

Referenced by report_io_cmd().

◆ _fmemcpy

#define _fmemcpy (   _d,
  _s,
  _n 
)    memcpy( _d, _s, _n )

Definition at line 558 of file pcpsdrvr.c.

Referenced by pcps_generic_io().

◆ _fstrlen

#define _fstrlen (   _s)    strlen( _s )

Definition at line 559 of file pcpsdrvr.c.

Referenced by pcps_check_id(), and pcps_get_rev_num().

◆ _fstrncmp

#define _fstrncmp (   _s1,
  _s2,
  _n 
)    strncmp( (_s1), (_s2), (_n) )

Definition at line 560 of file pcpsdrvr.c.

Referenced by pcps_check_id().

◆ _pcps_disb_local_irq_save

#define _pcps_disb_local_irq_save ( )    local_irq_save( irq_flags )

◆ _pcps_irq_flags

#define _pcps_irq_flags   unsigned long irq_flags;

◆ _pcps_local_irq_restore

#define _pcps_local_irq_restore ( )    local_irq_restore( irq_flags )

◆ _pcps_time_after

#define _pcps_time_after (   _curr,
  _tmo 
)    ( _curr >= _tmo )

Definition at line 625 of file pcpsdrvr.c.

Referenced by pcps_wait_busy().

◆ _PCPSDRVR

#define _PCPSDRVR

Definition at line 362 of file pcpsdrvr.c.

◆ DEBUG_ACCESS_TIMING

#define DEBUG_ACCESS_TIMING   0

Definition at line 438 of file pcpsdrvr.c.

◆ DEBUG_IO

#define DEBUG_IO   1

Definition at line 454 of file pcpsdrvr.c.

◆ DEBUG_IO_TIMING

#define DEBUG_IO_TIMING   0

Definition at line 447 of file pcpsdrvr.c.

◆ DEBUG_PORTS

#define DEBUG_PORTS   1

Definition at line 462 of file pcpsdrvr.c.

◆ DEBUG_SERNUM

#define DEBUG_SERNUM   1

Definition at line 470 of file pcpsdrvr.c.

◆ FMT_03X

#define FMT_03X   "%03X"

Definition at line 573 of file pcpsdrvr.c.

Referenced by pcps_detect_isa_devices().

◆ FMT_08X

#define FMT_08X   "%08lX"

Definition at line 574 of file pcpsdrvr.c.

Referenced by pcps_cleanup_device(), and pcps_detect_isa_devices().

◆ FP_FMT

#define FP_FMT   "%p"

Referenced by pcps_generic_io().

◆ MAX_BOOT_TIME_PTP270PEX

#define MAX_BOOT_TIME_PTP270PEX   27

Max. time required for PTP270PEX v1 card to be ready after power-up.

The PTP270PEX cards have an on-board Linux system which must have finished booting before the card can be accessed via the PCI bus. If the card is accessed earlier then the PCI bus and thus the computer may hang.

There are 2 different hardware versions of the PTP270PEX card. PTP270PEX v2 hardware and firmware can flag via a bit in the PCI configuration space when the card is ready, so the driver can just wait until the card has flagged that it's ready.

However, the PTP270PEX v1 hardware doesn't support this, so the driver checks the system uptime and waits until it is greater or equal the maximum time required for a PTP270PEX v1 card to finish booting.

The nominal time is 27 s, but if a firmware update has been submitted then the update is applied first, which takes another few seconds.

See also
wait_ptp270pex_ready
report_uptime

Definition at line 543 of file pcpsdrvr.c.

Referenced by report_uptime(), and wait_ptp270pex_ready().

◆ MBG_TGT_HAS_UPTIME

#define MBG_TGT_HAS_UPTIME   1

Definition at line 638 of file pcpsdrvr.c.

◆ MUST_REPORT_ACCESS_MODE

#define MUST_REPORT_ACCESS_MODE   1

Definition at line 495 of file pcpsdrvr.c.

◆ MUST_REPORT_PROBE_DEVICE_DETAILS

#define MUST_REPORT_PROBE_DEVICE_DETAILS   1

Definition at line 489 of file pcpsdrvr.c.

◆ PCPS_LOG_STD_MSGS

#define PCPS_LOG_STD_MSGS   0

Definition at line 504 of file pcpsdrvr.c.

◆ REPORT_CFG

#define REPORT_CFG   10

Definition at line 409 of file pcpsdrvr.c.

◆ REPORT_CFG_DETAILS

#define REPORT_CFG_DETAILS   1

Definition at line 417 of file pcpsdrvr.c.

◆ REPORT_CFG_LOG_LVL

◆ static_wc

#define static_wc

Definition at line 572 of file pcpsdrvr.c.

Referenced by pcps_release_rsrcs().

◆ TEST_CFG_DETAILS

#define TEST_CFG_DETAILS   0

Definition at line 426 of file pcpsdrvr.c.

◆ TEST_PORT_ACCESS

#define TEST_PORT_ACCESS   0

Definition at line 484 of file pcpsdrvr.c.

◆ USE_CMD_PTR

#define USE_CMD_PTR   1

Definition at line 430 of file pcpsdrvr.c.

◆ USE_USB_MICRO_FRAMES

#define USE_USB_MICRO_FRAMES   0

Definition at line 477 of file pcpsdrvr.c.

Typedef Documentation

◆ PCI_DWORD

typedef unsigned int PCI_DWORD

Definition at line 578 of file pcpsdrvr.c.

Function Documentation

◆ beautify_sernum()

static void beautify_sernum ( char *  s,
size_t  max_len 
)
static

Definition at line 3749 of file pcpsdrvr.c.

References _pcps_ddev_sernum, and str_remove_unprintables().

Referenced by setup_sernum_and_receiver_info().

◆ check_feature()

static void check_feature ( PCPS_DDEV pddev,
ushort  req_rev_num,
PCPS_FEATURES  flag_mask 
)
static

Check the firmware to see if a specific feature is supported.

Some devices provide a specific feature only starting with a specific firmware version, but the device provides no way to test this, so the feature flag in the device structure is set if the firmware has the required version.

Parameters
[in,out]pddevPointer to the device structure
[in]req_rev_numRevision number required for the feature to be supported
[in]flag_maskFlag mask of the feature to be tested

Definition at line 4001 of file pcpsdrvr.c.

References _mbg_kdd_msg_5, _pcps_ddev_fw_rev_num, _pcps_ddev_type_name, PCPS_DEV::cfg, PCPS_DDEV_s::dev, PCPS_DEV_CFG::features, get_pcps_feature_name(), REPORT_CFG_LOG_LVL, and str_empty.

Referenced by pcps_probe_device().

◆ check_receiver_info_and_features()

void check_receiver_info_and_features ( PCPS_DDEV pddev)

Check the receiver info and features.

Parameters
[in,out]pddevPointer to a device structure

Definition at line 4274 of file pcpsdrvr.c.

Referenced by pcps_probe_device().

◆ check_ri_features()

static void check_ri_features ( PCPS_DDEV pddev)
static

Check the receiver info features to see if a specific feature is supported.

Some devices provide a RECEIVER_INFO which provides some flags that can be mapped to the feature flags we use internally, so we scan these features and update the internal features mask accordingly.

Parameters
[in,out]pddevPointer to the device structure

Definition at line 4031 of file pcpsdrvr.c.

References _mbg_kdd_msg_3, _mbg_kdd_msg_4, _pcps_ddev_fw_rev_num, _pcps_ddev_type_name, _ri_addr, PCPS_DEV::cfg, PCPS_DDEV_s::dev, PCPS_DEV_CFG::features, RECEIVER_INFO::features, gps_ri_feature_names, N_GPS_FEATURE, pcps_feature_names, REPORT_CFG_LOG_LVL, and ri_feat_tbl.

Referenced by check_receiver_info_and_features().

◆ check_unknown_sernum()

static void check_unknown_sernum ( char *  s,
size_t  max_len 
)
static

Definition at line 3792 of file pcpsdrvr.c.

Referenced by setup_sernum_and_receiver_info().

◆ dump_receiver_info()

◆ dump_tlv_info()

◆ dump_xfeature_buffer()

◆ get_bus_type_str()

◆ get_pcps_feature_name()

static const char* get_pcps_feature_name ( PCPS_FEATURES  flag_mask)
static

Get the name assigned to one of the PCPS_FEATURE_MASKS flags.

Parameters
[in]flag_maskone of the PCPS_FEATURE_MASKS flags
Returns
The associated feature name, or "unknown"
See also
PCPS_FEATURE_MASKS

Definition at line 3872 of file pcpsdrvr.c.

References N_PCPS_FEATURE_BITS, pcps_feature_names, and str_unkn_braced.

Referenced by check_feature().

◆ mbg_plx_read_pecs_reg()

static int mbg_plx_read_pecs_reg ( struct pci_dev *  pNode,
uint16_t  reg,
uint32_t *  pval 
)
static

Read a dword from a PLX PECS register.

Parameters
[in]pNodeDevice structure
[in]regNumber of the register to read
[out]pvalPointer to a variable to take the value read from the register
Returns
PCI_SUCCESS on success, else one of the PCI BIOS error codes

Definition at line 804 of file pcpsdrvr.c.

References PCI_BAD_REGISTER_NUMB, PCI_SUCCESS, PLX_PECS_MAINDATA, and PLX_PECS_MAININDEX.

Referenced by ptp270pex_can_flag_ready().

◆ pcps_add_rsrc_io()

int pcps_add_rsrc_io ( PCPS_DDEV pddev,
MBG_IOPORT_ADDR_RAW  base,
ulong  num 
)

Add an I/O address range resource to the device structure.

Parameters
[in,out]pddevPointer to the device structure
[in]baseBase address of the I/O address range
[in]numNumber of addresses of the I/O address range
Returns
MBG_SUCCESS on success, else one of the MBG_ERROR_CODES

Definition at line 4897 of file pcpsdrvr.c.

Referenced by pcps_cleanup_device(), pcps_detect_isa_devices(), and pcps_release_rsrcs().

◆ pcps_add_rsrc_irq()

int pcps_add_rsrc_irq ( PCPS_DDEV pddev,
int16_t  irq_num 
)

Add an IRQ number resource to the device structure.

Parameters
[in,out]pddevPointer to the device structure
[in]irq_numStart address of the memory range
Returns
MBG_SUCCESS on success, else one of the MBG_ERROR_CODES

Definition at line 5021 of file pcpsdrvr.c.

Referenced by pcps_cleanup_device(), and pcps_detect_isa_devices().

◆ pcps_add_rsrc_mem()

int pcps_add_rsrc_mem ( PCPS_DDEV pddev,
MBG_IOMEM_ADDR_RAW  start,
ulong  len 
)

Add a memory address range resource to the device structure.

Parameters
[in,out]pddevPointer to the device structure
[in]startStart address of the memory range
[in]lenSize of the memory range
Returns
MBG_SUCCESS on success, else one of the MBG_ERROR_CODES

Definition at line 4959 of file pcpsdrvr.c.

Referenced by pcps_cleanup_device().

◆ pcps_alloc_ddev_struc()

static int pcps_alloc_ddev_struc ( PCPS_DDEV **  ppddev)
static

Allocate a device info structure for a device.

On success, the pointer to the device structure is set to the allocated memory for the device structure.

Parameters
[in,out]ppddevAddress of a pointer to a device structure to be allocated
Returns
MBG_SUCCESS on success, or MBG_ERR_NO_MEM if no memory could be allocated
See also
pcps_free_ddev_struc

Definition at line 4744 of file pcpsdrvr.c.

References _mbgddmsg_0, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit_chk_mbg_rc, _pcps_kmalloc, DEBUG_DEV_INIT, MBG_ERR_NO_MEM, MBG_LOG_ERR, MBG_SUCCESS, n_ddevs, N_SUPP_DEV_BUS, and pcps_ddev.

Referenced by pcps_init_ddev().

◆ pcps_check_gps_data_size()

static int pcps_check_gps_data_size ( PCPS_DDEV pddev,
uint16_t  count,
const char *  info 
)
static

Determine which interface buffer size is supported.

Parameters
[in]pddevPointer to the device structure
[in]countThe number of bytes to be read according to the data_type
[in]infoAn info string, e.g. the name of the calling function
Returns
MBG_SUCCESS on success, or MBG_ERR_NBYTES if the actual buffer size exceeds the supported size

Definition at line 3170 of file pcpsdrvr.c.

References _mbg_kdd_msg_1, _pcps_ddev_has_gps_data_16, MBG_ERR_NBYTES, MBG_LOG_ERR, MBG_SUCCESS, and PCPS_DDEV_s::size_n_bytes.

Referenced by pcps_read_gps_block(), and pcps_write_gps().

◆ pcps_check_id()

static int pcps_check_id ( PCPS_DDEV pddev,
const char FAR ref 
)
static

Check an ASCIIZ string for a valid signature.

This function is only used to determine the type of a legacy ISA card. For PCI and USB devices the type can be determined from the device ID.

Parameters
[in]pddevPointer to a device structure
[in]refThe reference signature, i.e. the expected signature at the beginning of the device's firmware ID
Returns
MBG_SUCCESS if a signature was specified and the signature was found, or MBG_ERR_FW_ID if the firmware ID is unknown or invalid

Definition at line 3648 of file pcpsdrvr.c.

References _fstrlen, _fstrncmp, _pcps_ddev_fw_id, MBG_ERR_FW_ID, and MBG_SUCCESS.

Referenced by pcps_probe_device().

◆ pcps_check_pex_irq_unsafe()

static bool pcps_check_pex_irq_unsafe ( PCPS_DDEV pddev,
uint16_t  req_fw_ver,
uint8_t  req_asic_ver_major,
uint8_t  req_asic_ver_minor 
)
static

Check if IRQ usage with a device is unsafe.

A few early PCI Express cards had a problem where usage of IRQs was unsafe. Firmware upgrades are available to fix this. See http://www.meinberg.de/english/info/pex-upgrades.htm

Parameters
[in]pddevPointer to the device structure
[in]req_fw_verRequired firmware version
[in]req_asic_ver_majorRequired ASIC major version
[in]req_asic_ver_minorRequired ASIC major version
Returns
true if IRQ operation is unsafe

Definition at line 1152 of file pcpsdrvr.c.

References _pcps_ddev_asic_version, _pcps_ddev_fw_rev_num, _pcps_pex_irq_is_safe, PCPS_DDEV_s::irq_ack_mask, PCPS_DDEV_s::irq_ack_port, PCPS_DDEV_s::irq_stat_info, and PCPS_IRQ_STAT_UNSAFE.

Referenced by pcps_probe_device().

◆ pcps_chk_dev_feat()

int pcps_chk_dev_feat ( PCPS_DDEV p_ddev,
uint  feat_type,
uint  feat_num 
)

Check if a specific feature of a specific feature type is supported.

There are different structures where information can be stored if a specific feature is supported. All information is set up when the pcps_probe_device function is called to probe and initialize the device. This generic low-level function can be called by API functions to check if a specific feature is supported.

Parameters
[in]p_ddevPointer to the device structure
[in]feat_typeSee DEV_FEAT_TYPES
[in]feat_numNumber and range depending on feat_type value
Returns
MBG_SUCCESS if the requested feature is supported, MBG_ERR_NOT_SUPP_BY_DEV if not supported, or one of the other MBG_ERROR_CODES
See also
pcps_probe_device

Definition at line 5112 of file pcpsdrvr.c.

Referenced by check_receiver_info_and_features(), do_chk_dev_feat(), and ioctl_switch().

◆ pcps_cleanup_ddev()

void pcps_cleanup_ddev ( PCPS_DDEV pddev)

Clean up and free a previously initialized device info structure.

Parameters
[in]pddevAddress of a device structure to be cleaned up and released
See also
pcps_init_ddev

Definition at line 4845 of file pcpsdrvr.c.

Referenced by mbgclock_init_module(), and pcps_detect_devices().

◆ pcps_cleanup_device()

void pcps_cleanup_device ( PCPS_DDEV pddev)

Clean up function called by pcps_probe_device on error.

Parameters
[in,out]pddevPointer to the device structure
See also
pcps_probe_device

Definition at line 6247 of file pcpsdrvr.c.

Referenced by pcps_probe_device().

◆ pcps_ddev_is_ptp270pex()

static __mbg_inline int pcps_ddev_is_ptp270pex ( const PCPS_DDEV pddev)
static

Check if a device is a PTP270PEX card.

Definition at line 782 of file pcpsdrvr.c.

References _pcps_ddev_dev_id, _pcps_ddev_is_pci, and PCI_DEV_PTP270PEX.

Referenced by pcps_probe_device().

◆ pcps_detect_devices()

void _MBG_INIT_CODE_ATTR pcps_detect_devices ( int  isa_ports[PCPS_MAX_ISA_CARDS],
int  isa_irqs[PCPS_MAX_ISA_CARDS] 
)

Detect all bus-level devices in a non-PnP system.

Note
If a DOS TSR is installed, be sure it is disabled (BUSY flag set) when this function is called.
Parameters
[in]isa_portsAn array with potential I/O base addresses for ISA devices.
[in]isa_irqsAn array with potential IRQ numbers assigned to ISA devices.

Definition at line 6683 of file pcpsdrvr.c.

References pcps_cleanup_ddev(), pcps_detect_devices_init(), and pcps_init_ddev().

Referenced by mbg_find_devices(), and mbgclock_init_module().

◆ pcps_detect_devices_init()

static void _MBG_INIT_CODE_ATTR pcps_detect_devices_init ( PCPS_DDEV_INIT_FNC ddev_init_fnc,
PCPS_DDEV_CLEANUP_FNC ddev_cleanup_fnc,
int  isa_ports[PCPS_MAX_ISA_CARDS],
int  isa_irqs[PCPS_MAX_ISA_CARDS] 
)
static

_PCPS_USE_ISA_PNP

Detect all bus-level devices in a non-PnP system, use specific alloc/cleanup functions

Note
If a DOS TSR is installed, be sure it is disabled (BUSY flag set) when this function is called.
Parameters
[in]ddev_init_fncPointer to function called to allocate a device structure for each detected device.
[in]ddev_cleanup_fncPointer to function called if the device structure needs to be de-allocated in case of error.
[in]isa_portsAn array with potential I/O base addresses for ISA devices.
[in]isa_irqsAn array with potential IRQ numbers assigned to ISA devices.

Definition at line 6647 of file pcpsdrvr.c.

References N_PCPS_DEV_TYPE, PCI_VENDOR_MEINBERG, pcps_detect_isa_devices(), pcps_detect_pci_devices(), and pcps_dev_type.

Referenced by pcps_detect_devices().

◆ pcps_detect_isa_devices()

void pcps_detect_isa_devices ( PCPS_DDEV_INIT_FNC ddev_init_fnc,
PCPS_DDEV_CLEANUP_FNC ddev_cleanup_fnc,
PCPS_DDEV_REGISTER_FNC ddev_register_fnc,
int  isa_ports[PCPS_MAX_ISA_CARDS],
int  isa_irqs[PCPS_MAX_ISA_CARDS] 
)

Detect and initialize ISA devices in a non-PnP system.

Parameters
[in]ddev_init_fncPointer to function called to allocate a device structure for each detected device.
[in]ddev_cleanup_fncPointer to function called if the device structure needs to be de-allocated in case of error.
[in]ddev_register_fncPointer to function called to register a detected device.
[in]isa_portsAn array with potential I/O base addresses for ISA devices.
[in]isa_irqsAn array with potential IRQ numbers assigned to ISA devices.

Definition at line 6559 of file pcpsdrvr.c.

References _mbgddmsg_1, _mbgddmsg_2, PCPS_DEV_TYPE::bus_flags, PCPS_DEV::cfg, DEBUG_DEV_INIT, PCPS_DDEV_s::dev, PCPS_DEV_CFG::err_flags, FMT_03X, FMT_08X, MBG_LOG_INFO, MBG_LOG_WARN, mbg_rc_is_success, pcps_add_rsrc_io(), pcps_add_rsrc_irq(), PCPS_BUS_ISA, PCPS_MAX_ISA_CARDS, PCPS_NUM_PORTS_ISA, pcps_probe_device(), and PCPS_DEV::type.

Referenced by mbgclock_init_module(), and pcps_detect_devices_init().

◆ pcps_dump_data()

void pcps_dump_data ( const void *  buffer,
size_t  count,
const char *  info 
)

◆ pcps_free_ddev_struc()

static void pcps_free_ddev_struc ( PCPS_DDEV **  ppddev)
static

Free a previously allocated device info structure.

The pointer to the device structure is set to NULL after the associated memory has been freed.

Parameters
[in,out]ppddevAddress of a pointer to a device structure to be freed
See also
pcps_alloc_ddev_struc

Definition at line 4704 of file pcpsdrvr.c.

References _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit, _pcps_kfree, and n_ddevs.

Referenced by pcps_cleanup_ddev().

◆ pcps_get_dev_type_table_entry()

PCPS_DEV_TYPE* pcps_get_dev_type_table_entry ( PCPS_BUS_FLAGS  bus_mask,
PCPS_DEV_ID  dev_id 
)

Lookup a specific device in the device table.

The function below takes a bus flag and device ID to search the table of known devices for a device which matches the given criteria.

Parameters
[in]bus_maskMask of the bus type to look up, see PCPS_BUS_FLAG_MASKS
[in]dev_idThe device ID to lookup, see MEINBERG_PCI_DEVICE_IDS or MBG_USB_DEVICE_IDS, depending on the bus_mask
Returns
A pointer to the device table entry, or NULL if no entry found

Definition at line 4672 of file pcpsdrvr.c.

Referenced by pcps_add_rsrc_irq().

◆ pcps_get_fw_id()

static int pcps_get_fw_id ( PCPS_DDEV pddev,
PCPS_ID_STR FAR  fw_id 
)
static

Read the firmware ID from a device.

This is usually done first when probing a device to check if the device is properly installed and can be accessed without problems.

Parameters
[in]pddevPointer to a device structure
[out]fw_idA buffer to be filled withtthe firmware ID
Returns
MBG_SUCCESS if the the signature was found, or signature was specified, or MBG_ERR_FW_ID if the firmware ID is unknown or invalid

Definition at line 3591 of file pcpsdrvr.c.

References _mbgddmsg_1, _mbgddmsg_2, _pcps_ddev_type_name, _pcps_read, DEBUG_DEV_INIT, PCPS_IO_BUFFER::fw_id, PCPS_DDEV_s::io_buffer, MBG_LOG_INFO, mbg_rc_is_error, PCPS_FIFO_SIZE, PCPS_GIVE_FW_ID_1, PCPS_GIVE_FW_ID_2, and PCPS_ID_SIZE.

Referenced by pcps_probe_device().

◆ pcps_get_rev_num()

static PCPS_FW_REV_NUM pcps_get_rev_num ( char FAR idstr)
static

Retrieve a version number from a firmware ID string.

Parameters
[in]idstrThe ID string, e.g. a PCPS_ID_STR
Returns
A version number in hex format, e.g. 0x0270 for version 2.7, or 0 if no version number could be found.

Definition at line 3671 of file pcpsdrvr.c.

References _fstrlen.

Referenced by pcps_probe_device().

◆ pcps_init_ddev()

int pcps_init_ddev ( PCPS_DDEV **  ppddev)

Allocate and initialize a device info structure.

On success, the pointer to the device structure is set to the device structure, and the device structure has been initialized.

Parameters
[in,out]ppddevAddress of a pointer to a device structure to be allocated and initialized
Returns
MBG_SUCCESS on success, or MBG_ERR_NO_MEM if no memory could be allocated
See also
pcps_cleanup_ddev

Definition at line 4799 of file pcpsdrvr.c.

Referenced by mbgclock_init_module(), and pcps_detect_devices().

◆ pcps_init_gps_transfer()

static int pcps_init_gps_transfer ( PCPS_DDEV pddev,
uint8_t  cmd,
uint8_t  data_type,
uint16_t  count,
const char *  info 
)
static

Initialize GPS data transfer.

Parameters
[in]pddevPointer to the device structure
[in]cmdPCPS_READ_GPS_DATA or PCPS_WRITE_GPS_DATA
[in]data_typeThe code assigned to the data type, see PC_GPS_CMD_CODES
[in]countThe number of bytes to be read according to the data_type
[in]infoAn info string, e.g. the name of the calling function
Returns
MBG_SUCCESS on success, else one of the MBG_ERROR_CODES

Definition at line 3215 of file pcpsdrvr.c.

References _mbg16_to_cpu, _mbg_kdd_msg_1, _mbg_kdd_msg_2, _mbg_kdd_msg_3, _pcps_read, _pcps_read_var, MBG_ERR_INV_TYPE, MBG_ERR_NBYTES, MBG_ERR_NOT_READY, MBG_LOG_DEBUG, MBG_LOG_ERR, MBG_LOG_WARN, mbg_rc_is_error, PCPS_DDEV_s::n_bytes, PCPS_DDEV_s::size_n_bytes, and PCPS_DDEV_s::uc.

Referenced by pcps_read_gps_block(), and pcps_write_gps().

◆ pcps_probe_device()

int pcps_probe_device ( PCPS_DDEV pddev,
PCPS_BUS_NUM  bus_num,
PCPS_SLOT_NUM  dev_fnc_num 
)

Probe if a device is supported, and allocate and setup the device structure.

This function should be called by the probe routine of any target-specific kernel driver. If the device is supported then all specific information including supported features is read from the device and stored in sub-structures of the device structure addressed by pdev.

Parameters
[in,out]pddevPointer to the device structure which has been initialized and will be set up
[in]bus_numThe bus number if supported (e.g. PCI), else 0
[in]dev_fnc_numThe device/function number if supported (e.g. PCI), else 0
Returns
MBG_SUCCESS if the requested feature is supported, MBG_ERR_NOT_SUPP_BY_DEV if not supported, or one of the other MBG_ERROR_CODES
See also
pcps_cleanup_device
pcps_chk_dev_feat

Definition at line 5409 of file pcpsdrvr.c.

Referenced by pcps_cleanup_device(), pcps_detect_isa_devices(), and pcps_release_rsrcs().

◆ pcps_read_gps_block()

static int pcps_read_gps_block ( PCPS_DDEV pddev,
uint8_t  data_type,
void FAR buffer,
uint16_t  count,
uint8_t  block_num,
uint8_t  block_size 
)
static

Get a block of data from a GPS device.

This static function is used by pcps_read_gps.

Parameters
[in]pddevPointer to the device structure
[in]data_typeThe code assigned to the data type, see PC_GPS_CMD_CODES
[out]bufferA buffer with data to be read according to the data_type
[in]countThe number of bytes to be read according to the data_type
[in]block_numA buffer with data to be written according to the type code
[in]block_sizeThe number of bytes to be written according to the type code
Returns
MBG_SUCCESS on success, MBG_ERR_TIMEOUT if device didn't respond in time, MBG_ERR_INV_TYPE if the device didn_t recognize the data type, MBG_ERR_NBYTES if the number of parameter bytes did not match the number of data bytes expected by the device, or one of the other MBG_RETURN_CODES

Definition at line 3342 of file pcpsdrvr.c.

References _mbg_kdd_msg_4, _pcps_read, MBG_LOG_DEBUG, mbg_rc_is_error, pcps_check_gps_data_size(), pcps_init_gps_transfer(), PCPS_READ_GPS_DATA, report_ret_val(), and PCPS_DDEV_s::size_n_bytes.

Referenced by pcps_read_gps().

◆ pcps_release_rsrcs()

void pcps_release_rsrcs ( PCPS_DDEV pddev)

Release I/O port and memory resource that have been claimed before.

Parameters
[in,out]pddevThe device structure

Definition at line 4411 of file pcpsdrvr.c.

Referenced by pcps_cleanup_device().

◆ pcps_wait_busy()

__mbg_inline int pcps_wait_busy ( PCPS_DDEV pddev)

Wait as long as a device is busy, or until timeout.

Used by the Device read functions to wait after the command byte has been written until the requested data has been made available by the device.

Parameters
[in]pddevPointer to the device structure
Returns
MBG_SUCCESS on success, or MBG_ERR_TIMEOUT
See also
Device read functions

Definition at line 1981 of file pcpsdrvr.c.

References _pcps_ddev_status_busy, _pcps_ddev_timeout_clk, _pcps_time_after, clock, MBG_ERR_TIMEOUT, and MBG_SUCCESS.

Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), pcps_read_std(), and report_ret_val().

◆ ptp270pex_can_flag_ready()

static bool ptp270pex_can_flag_ready ( const PCPS_DDEV pddev)
static

Check if a PTP270PEX card can indicate when it's ready.

A PTP270PEX card must be accessed by the driver only after it has finished booting. Otherwise the host system may be locked up.

On HW v2 cards the firmware can indicate when the card is ready to be accessed, so this can be checked by the driver. On these cards the on-board GPIO3 pin is hardwired to 0 to indicate this is supported, whereas on older v1 cards the GPIO3 pin is pulled up to 1.

Parameters
[in]pddevPointer to the device structure
Returns
true if the card can flag "ready"
See also
ptp270pex_has_flagged_ready

Definition at line 869 of file pcpsdrvr.c.

References _mbg_kdd_msg_1, _mbg_kdd_msg_3, _pcps_ddev_type_name, PCPS_DEV_CFG::bus_num, PCPS_DEV::cfg, PCPS_DDEV_s::dev, MBG_LOG_DEBUG, mbg_plx_read_pecs_reg(), PCI_DEVICE_ID_PLX_8111, PCI_SUCCESS, PLX_PECS_GPIOCTL, and PLX_PECS_GPIOCTL_GPIO3_DATA.

Referenced by wait_ptp270pex_ready().

◆ ptp270pex_has_flagged_ready()

static bool ptp270pex_has_flagged_ready ( const PCPS_DDEV pddev)
static

Check if a PTP270PEX card indicates it is ready.

A PTP270PEX card must be accessed by the driver only after it has finished booting. Otherwise the host system may be locked up.

On HW v2 cards the firmware can indicate when the card is ready to be accessed, so the driver can call this function to check this.

Note
The function ptp270pex_can_flag_ready should have been called before to check if the card actually supports this.
Parameters
[in]pddevPointer to the device structure
Returns
true if the card has flagged "ready"
See also
ptp270pex_can_flag_ready

Definition at line 979 of file pcpsdrvr.c.

References _mbg_inp32_to_cpu, _pcps_ddev_io_base_mapped, PLX_LCS_CNTRL, and PLX_LCS_CNTRL_USERI.

Referenced by wait_ptp270pex_ready().

◆ report_access_mode()

◆ report_io_cmd()

◆ report_probe_device()

◆ report_ret_val()

◆ report_uptime()

static void report_uptime ( const MBG_SYS_UPTIME p_uptime)
static

Report the system uptime.

This is mainly used for debugging, and informational.

Parameters
[in]p_uptimeThe system uptime
See also
wait_ptp270pex_ready
MAX_BOOT_TIME_PTP270PEX

Definition at line 1011 of file pcpsdrvr.c.

References _mbg_kdd_msg_1, _mbg_kdd_msg_2, MAX_BOOT_TIME_PTP270PEX, and MBG_LOG_INFO.

Referenced by wait_ptp270pex_ready().

◆ rsrc_port_to_cfg_port()

static void rsrc_port_to_cfg_port ( PCPS_SHORT_PORT_RSRC p_short_port_rsrc,
const MBG_IOPORT_RSRC p_io_rsrc 
)
static

Convert a raw I/O base address to a short format.

See notes for PCPS_SHORT_PORT_RSRC.

Parameters
[out]p_short_port_rsrcPointer to a variable that takes up the converted address
[in]p_io_rsrcPointer to a variable with the address to be converted

Definition at line 4878 of file pcpsdrvr.c.

References PCPS_SHORT_PORT_RSRC::base, MBG_IOPORT_RSRC::base_raw, MBG_IOPORT_RSRC::num, and PCPS_SHORT_PORT_RSRC::num.

Referenced by pcps_probe_device().

◆ set_access_mode()

static void set_access_mode ( PCPS_DDEV pddev,
uint  mode,
bool  forced,
PCPS_READ_FNC read_fnc 
)
static

◆ setup_mm_addr()

static int setup_mm_addr ( PCPS_DDEV pddev)
static

Setup the memory mapped addresses depending on the device type.

Parameters
[in]pddevPointer to the device structure
Returns
MBG_SUCCESS on success, else one of the MBG_ERROR_CODES

Definition at line 1183 of file pcpsdrvr.c.

References _mbg_kdd_msg_1, _pcps_ddev_is_pci_mbgpex, _pcps_ddev_is_pci_pex8311, FAR, MBG_LOG_INFO, MBG_SUCCESS, PCPS_RSRC_INFO::mem, PCPS_DDEV_s::mm_asic_addr, PCPS_DDEV_s::mm_tstamp_addr, PCPS_DDEV_s::rsrc_info, and MBG_IOMEM_RSRC::start_mapped.

Referenced by pcps_probe_device().

◆ setup_sernum_and_receiver_info()

int setup_sernum_and_receiver_info ( PCPS_DDEV pddev)

Read the serial number and receiver info from the device.

The retrieved information is stored in the associated fields of the sub-structures of pddev.

Parameters
[in,out]pddevPointer to a device structure
Returns
MBG_SUCCESS on success, else one of the MBG_ERROR_CODES

Definition at line 4097 of file pcpsdrvr.c.

Referenced by pcps_probe_device().

◆ str_remove_unprintables()

static bool str_remove_unprintables ( char *  s,
size_t  max_len 
)
static

Remove unprintable characters from a string.

Parameters
[in,out]sPointer to the string.
[in]max_lenSize of the string buffer.
Returns
true if any unprintable characters have been removed, else false

Definition at line 3716 of file pcpsdrvr.c.

Referenced by beautify_sernum().

◆ wait_ptp270pex_ready()

static void wait_ptp270pex_ready ( const PCPS_DDEV pddev)
static

Wait until a PTP270PEX card is ready after power-up.

A PTP270PEX card must be accessed by the driver only after it has finished booting. Otherwise the host system may be locked up.

Parameters
[in]pddevPointer to the device structure
See also
ptp270pex_can_flag_ready
ptp270pex_has_flagged_ready
report_uptime
MAX_BOOT_TIME_PTP270PEX

Definition at line 1065 of file pcpsdrvr.c.

References _mbg_kdd_msg_2, MAX_BOOT_TIME_PTP270PEX, mbg_delta_sys_time_ms(), mbg_get_sys_time(), mbg_get_sys_uptime(), MBG_LOG_INFO, mbg_sleep_sec(), ptp270pex_can_flag_ready(), ptp270pex_has_flagged_ready(), and report_uptime().

Referenced by pcps_probe_device().

Variable Documentation

◆ gps_ri_feature_names

const char* gps_ri_feature_names[N_GPS_FEATURE] = DEFAULT_GPS_FEATURE_NAMES
static

A table of name strings associated with GPS_FEATURE_BITS.

Definition at line 733 of file pcpsdrvr.c.

Referenced by check_ri_features().

◆ pc_cycles_frequency

MBG_PC_CYCLES_FREQUENCY pc_cycles_frequency
static

Clock frequency of the PC's cycles counter, in [Hz].

An attempt to determine this value is made at the beginning of the pcps_probe_device routine. If the cycles frequency value is 0 then the target system doesn't supported this, or the value couldn't be determined. In this case it's not possible to convert a number of cycles to an associatred time interval.

Definition at line 661 of file pcpsdrvr.c.

Referenced by pcps_probe_device(), report_io_cmd(), and report_ret_val().

◆ pcps_feature_names

const char* pcps_feature_names[N_PCPS_FEATURE_BITS] = PCPS_FEATURE_NAMES
static

A table of name strings associated with PCPS_FEATURE_BITS.

Definition at line 744 of file pcpsdrvr.c.

Referenced by check_ri_features(), and get_pcps_feature_name().

◆ ri_feat_tbl

uint32_t ri_feat_tbl[N_GPS_FEATURE]
static

A table used to map RECEIVER_INFO::features to PCPS_DEV_CFG::features.

The enumerated GPS_FEATURE_BITS can be used as index to this table, and the table entry contains a combination of associated PCPS_FEATURE_MASKS, if there are any.

Note
Devices which support a configurable time scale do also support reading/writing the GPS UTC parameters via the PC bus. This is not explicitly coded in the RECEIVER_INFO::features since the the RECEIVER_INFO structure can also be read via the serial port, and reading/writing the GPS UTC parameters via the serial port is supported by all GPS devices anyway.
Devices which support reading MBG_RAW_IRIG_DATA via the PC bus interface also support reading PCPS_IRIG_TIME. However, there is no associated flag in RECEIVER_INFO::features since this call is not supported via the serial interface. Thus we use the GPS_HAS_RAW_IRIG_DATA flag to check both features.
See also
GPS_FEATURE_BITS
PCPS_FEATURE_MASKS

Definition at line 688 of file pcpsdrvr.c.

Referenced by check_ri_features().

◆ str_empty

const char str_empty[] = ""
static

Definition at line 642 of file pcpsdrvr.c.

Referenced by check_feature(), pcps_probe_device(), and report_ret_val().

◆ str_spc_gps

const char str_spc_gps[] = " GPS"
static

Definition at line 646 of file pcpsdrvr.c.

Referenced by report_ret_val().

◆ str_unkn_braced

const char str_unkn_braced[] = "(unknown)"
static