DOKK / manpages / debian 12 / libeegdev-dev / egd_close.3.en
EGD_CLOSE(3) EEGDEV library manual EGD_CLOSE(3)

egd_close - close a device

#include <eegdev.h>

int egd_close(struct eegdev* dev);

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.

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

egd_close() will fail if:

dev is NULL.
2010 EPFL