blob: 05dbf11a4d63c8d3faa5d742ebba3475faa54e93 [file] [log] [blame]
Markus Grabner705ecec2009-02-27 19:43:04 -08001/*
Chris Rorvickc078a4a2015-01-20 02:20:50 -06002 * Line 6 Linux USB driver
Markus Grabner705ecec2009-02-27 19:43:04 -08003 *
Markus Grabner1027f472010-08-12 01:35:30 +02004 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
Markus Grabner705ecec2009-02-27 19:43:04 -08005 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, version 2.
9 *
10 */
11
12#ifndef MIDIBUF_H
13#define MIDIBUF_H
14
Stefan Hajnoczi269edc82013-01-11 23:08:09 +010015struct midi_buffer {
Markus Grabner705ecec2009-02-27 19:43:04 -080016 unsigned char *buf;
17 int size;
18 int split;
19 int pos_read, pos_write;
20 int full;
21 int command_prev;
22};
23
Stefan Hajnoczi269edc82013-01-11 23:08:09 +010024extern int line6_midibuf_bytes_used(struct midi_buffer *mb);
25extern int line6_midibuf_bytes_free(struct midi_buffer *mb);
26extern void line6_midibuf_destroy(struct midi_buffer *mb);
27extern int line6_midibuf_ignore(struct midi_buffer *mb, int length);
28extern int line6_midibuf_init(struct midi_buffer *mb, int size, int split);
29extern int line6_midibuf_read(struct midi_buffer *mb, unsigned char *data,
Markus Grabnere1a164d2010-08-23 01:08:25 +020030 int length);
Stefan Hajnoczi269edc82013-01-11 23:08:09 +010031extern void line6_midibuf_reset(struct midi_buffer *mb);
32extern int line6_midibuf_skip_message(struct midi_buffer *mb,
Markus Grabnere1a164d2010-08-23 01:08:25 +020033 unsigned short mask);
Stefan Hajnoczi269edc82013-01-11 23:08:09 +010034extern void line6_midibuf_status(struct midi_buffer *mb);
35extern int line6_midibuf_write(struct midi_buffer *mb, unsigned char *data,
Markus Grabner1027f472010-08-12 01:35:30 +020036 int length);
Markus Grabner705ecec2009-02-27 19:43:04 -080037
Markus Grabner705ecec2009-02-27 19:43:04 -080038#endif