Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00071 #ifndef __MTOUCHCVD_H
00072 #define __MTOUCHCVD_H
00073
00075
00077 #include <htc.h>
00078 #include "includes/mTouchCVD_Config.h"
00079
00081
00083 extern unsigned char mTouchCVD_dataReady;
00084 extern unsigned char ButtonState [CVD_NUMBER_SENSORS];
00085 extern unsigned int Average [CVD_NUMBER_SENSORS];
00086 extern unsigned int CVDSensorData [CVD_NUMBER_SENSORS];
00087 extern unsigned int sensor_data [CVD_NUMBER_SENSORS];
00088
00090
00092
00094 extern enum CVD_ButtonState
00095 {
00096 CVD_INITIALIZING,
00097 CVD_RELEASED,
00098 CVD_PRESSED
00099 };
00100
00102
00104 void CVD_Decode (void);
00105 void mTouchCVD_Init (void);
00106 void CVD_Filter_UpdateAverage(unsigned int, unsigned char);
00107 void CVD_Filter_Init (void);
00108
00109
00110 #if defined(CVD_DEBUG) && (CVD_DEBUG == 1)
00111 void mTouchCVD_Comm_Init (void);
00112 void send_Data (void);
00113 #endif
00114
00116
00118
00119 #define CVD_GetButtonState(i) ButtonState[i] ///< Abstraction macro for the current button state
00120 #define mTouchCVD_Service() mTouchCVD_dataReady = 0; CVD_Decode() ///< Abstraction macro for servicing new mTouch data
00121 #define mTouchCVD_isDataReady() mTouchCVD_dataReady ///< Abstraction macro for checking if new data is ready for processing
00122 #define CVD_SetButtonState(state, i) ButtonState[i] = state ///< Abstraction macro for changing button state
00123 #define CVD_GetAverage(i) Average[i] ///< Abstraction macro for array access
00124 #define CVDGetSensor(i) CVDSensorData[i] ///< Abstraction macro for array access
00125
00126
00128
00129
00130
00131
00132
00133
00134
00135
00136
00138
00139
00140 #if defined(_16F1827) || defined(_16LF1827) || defined(_16F1826) || defined(_16LF1826) || defined(_16F1823) || defined(_16LF1823) || defined(_12F1822) || defined(_12LF1822) || defined(_16F1824) || defined(_16LF1824) || defined(_16F1825) || defined(_16LF1825) || defined(_16F1828) || defined(_16LF1828) || defined(_16F1829) || defined(_16LF1829)
00141 #include "includes/mTouchCVD_HardwareProfile_16F182x.h"
00142 #define _16F182x
00143 #elif defined(_16F1933) || defined(_16LF1933) || defined(_16F1934) || defined(_16LF1934) || defined(_16F1936) || defined(_16LF1936) || defined(_16F1937) || defined(_16LF1937) || defined(_16F1938) || defined(_16LF1938) || defined(_16F1939) || defined(_16LF1939)
00144 #include "includes/mTouchCVD_HardwareProfile_16F193x.h"
00145 #define _16F193x
00146 #elif defined(_16F1946) || defined(_16LF1946) || defined(_16F1947) || defined(_16LF1947)
00147 #include "includes/mTouchCVD_HardwareProfile_16F194x.h"
00148 #define _16F194x
00149 #elif defined(_16F1526) || defined(_16LF1526) || defined(_16F1527) || defined(_16LF1527)
00150 #include "includes/mTouchCVD_HardwareProfile_16F152x.h"
00151 #define _16F152x
00152 #elif defined(_16F1516) || defined(_16LF1516) || defined(_16F1517) || defined(_16LF1517) || defined(_16F1518) || defined(_16LF1518) || defined(_16F1519) || defined(_16LF1519)
00153 #include "includes/mTouchCVD_HardwareProfile_16F151x.h"
00154 #define _16F151x
00155 #elif defined(_12F615) || defined(_12HV615) || defined(_12F617)
00156 #include "includes/mTouchCVD_HardwareProfile_12F61x.h"
00157 #define _12F61x
00158 #else
00159 #error The currently chosen processor is not yet supported by the mTouch CVD Framework.
00160 #endif
00161
00162
00163 #if defined(_PIC14E)
00164
00165 #include "includes/mTouchCVD_macroLibrary_PIC16F1.h"
00166 #elif defined(_PIC14)
00167
00168 #include "includes/mTouchCVD_macroLibrary_PIC16F.h"
00169 #else
00170 #error The currently chosen processor core does not have a matching macroLibrary file associated with it.
00171 #endif
00172
00173
00174 #include "includes/mTouchCVD_processConfiguration.h"
00176
00177 #endif
00178
00179