2019-05-31 04:09:32 -04:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2009-02-27 22:43:04 -05:00
|
|
|
/*
|
2015-01-20 03:20:50 -05:00
|
|
|
* Line 6 Linux USB driver
|
2009-02-27 22:43:04 -05:00
|
|
|
*
|
2010-08-11 19:35:30 -04:00
|
|
|
* Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
|
2009-02-27 22:43:04 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MIDIBUF_H
|
|
|
|
#define MIDIBUF_H
|
|
|
|
|
2022-12-25 05:57:27 -05:00
|
|
|
#define LINE6_MIDIBUF_READ_TX 0
|
|
|
|
#define LINE6_MIDIBUF_READ_RX 1
|
|
|
|
|
2013-01-11 17:08:09 -05:00
|
|
|
struct midi_buffer {
|
2009-02-27 22:43:04 -05:00
|
|
|
unsigned char *buf;
|
|
|
|
int size;
|
|
|
|
int split;
|
|
|
|
int pos_read, pos_write;
|
|
|
|
int full;
|
|
|
|
int command_prev;
|
|
|
|
};
|
|
|
|
|
2013-01-11 17:08:09 -05:00
|
|
|
extern int line6_midibuf_bytes_used(struct midi_buffer *mb);
|
|
|
|
extern int line6_midibuf_bytes_free(struct midi_buffer *mb);
|
|
|
|
extern void line6_midibuf_destroy(struct midi_buffer *mb);
|
|
|
|
extern int line6_midibuf_ignore(struct midi_buffer *mb, int length);
|
|
|
|
extern int line6_midibuf_init(struct midi_buffer *mb, int size, int split);
|
|
|
|
extern int line6_midibuf_read(struct midi_buffer *mb, unsigned char *data,
|
2022-12-25 05:57:27 -05:00
|
|
|
int length, int read_type);
|
2013-01-11 17:08:09 -05:00
|
|
|
extern void line6_midibuf_reset(struct midi_buffer *mb);
|
|
|
|
extern int line6_midibuf_write(struct midi_buffer *mb, unsigned char *data,
|
2010-08-11 19:35:30 -04:00
|
|
|
int length);
|
2009-02-27 22:43:04 -05:00
|
|
|
|
|
|
|
#endif
|