libam7xxx 0.1
Communication library for Actions Micro AM7XXX based USB projectors and DPFs
Loading...
Searching...
No Matches
am7xxx.h
Go to the documentation of this file.
1/* am7xxx - communication with AM7XXX based USB Pico Projectors and DPFs
2 *
3 * Copyright (C) 2012-2014 Antonio Ospite <ao2@ao2.it>
4 *
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.
9 *
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.
14 *
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/>.
17 */
18
24#ifndef __AM7XXX_H
25#define __AM7XXX_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31
37struct _am7xxx_context;
38typedef struct _am7xxx_context am7xxx_context;
39
45struct _am7xxx_device;
46typedef struct _am7xxx_device am7xxx_device;
47
56typedef struct {
57 unsigned int native_width;
58 unsigned int native_height;
60
76
84
106
129
137int am7xxx_init(am7xxx_context **ctx);
138
145
158
175 am7xxx_device **dev,
176 unsigned int device_index);
177
189
202 am7xxx_device_info *device_info);
203
221 unsigned int upscale,
222 unsigned int original_width,
223 unsigned int original_height,
224 unsigned int *scaled_width,
225 unsigned int *scaled_height);
243 am7xxx_image_format format,
244 unsigned int width,
245 unsigned int height,
246 unsigned char *image,
247 unsigned int image_size);
248
269 am7xxx_image_format format,
270 unsigned int width,
271 unsigned int height,
272 unsigned char *image,
273 unsigned int image_size);
274
290
310
311#ifdef __cplusplus
312}
313#endif
314
315#endif /* __AM7XXX_H */
am7xxx_zoom_mode
The display zoom modes.
Definition am7xxx.h:122
@ AM7XXX_ZOOM_H
Zoom 1: H Scale (changes aspect ratio).
Definition am7xxx.h:124
@ AM7XXX_ZOOM_ORIGINAL
Original Size, as retrieved via am7xxx_device_info.
Definition am7xxx.h:123
@ AM7XXX_ZOOM_TELE
Zoom Tele: available on some PicoPix models.
Definition am7xxx.h:127
@ AM7XXX_ZOOM_TEST
Zoom test screen, the firmware version is shown as well.
Definition am7xxx.h:126
@ AM7XXX_ZOOM_H_V
Zoom 2: H/V Scale (changes aspect ratio).
Definition am7xxx.h:125
am7xxx_log_level
The verbosity level of logging messages.
Definition am7xxx.h:68
@ AM7XXX_LOG_ERROR
Error messages, typically they describe API functions failures.
Definition am7xxx.h:70
@ AM7XXX_LOG_INFO
Informations about the device operations.
Definition am7xxx.h:72
@ AM7XXX_LOG_DEBUG
Informations about the library internals.
Definition am7xxx.h:73
@ AM7XXX_LOG_WARNING
Warnings about conditions worth mentioning to the user.
Definition am7xxx.h:71
@ AM7XXX_LOG_FATAL
Fatal messages, the user application should stop if it gets one of this.
Definition am7xxx.h:69
@ AM7XXX_LOG_TRACE
Verbose informations about the communication with the hardware.
Definition am7xxx.h:74
int am7xxx_calc_scaled_image_dimensions(am7xxx_device *dev, unsigned int upscale, unsigned int original_width, unsigned int original_height, unsigned int *scaled_width, unsigned int *scaled_height)
Calculate the dimensions of an image to be shown on an am7xxx device.
Definition am7xxx.c:1269
am7xxx_power_mode
The device power modes.
Definition am7xxx.h:99
@ AM7XXX_POWER_HIGH
More brightness, but more power consumption.
Definition am7xxx.h:103
@ AM7XXX_POWER_OFF
Display is powered off, no image shown.
Definition am7xxx.h:100
@ AM7XXX_POWER_TURBO
Max brightness and power consumption.
Definition am7xxx.h:104
@ AM7XXX_POWER_LOW
Low power consumption but also low brightness.
Definition am7xxx.h:101
@ AM7XXX_POWER_MIDDLE
Middle level of brightness.
Definition am7xxx.h:102
int am7xxx_get_device_info(am7xxx_device *dev, am7xxx_device_info *device_info)
Get info about an am7xxx device.
Definition am7xxx.c:1221
int am7xxx_send_image_async(am7xxx_device *dev, am7xxx_image_format format, unsigned int width, unsigned int height, unsigned char *image, unsigned int image_size)
Queue transfer of an image for display on an am7xxx device and return immediately.
am7xxx_image_format
The image formats accepted by the device.
Definition am7xxx.h:80
@ AM7XXX_IMAGE_FORMAT_JPEG
JPEG format.
Definition am7xxx.h:81
@ AM7XXX_IMAGE_FORMAT_NV12
Raw YUV in the NV12 variant.
Definition am7xxx.h:82
void am7xxx_shutdown(am7xxx_context *ctx)
Cleanup the library data structures and free the context.
Definition am7xxx.c:1140
void am7xxx_set_log_level(am7xxx_context *ctx, am7xxx_log_level log_level)
Set verbosity level of log messages.
Definition am7xxx.c:1163
int am7xxx_set_power_mode(am7xxx_device *dev, am7xxx_power_mode power)
Set the power mode of an am7xxx device.
Definition am7xxx.c:1402
struct _am7xxx_device am7xxx_device
An opaque data type representing an am7xxx device.
Definition am7xxx.h:46
int am7xxx_close_device(am7xxx_device *dev)
Close an am7xxx_device.
Definition am7xxx.c:1206
int am7xxx_set_zoom_mode(am7xxx_device *dev, am7xxx_zoom_mode zoom)
Set the zoom mode of an am7xxx device.
Definition am7xxx.c:1413
struct _am7xxx_context am7xxx_context
An opaque data type representing a context.
Definition am7xxx.h:38
int am7xxx_init(am7xxx_context **ctx)
Initialize the library context and data structures, and scan for devices.
Definition am7xxx.c:1100
int am7xxx_send_image(am7xxx_device *dev, am7xxx_image_format format, unsigned int width, unsigned int height, unsigned char *image, unsigned int image_size)
Send an image for display on an am7xxx device.
int am7xxx_open_device(am7xxx_context *ctx, am7xxx_device **dev, unsigned int device_index)
Open an am7xxx_device according to a index.
Definition am7xxx.c:1168
A struct describing device specific properties.
Definition am7xxx.h:56
unsigned int native_height
The device native height.
Definition am7xxx.h:58
unsigned int native_width
The device native width.
Definition am7xxx.h:57