X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=e2b7a466a9aab052e1680fad6d00dc3c367940bc;hb=b2b5445c304ee2a6fe352e9b33f1e695a6760da5;hp=9ce8c5b1ac3c6c1acbbacf63e6e71142696418e3;hpb=1b452b8510922bac08db87f8ea769515c795e22f;p=libsigrok.git diff --git a/backend.c b/backend.c index 9ce8c5b1..e2b7a466 100644 --- a/backend.c +++ b/backend.c @@ -1,7 +1,7 @@ /* * This file is part of the sigrok project. * - * Copyright (C) 2010 Bert Vermeulen + * Copyright (C) 2010-2012 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,14 +18,27 @@ */ #include -#include +#include "libsigrok.h" +#include "libsigrok-internal.h" -int sigrok_init(void) +/** + * Initialize libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +SR_API int sr_init(void) { - return load_hwplugins(); + return SR_OK; } -void sigrok_cleanup(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +SR_API int sr_exit(void) { - device_close_all(); + sr_hw_cleanup_all(); + + return SR_OK; }