1 /* am7xxx - communication with AM7XXX based USB Pico Projectors and DPFs
3 * Copyright (C) 2012 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 2 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/>.
27 struct _am7xxx_context;
28 typedef struct _am7xxx_context am7xxx_context;
30 struct _am7xxx_device;
31 typedef struct _am7xxx_device am7xxx_device;
34 AM7XXX_IMAGE_FORMAT_JPEG = 1,
35 AM7XXX_IMAGE_FORMAT_NV12 = 2,
36 } am7xxx_image_format;
41 AM7XXX_POWER_MIDDLE = 2,
42 AM7XXX_POWER_HIGH = 3,
43 AM7XXX_POWER_TURBO = 4,
46 int am7xxx_init(am7xxx_context **ctx);
48 void am7xxx_shutdown(am7xxx_context *ctx);
50 int am7xxx_open_device(am7xxx_context *ctx,
52 unsigned int device_index);
54 int am7xxx_close_device(am7xxx_device *dev);
56 int am7xxx_get_device_info(am7xxx_device *dev,
57 unsigned int *native_width,
58 unsigned int *native_height,
59 unsigned int *unknown0,
60 unsigned int *unknown1);
62 int am7xxx_send_image(am7xxx_device *dev,
63 am7xxx_image_format format,
70 * NOTE: if we set the mode to AM7XXX_POWER_OFF we can't turn the
71 * display on again by using only am7xxx_set_power_mode().
73 * Remember to mention that when writing the API doc.
75 int am7xxx_set_power_mode(am7xxx_device *dev, am7xxx_power_mode mode);
81 #endif /* __AM7XXX_H */