X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=c3c3087a9d11315a28744db990cc6da4bf31f7f2;hb=488a13b110d3563194dd63e087e295a4aa114002;hp=4edc78123b41269d5c8aba4e7902956ec53bcc78;hpb=484760d1a8a26ba830b3d63d1451dc30985babd1;p=libsigrok.git diff --git a/backend.c b/backend.c index 4edc7812..c3c3087a 100644 --- a/backend.c +++ b/backend.c @@ -19,14 +19,27 @@ #include #include +#include -int sigrok_init(void) +/** + * Initialize libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +int sr_init(void) { return load_hwplugins(); } -/* TODO: Should return int to be able to report back error codes. */ -void sigrok_cleanup(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +int sr_exit(void) { - device_close_all(); + + sr_cleanup_hwplugins(); + + return SR_OK; }