Real-time neural, BCI, and assistive-input integration layer for EoS.
ENI provides a standardized, vendor-neutral framework to integrate brain-computer interfaces (BCI), neural decoders, and assistive input systems into the EoS embedded OS platform.
git clone https://github.com/embeddedos-org/eni.git
cd eni
# Build (minimal + framework + neuralink)
cmake -B build -DENI_BUILD_TESTS=ON
cmake --build build
# Minimal only (MCU targets)
cmake -B build -DENI_BUILD_MIN=ON -DENI_BUILD_FRAMEWORK=OFF
# Without Neuralink
cmake -B build -DENI_PROVIDER_NEURALINK=OFF
# With EIPC integration
cmake -B build -DENI_EIPC_ENABLED=ON
# Cross-compile for ARM
cmake -B build-arm -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_SYSTEM_NAME=Linux
cmake --build build-armββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ENI Neural Interface β
β β
β ββββββββββββββββ ββββββββββββββββ βββββββββββββββββββββββββ
β β Neuralink β β Simulator β β Generic / Custom ββ
β β 1024ch 30kHz β β Test data β β Vendor-agnostic ββ
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββ¬βββββββββββββββββ
β β β β β
β ββββββββΌβββββββββββββββββββΌβββββββββββββββββββΌββββββββββββ β
β β Provider Framework β β
β β eni_provider_ops_t (init/read/deinit) β β
β ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ β
β β Common Layer β β
β β Events Β· Policy Β· Config Β· Logging Β· EIPC Bridge β β
β β DSP Β· Neural Net Β· Decoder Β· Feedback Β· Stimulator β β
β ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββ ββββββΌβββββββββ β
β β ENI-Min β β ENI-Frameworkβ β
β β (MCU) β β (App Proc) β β
β β filter β β connectors β β
β β normalizer β β pipeline β β
β β mapper β β orchestrator β β
β β tool bridgeβ β β β
β βββββββββββββββ βββββββββββββββ β
β β β β
β ββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββ β
β β EIPC Bridge β EAI Agent β β
β β Neural intents β AI tool calls β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Config | Option | Description |
|---|---|---|
| Minimal | ENI_BUILD_MIN=ON |
Lightweight runtime for resource-constrained MCUs. Input normalization, signal filtering, event mapping, tool bridge. Minimal RAM footprint. |
| Framework | ENI_BUILD_FRAMEWORK=ON |
Full industrial platform with connectors, pipeline orchestration, advanced signal processing. For application processors (RPi, i.MX8M, x86). |
Both configurations share the common library (events, providers, policy, DSP, neural net, decoder, feedback, EIPC bridge).
ENI includes a Neuralink adapter (providers/neuralink/) that provides:
- 1024-channel electrode support at 30kHz sampling rate
- 4 operating modes: raw data, decoded signals, intent classification, motor output
- Signal processing: bandpass filter (0.5β300Hz), 60Hz notch filter, baseline calibration
- Intent decoder: classifies neural energy into
idle,attention,motor_intent,motor_execute - Calibration: automatic baseline computation over configurable duration
- Streaming API: packet-based data acquisition with callback support
#include "neuralink.h"
eni_nl_config_t cfg = {
.mode = ENI_NL_MODE_INTENT,
.channels = 256,
.sample_rate = 30000,
.filter_enabled = 1,
.bandpass_low_hz = 0.5f,
.bandpass_high_hz = 300.0f,
.auto_calibrate = 1,
.on_intent = my_intent_handler,
};
eni_neuralink_init(&cfg);
eni_neuralink_connect("neuralink-n1-001");
eni_neuralink_calibrate(5000);
eni_neuralink_start_stream();
while (running) {
eni_nl_packet_t pkt;
eni_neuralink_read_packet(&pkt);
char intent[32];
float confidence;
eni_neuralink_decode_intent(&pkt, intent, sizeof(intent), &confidence);
}| Provider | Description | Status |
|---|---|---|
| neuralink | Neuralink BCI adapter β 1024 channels, intent decoding, calibration | β Implemented |
| eeg | EEG headset provider β multi-channel EEG with FFT band-power analysis | β Implemented |
| simulator | BCI signal simulator for testing without hardware | β Implemented |
| stimulator_sim | Stimulation output simulator with safety interlocks | β Implemented |
| generic | Generic neural signal decoder β vendor-agnostic | β Implemented |
New adapters can be added by implementing the eni_provider_ops_t interface:
typedef struct {
const char *name;
int (*init)(void *ctx);
int (*read)(void *ctx, void *buf, int len);
void (*deinit)(void *ctx);
} eni_provider_ops_t;| Module | Header | Description |
|---|---|---|
| DSP | eni/dsp.h |
Digital signal processing β FIR/IIR filters, FFT, power spectral density |
| Neural Net | eni/nn.h |
Lightweight neural network β dense layers, ReLU, softmax, inference |
| Decoder | eni/decoder.h |
Intent decoder β feature extraction, classification, confidence scoring |
| Feedback | eni/feedback.h |
Haptic/visual/audio neurofeedback β closed-loop BCI training |
| Stimulator | eni/stimulator.h |
Electrical stimulation output β waveform generation, charge balancing |
| Stim Safety | eni/stim_safety.h |
Stimulation safety β charge limits, impedance checks, emergency stop |
| Events | eni/event.h |
Event system β neural events, state changes, error notifications |
| Config | eni/config.h |
Configuration management β profiles, runtime tuning |
eni/
βββ common/ # Shared library
β βββ include/eni/ # Types, events, config, DSP, NN, decoder, feedback
β βββ src/ # Implementation
βββ min/ # Minimal runtime (MCU targets)
β βββ include/eni_min/ # Signal processor, decoder, feedback, service
β βββ src/ # Lightweight implementations
βββ framework/ # Full framework (app processors)
β βββ include/eni_fw/ # Signal processor, decoder, feedback
β βββ src/ # Advanced implementations
βββ providers/ # Hardware adapters
β βββ neuralink/ # Neuralink 1024-channel BCI
β βββ eeg/ # EEG headset provider
β βββ simulator/ # Signal simulator
β βββ stimulator_sim/ # Stimulation simulator
βββ cli/ # CLI tool (main.c)
βββ tests/ # Unit tests (7 test suites)
βββ CMakeLists.txt # Build configuration
cmake -B build -DENI_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure| Test | Covers |
|---|---|
test_dsp |
FIR/IIR filters, FFT, spectral analysis |
test_nn |
Dense layers, activations, forward pass |
test_decoder |
Feature extraction, intent classification |
test_provider_eeg |
EEG provider init, channel read, band power |
test_stimulator |
Waveform generation, charge balancing |
test_stim_safety |
Charge limits, impedance checks, emergency stop |
test_bci_pipeline |
End-to-end BCI pipeline (acquire β process β classify β act) |
test_event_feedback |
Event dispatch, feedback loop |
| Workflow | Schedule | Coverage |
|---|---|---|
| CI | Every push/PR | Build matrix (Linux Γ Windows Γ macOS) + tests |
| Nightly | 2:00 AM UTC daily | Full build + test + cross-compile + regression report |
| Weekly | Monday 6:00 AM UTC | Comprehensive build + dependency audit |
| EoSim Sanity | 4:00 AM UTC daily | EoSim install validation (3 OS Γ 3 Python) + simulation |
| Simulation Test | 3:00 AM UTC daily | QEMU/EoSim platform simulation |
| Release | Tag v*.*.* |
Validate β cross-compile β GitHub Release with artifacts |
| Project | Repository | Purpose |
|---|---|---|
| eos | embeddedos-org/eos | Embedded OS β HAL, RTOS kernel, services |
| eai | embeddedos-org/eai | AI layer β receives ENI intents via EIPC |
| eipc | embeddedos-org/eipc | IPC transport between ENI and EAI |
| eboot | embeddedos-org/eboot | Bootloader β secure boot, A/B slots |
| ebuild | embeddedos-org/ebuild | Build system β SDK generator, packaging |
| eosim | embeddedos-org/eosim | Multi-architecture simulator |
This project is part of the EoS ecosystem and aligns with international standards including ISO/IEC/IEEE 15288:2023, ISO/IEC 12207, ISO/IEC/IEEE 42010, ISO/IEC 25000, ISO/IEC 25010, ISO/IEC 27001, ISO/IEC 15408, IEC 61508, ISO 26262, DO-178C, FIPS 140-3, POSIX (IEEE 1003), WCAG 2.1, and more. See the EoS Compliance Documentation for full details.
MIT License β see LICENSE for details.