X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=e67f48247af5192e942c0b26806824a190e5baf4;hb=fefd54a0cdd4b2d30c36e53ea2ecdce6ff4b96ea;hp=6a49cde7c83cf01a253fc409ebc1a0ce55506147;hpb=a1bb33afbde769156ad4bef7a60579da64aebbb7;p=libsigrok.git diff --git a/backend.c b/backend.c index 6a49cde7..e67f4824 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 @@ -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 SR_OK; } - -void sigrok_cleanup(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +SR_API int sr_exit(void) { + sr_hw_cleanup_all(); - device_close_all(); - + return SR_OK; } - -