xtos_ bci_ check_ impedance
Requests impedance checking and copies the first num_channels integer kΩ results to caller storage.
On this page
Declaration
#include <xtos/bci.h>
int xtos_bci_check_impedance(xtos_bci_session_t *session,
uint32_t *impedances_kohm,
uint32_t num_channels);Parameters
| Parameter | Type | Description |
|---|---|---|
| session | xtos_bci_session_t * | Non-NULL session handle. |
| impedances_kohm | uint32_t * | Non-NULL output array with at least num_channels entries, in integer kΩ. |
| num_channels | uint32_t | Count from 1 through 32. |
Return value
Returns 0 and writes results when ioctl and arguments succeed; returns -1 otherwise.
Errors
| errno | Condition |
|---|---|
| EINVAL | session/output is NULL, or num_channels is zero or greater than 32. |
| EOPNOTSUPP | The device does not support impedance checking; the public Cyton path returns an unsupported result and must not be replaced with invented values. |
| ENOTTY/system errno | Unknown 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.