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

# egd\_close(3)

close a device

## NAME

egd\_close - close a device

## SYNOPSIS

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

**int egd\_close(struct eegdev\*** *dev***);**\

## DESCRIPTION

**egd\_close**() frees all resources associated to the device referenced by *dev* and closes it. It stops also implicitely any running acquisition.

After a successful call to **egd\_close**(), the reference *dev* cannot be used any longer.

## RETURN VALUE

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

## ERRORS

**egd\_close**() will fail if:

- **EINVAL**

  *dev* is NULL.
