XTOS / OPEN SOURCE REAL-TIME SYSTEMOPEN SOURCE · 1.0.2 · PRERELEASE · IMAGES & SOURCE
libxtos-bcixtos_bci_check_impedance

xtos_bci_check_impedance

The generic API copies integer-kΩ results when the driver supports them. Pinned v1.0.2 Cyton does not: it returns EOPNOTSUPP and leaves output untouched.

On this page

Declaration

c
#include <xtos/bci.h>

int xtos_bci_check_impedance(xtos_bci_session_t *session,
                            uint32_t *impedances_kohm,
                            uint32_t num_channels);

Parameters

ParameterTypeDescription
sessionxtos_bci_session_t *Non-NULL session handle.
impedances_kohmuint32_t *Non-NULL output array with at least num_channels entries, in integer kΩ.
num_channelsuint32_tCount from 1 through 32.

Return value

Returns 0 and writes results when ioctl and arguments succeed; returns -1 otherwise.

Errors

errnoCondition
EINVALsession/output is NULL, or num_channels is zero or greater than 32.
EOPNOTSUPPThe device does not support impedance checking; the public Cyton path returns an unsupported result and must not be replaced with invented values.
ENOTTY/system errnoUnknown ioctl or other driver failure returns the corresponding errno.

Notes

  • The implementation receives into a fixed 32-entry stack array, then copies the requested count; the caller owns the output array.
  • The public API limits count but does not verify the device’s actual channel count or provide thread safety.

Example

Source

This reference describes headers and implementation in OpenXTOS v1.0.2 (c24e923717670c4724cdaf24c7c105caee8dc2fb).