gpointer session_id;
};
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
struct alsa *alsa;
return 0;
}
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
struct sigma *sigma = g_malloc(sizeof(struct sigma));
#include <sigrok.h>
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
}
static void hw_stop_acquisition(int device_index, gpointer session_device_id);
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
return SR_OK;
}
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
int devcnt = 0;
return out;
}
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
GSList *ports, *l;
* API callbacks
*/
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
struct libusb_device_descriptor des;
* API callbacks
*/
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
struct sr_device_instance *sdi;
struct libusb_device_descriptor des;
return init(o, DEFAULT_BPL_BITS, MODE_BITS);
}
-static int data_bits(struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+static int data_bits(struct sr_output *o, const char *data_in,
+ uint64_t length_in, char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
return init(o, DEFAULT_BPL_HEX, MODE_HEX);
}
-static int data_hex(struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+static int data_hex(struct sr_output *o, const char *data_in,
+ uint64_t length_in, char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
return init(o, DEFAULT_BPL_ASCII, MODE_ASCII);
}
-static int data_ascii(struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+static int data_ascii(struct sr_output *o, const char *data_in,
+ uint64_t length_in, char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
#include "config.h"
-static int data(struct sr_output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out)
{
char *outbuf;
return SR_OK;
}
-static int data(struct sr_output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out)
{
struct context *ctx;
return SR_OK;
}
-static int data(struct sr_output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out)
{
GString *out;
return 0;
}
-static int data(struct sr_output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out)
{
return SR_OK;
return SR_OK;
}
-static int data(struct sr_output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out)
{
struct context *ctx;
return init(o, DEFAULT_BPL_ASCII, MODE_ASCII);
}
-int data_ascii(struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
+ char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
return init(o, DEFAULT_BPL_BITS, MODE_BITS);
}
-int data_bits(struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
+ char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
return init(o, DEFAULT_BPL_HEX, MODE_HEX);
}
-int data_hex(struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
+ char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#ifndef TEXT_H_
#define TEXT_H_
int init_bits(struct sr_output *o);
-int data_bits(struct sr_output *o, char *data_in, uint64_t length_in,
+int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out);
int init_hex(struct sr_output *o);
-int data_hex(struct sr_output *o, char *data_in, uint64_t length_in,
+int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out);
int init_ascii(struct sr_output *o);
-int data_ascii(struct sr_output *o, char *data_in, uint64_t length_in,
+int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out);
-
-#endif /* TEXT_H_ */
+#endif
/* driver callbacks */
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
{
sessionfile = g_strdup(deviceinfo);
char *description;
int df_type;
int (*init) (struct sr_output *o);
- int (*data) (struct sr_output *o, char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out);
+ int (*data) (struct sr_output *o, const char *data_in,
+ uint64_t length_in, char **data_out, uint64_t *length_out);
int (*event) (struct sr_output *o, int event_type, char **data_out,
uint64_t *length_out);
};
char *name;
char *longname;
int api_version;
- int (*init) (char *deviceinfo);
+ int (*init) (const char *deviceinfo);
void (*cleanup) (void);
/* Device-specific */