X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=c3c3087a9d11315a28744db990cc6da4bf31f7f2;hb=cc8a7d250cf7daff452ce376224c9853529204ca;hp=2bf9d41af58a1f92396ed7b0093122fa3d7faaa6;hpb=8233ff53ae7c6e120af4784bc61a036882d5c234;p=libsigrok.git diff --git a/backend.c b/backend.c index 2bf9d41a..c3c3087a 100644 --- a/backend.c +++ b/backend.c @@ -21,13 +21,25 @@ #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; }