.\"Copyright 2010 (c) EPFL .TH EGD_CLOSE 3 2010 "EPFL" "EEGDEV library manual" .SH NAME egd_close - close a device .SH SYNOPSIS .LP .B #include .sp .BI "int egd_close(struct eegdev* " dev ");" .br .SH DESCRIPTION .LP \fBegd_close\fP() frees all resources associated to the device referenced by \fIdev\fP and closes it. It stops also implicitely any running acquisition. .LP After a successful call to \fBegd_close\fP(), the reference \fIdev\fP cannot be used any longer. .SH "RETURN VALUE" .LP The function returns 0 in case of succes. Otherwise, \-1 is returned and \fIerrno\fP is set accordingly. .SH ERRORS .LP \fBegd_close\fP() will fail if: .TP .B EINVAL \fIdev\fP is NULL.