XTOS / OPEN SOURCE REAL-TIME SYSTEMOPEN SOURCE · VERSION 0.9.0 · BUILD FROM SOURCE
libxtos-bcixtos_bci_check_impedance

xtos_bci_check_impedance

Requests impedance checking and copies the first num_channels integer kΩ results to caller storage.

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 at OpenXTOS commit dd313955ad57542bcd2af8827157d1bbd0cf5e83.