---
name: "egd_start"
section: "3"
platform: "linux"
package: "libeegdev-dev"
version: "0.2-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/egd_start"
---

# egd\_start(3)

start and stop buffered acquisition

## NAME

egd\_start, egd\_stop - start and stop buffered acquisition

## SYNOPSIS

**#include \<eegdev.h\>**

**int egd\_start(struct eegdev\*** *dev***);**\
 **int egd\_stop(struct eegdev\*** *dev***);**\

## DESCRIPTION

**egd\_start**() marks the beginning of buffered acquisition from the device referenced by *dev*. This means that the data starts getting accumulated in an internal ringbuffer and this buffered data can be sequentially obtained by successive calls to [**egd\_get\_data**(3)](/egd_get_data/3.md). A buffered acquisition started implies that the user has to get the data often enough to prevent the situation of a full ringbuffer.

**egd\_stop**() halts the buffered acquisition of the device referenced by *dev*, relieving the user from the obligation to get data regularly.

## RETURN VALUE

The function returns 0 in case of succes. Otherwise, -1 is returned and *errno* is set accordingly.

## ERRORS

**egd\_start**() and **egd\_stop**() will fail if:

- **EINVAL**

  *dev* is NULL.

## SEE ALSO

[**egd\_get\_data**(3)](/egd_get_data/3.md), [**egd\_get\_available**(3)](/egd_get_available/3.md)
