Generates and executes a configured version of the CVD acquisition routine. More...
Data Structures | |
union | mTouch_AcquisitionData |
Structure used to implement both a 12-bit and a 20-bit variable inside a single 32-bit array. More... | |
Functions | |
void | mTouch_Scan (void) |
Implements the framework's active-mode acquisition routine. Sometimes implemented as an ISR, sometimes as a normal function. | |
mTouch Acquisition ISR Variables | |
These variables are used by the ISR of the mTouch Framework and should not be directly accessed by the main loop application. | |
uint16_t | mTouch_lastResult |
Stores the last active-mode ADC result for differential calculation. | |
uint8_t | mTouch_delayCount |
Delay counter variable used in CVD scan sequence. | |
uint8_t | mTouch_jitter = 0x55 |
Stores the current random seed value for jittering. | |
Polishing/Finishing Macros | |
These macros perform scaling and final operations before setting the mTouchCVD_dataReady flag and allowing the main loop application to process the new data. | |
#define | STORE_SENSOR(index) |
Scales the accumulated result of the CVD acquisition and stores it for main-application access. | |
#define | EXIT_SENSOR(index) |
Increments the given index variable and exits the ISR. | |
#define | EXIT_LAST_SENSOR(index) |
Performs several important functions after all sensors have been scanned. | |
#define | SET_DATA_READY_FLAG() |
Sets the dataReady flag to signal the main application of a new reading. |
Generates and executes a configured version of the CVD acquisition routine.
The mTouch Acquisition module generates an assembly implementation of the interrupt service routine that is designed to maximize noise immunity and minimize execution time. It will automatically add and remove macros as the number of sensors in the application changes. By default, it will use the previously scanned sensor as the reference for the current scan. If the application only has a single sensor, a special acquisition method which does not require a reference sensor is used. This specialized method should not be used in systems with more than one sensor due to crosstalk concerns.
#define EXIT_LAST_SENSOR | ( | index ) |
Performs several important functions after all sensors have been scanned.
[in] | index | the index variable to reset to 0 Resets the index variable to 0 for the next scan, decrements the oversampling counter to determine if it is time to complete the sample and store the result, and then exits the ISR. |
Definition at line 655 of file mTouch_macroLibrary_common.h.
#define EXIT_SENSOR | ( | index ) |
Increments the given index variable and exits the ISR.
[in] | index | the index variable to increment |
Definition at line 612 of file mTouch_macroLibrary_common.h.
#define SET_DATA_READY_FLAG | ( | ) |
Sets the dataReady flag to signal the main application of a new reading.
Definition at line 695 of file mTouch_macroLibrary_common.h.
#define STORE_SENSOR | ( | index ) |
Scales the accumulated result of the CVD acquisition and stores it for main-application access.
[in] | index | the index of the sensor to be scaled and stored This macro uses the MTOUCH_SCALING configuration option to determine which scaling option to choose. |
Definition at line 598 of file mTouch_macroLibrary_common.h.
void mTouch_Scan | ( | void | ) |
Implements the framework's active-mode acquisition routine. Sometimes implemented as an ISR, sometimes as a normal function.
Implements the acquisition process for the mTouch Framework. Please do not modify.
Definition at line 186 of file mTouch_acquistion.c.
uint8_t mTouch_delayCount |
Delay counter variable used in CVD scan sequence.
Definition at line 76 of file mTouch_acquistion.c.
uint8_t mTouch_jitter = 0x55 |
Stores the current random seed value for jittering.
Definition at line 92 of file mTouch_acquistion.c.
uint16_t mTouch_lastResult |
Stores the last active-mode ADC result for differential calculation.
Definition at line 75 of file mTouch_acquistion.c.