1 /* am7xxx - communication with AM7XXX based USB Pico Projectors and DPFs
3 * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include <libusb-1.0/libusb.h>
25 typedef libusb_device_handle *am7xxx_device;
28 AM7XXX_PACKET_TYPE_INIT = 0x01,
29 AM7XXX_PACKET_TYPE_IMAGE = 0x02,
30 AM7XXX_PACKET_TYPE_POWER = 0x04,
31 AM7XXX_PACKET_TYPE_UNKNOWN = 0x05,
35 AM7XXX_IMAGE_FORMAT_JPEG = 1,
36 } am7xxx_image_format;
42 AM7XXX_POWER_HIGH = 3,
45 struct am7xxx_image_header {
52 struct am7xxx_power_header {
59 * Examples of packet headers:
62 * 02 00 00 00 00 10 3e 10 01 00 00 00 20 03 00 00 e0 01 00 00 53 E8 00 00
65 * 04 00 00 00 00 0c ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
68 struct am7xxx_header {
75 struct am7xxx_image_header image;
76 struct am7xxx_power_header power;
80 am7xxx_device am7xxx_init(void);
81 void am7xxx_shutdown(am7xxx_device dev);
83 int am7xxx_send_image(am7xxx_device dev,
84 am7xxx_image_format format,
90 #endif /* __AM7XXX_H */