X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=8f5fd1f449e8e26b3efa11c10f2c09713036c72a;hb=003f9bebf9f97225b08383573544c1ece7239aea;hp=6a49cde7c83cf01a253fc409ebc1a0ce55506147;hpb=a1bb33afbde769156ad4bef7a60579da64aebbb7;p=libsigrok.git diff --git a/backend.c b/backend.c index 6a49cde7..8f5fd1f4 100644 --- a/backend.c +++ b/backend.c @@ -19,22 +19,26 @@ #include #include "sigrok.h" +#include "sigrok-internal.h" -int sigrok_init(void) +/** + * Initialize libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +SR_API int sr_init(void) { - int ret; - - ret = load_hwplugins(); - - return ret; + return load_hwplugins(); } - -void sigrok_cleanup(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +SR_API int sr_exit(void) { + sr_cleanup_hwplugins(); - device_close_all(); - + return SR_OK; } - -