Library for MI0283QT-2 LCD
Embed:
(wiki syntax)
Show/hide line numbers
calibrate.h
00001 /* 00002 * 00003 * Copyright (c) 2001, Carlos E. Vidales. All rights reserved. 00004 * 00005 * This sample program was written and put in the public domain 00006 * by Carlos E. Vidales. The program is provided "as is" 00007 * without warranty of any kind, either expressed or implied. 00008 * If you choose to use the program within your own products 00009 * you do so at your own risk, and assume the responsibility 00010 * for servicing, repairing or correcting the program should 00011 * it prove defective in any manner. 00012 * You may copy and distribute the program's source code in any 00013 * medium, provided that you also include in each copy an 00014 * appropriate copyright notice and disclaimer of warranty. 00015 * You may also modify this program and distribute copies of 00016 * it provided that you include prominent notices stating 00017 * that you changed the file(s) and the date of any change, 00018 * and that you do not charge any royalties or licenses for 00019 * its use. 00020 * 00021 * 00022 * File Name: calibrate.h 00023 * 00024 * 00025 * Definition of constants and structures, and declaration of functions 00026 * in Calibrate.c 00027 * 00028 */ 00029 00030 #ifndef _CALIBRATE_H_ 00031 00032 #define _CALIBRATE_H_ 00033 00034 /****************************************************/ 00035 /* */ 00036 /* Included files */ 00037 /* */ 00038 /****************************************************/ 00039 00040 #include <math.h> 00041 00042 00043 /****************************************************/ 00044 /* */ 00045 /* Definitions */ 00046 /* */ 00047 /****************************************************/ 00048 00049 #ifndef _CALIBRATE_C_ 00050 #define EXTERN extern 00051 #else 00052 #define EXTERN 00053 #endif 00054 00055 00056 00057 #ifndef OK 00058 #define OK 0 00059 #define NOT_OK 1 00060 #endif 00061 00062 00063 00064 #define INT32 long 00065 00066 00067 00068 00069 /****************************************************/ 00070 /* */ 00071 /* Structures */ 00072 /* */ 00073 /****************************************************/ 00074 00075 00076 typedef struct Point { 00077 INT32 x, 00078 y ; 00079 } POINT ; 00080 00081 00082 00083 typedef struct Matrix { 00084 /* This arrangement of values facilitates 00085 * calculations within getDisplayPoint() 00086 */ 00087 INT32 An, /* A = An/Divider */ 00088 Bn, /* B = Bn/Divider */ 00089 Cn, /* C = Cn/Divider */ 00090 Dn, /* D = Dn/Divider */ 00091 En, /* E = En/Divider */ 00092 Fn, /* F = Fn/Divider */ 00093 Divider ; 00094 } MATRIX ; 00095 00096 00097 00098 00099 /****************************************************/ 00100 /* */ 00101 /* Function declarations */ 00102 /* */ 00103 /****************************************************/ 00104 00105 00106 EXTERN unsigned char setCalibrationMatrix( POINT * display, 00107 POINT * screen, 00108 MATRIX * matrix) ; 00109 00110 00111 EXTERN unsigned char getDisplayPoint( POINT * display, 00112 POINT * screen, 00113 MATRIX * matrix ) ; 00114 00115 00116 #endif /* _CALIBRATE_H_ */ 00117
Generated on Fri Jul 15 2022 19:54:13 by 1.7.2