![]() |
libsigrok
0.5.2
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 | |
| GSList * | sr_resourcepaths_get (int res_type) |
| Get a list of paths where we look for resource (e.g. More... | |
| 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 250 of file resource.c.
References SR_ERR_ARG, and SR_OK.
Referenced by sr_init().
Here is the caller graph for this function:| GSList* sr_resourcepaths_get | ( | int | res_type | ) |
Get a list of paths where we look for resource (e.g.
firmware) files.
| res_type | The type of resource to get the search paths for. |
Definition at line 47 of file resource.c.
References SR_RESOURCE_FIRMWARE.
1.8.10