Torsten Schenk | c6d43ba | 2011-01-24 18:45:30 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Linux driver for TerraTec DMX 6Fire USB |
| 3 | * |
| 4 | * Author: Torsten Schenk <torsten.schenk@zoho.com> |
| 5 | * Created: Jan 01, 2011 |
Torsten Schenk | c6d43ba | 2011-01-24 18:45:30 +0100 | [diff] [blame] | 6 | * Copyright: (C) Torsten Schenk |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | */ |
| 13 | #ifndef USB6FIRE_COMM_H |
| 14 | #define USB6FIRE_COMM_H |
| 15 | |
| 16 | #include "common.h" |
| 17 | |
| 18 | enum /* settings for comm */ |
| 19 | { |
| 20 | COMM_RECEIVER_BUFSIZE = 64, |
| 21 | }; |
| 22 | |
| 23 | struct comm_runtime { |
| 24 | struct sfire_chip *chip; |
| 25 | |
| 26 | struct urb receiver; |
Jussi Kivilinna | ddb6b5a9 | 2013-08-06 14:53:24 +0300 | [diff] [blame] | 27 | u8 *receiver_buffer; |
Torsten Schenk | c6d43ba | 2011-01-24 18:45:30 +0100 | [diff] [blame] | 28 | |
| 29 | u8 serial; /* urb serial */ |
| 30 | |
| 31 | void (*init_urb)(struct comm_runtime *rt, struct urb *urb, u8 *buffer, |
| 32 | void *context, void(*handler)(struct urb *urb)); |
| 33 | /* writes control data to the device */ |
| 34 | int (*write8)(struct comm_runtime *rt, u8 request, u8 reg, u8 value); |
| 35 | int (*write16)(struct comm_runtime *rt, u8 request, u8 reg, |
| 36 | u8 vh, u8 vl); |
| 37 | }; |
| 38 | |
Bill Pemberton | 87f9796 | 2012-12-06 12:35:28 -0500 | [diff] [blame] | 39 | int usb6fire_comm_init(struct sfire_chip *chip); |
Torsten Schenk | c6d43ba | 2011-01-24 18:45:30 +0100 | [diff] [blame] | 40 | void usb6fire_comm_abort(struct sfire_chip *chip); |
| 41 | void usb6fire_comm_destroy(struct sfire_chip *chip); |
| 42 | #endif /* USB6FIRE_COMM_H */ |
| 43 | |