X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=fc914e18cd47710ee193f0d6045b032f9a2e6009;hb=94799bc4dc6ab1ba64cdb7f0fb350d63d4fcee66;hp=9ce8c5b1ac3c6c1acbbacf63e6e71142696418e3;hpb=1b452b8510922bac08db87f8ea769515c795e22f;p=libsigrok.git diff --git a/backend.c b/backend.c index 9ce8c5b1..fc914e18 100644 --- a/backend.c +++ b/backend.c @@ -19,13 +19,26 @@ #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(); } -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; }