X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=b52766474d0d98eb929e5722aee1b8b4dd29f4f5;hb=b53738baf76219237e0a6629905981d7a1f2508e;hp=46b7397f09112ca5eb328c9f621548d9bb77d6fc;hpb=a00ba012288726678e1a270961c8d4f46f3dbd33;p=libsigrok.git diff --git a/backend.c b/backend.c index 46b7397f..b5276647 100644 --- a/backend.c +++ b/backend.c @@ -19,14 +19,26 @@ #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_cleanup(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +int sr_exit(void) { - device_close_all(); + sr_device_close_all(); + + return SR_OK; }