![]() |
libsigrok
0.4.0
sigrok hardware access and backend library
|
Access to resource files. More...
#include <config.h>#include <errno.h>#include <stdio.h>#include <glib.h>#include <glib/gstdio.h>#include <libsigrok/libsigrok.h>#include "libsigrok-internal.h"
Include dependency graph for resource.c:Go to the source code of this file.
Functions | |
| int | sr_resource_set_hooks (struct sr_context *ctx, sr_resource_open_callback open_cb, sr_resource_close_callback close_cb, sr_resource_read_callback read_cb, void *cb_data) |
| Install resource access hooks. More... | |
Access to resource files.
Definition in file resource.c.
| int sr_resource_set_hooks | ( | struct sr_context * | ctx, |
| sr_resource_open_callback | open_cb, | ||
| sr_resource_close_callback | close_cb, | ||
| sr_resource_read_callback | read_cb, | ||
| void * | cb_data | ||
| ) |
Install resource access hooks.
| ctx | libsigrok context. Must not be NULL. |
| open_cb | Resource open callback, or NULL to unset. |
| close_cb | Resource close callback, or NULL to unset. |
| read_cb | Resource read callback, or NULL to unset. |
| cb_data | User data pointer passed to callbacks. |
| SR_OK | Success. |
| SR_ERR_ARG | Invalid argument. |
Definition at line 217 of file resource.c.
References sr_resource::handle, sr_resource::size, SR_ERR_ARG, SR_OK, SR_PRIV, and sr_resource::type.
Referenced by sr_init().
Here is the caller graph for this function:
1.8.11