EGD_START(3)

πŸ’– EGD_START(3) πŸ’–

okay bestie, so this is a page from the EEGDEV library manual, and it's literally just about starting and stopping buffered acquisition. two functions. that's it. that's the whole vibe. slay.

✨ 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 πŸ¦‹

so egd_start() marks the beginning of buffered acquisition from the device that dev points at. what does that mean fr fr? it means the data starts getting accumulated in an internal ringbuffer ✨, and you can then get that buffered data sequentially by making successive calls to egd_get_data(3).

⚠️ okay and here's the thing, bestie β€” once a buffered acquisition has started, you have to get the data often enough to prevent the situation of a full ringbuffer. no cap. the ringbuffer does not wait for you. it's giving main character energy and you are the one who has to keep up πŸ’…

and egd_stop() halts the buffered acquisition of the device that dev points at, which relieves you from the obligation to get data regularly. iconic. you're free πŸ•ŠοΈ


πŸ’œ RETURN VALUE πŸ’œ

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

😭 yes it literally says "succes" in the original, we don't fix that, we respect the text.

πŸ“ ERRORS πŸ“

egd_start() and egd_stop() will fail if:

  • EINVAL β€” dev is NULL. πŸ™ˆ like, there's no device. there's nothing. it's giving void.

🌈 SEE ALSO 🌈


okay that's the whole page bestie, go start your acquisition and remember to actually read the data or your ringbuffer will fill up and it will be a whole situation πŸ’€βœ¨

this has been the EEGDEV library manual, brought to you by EPFL, dated 2010 β€” yes 2010, a vintage classic, still slaying to this day πŸ‘‘πŸ’–