X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=backend.c;h=c3c3087a9d11315a28744db990cc6da4bf31f7f2;hb=a562c3a2e5e54dbb7e0553422ac0e0c845b180ad;hp=17983cd7a51a9537fffb8f5e30c5f94229f2b66c;hpb=2bf4aca64ad435a09359662446762840ac55db1d;p=libsigrok.git diff --git a/backend.c b/backend.c index 17983cd7..c3c3087a 100644 --- a/backend.c +++ b/backend.c @@ -19,14 +19,27 @@ #include #include +#include +/** + * 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 sr_exit(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +int sr_exit(void) { - sr_device_close_all(); + + sr_cleanup_hwplugins(); + + return SR_OK; }