Atmel QTouch Library User Guide

Atmel QTouch Library User Guide Atmel QTouch Library User Guide

prochild.co.kr
from prochild.co.kr More from this publisher
11.07.2015 Views

• This API updates the configuration of autonomous QTouch sensor with a setting that isdifferent from the one configured by calling touch_at_sensor_init API.• The user must populate the structure pointed by p_at_param with required settingsbefore calling this API.touch_at_sensor_get_configtouch_ret_t touch_at_sensor_get_config( touch_at_param_t *p_at_param )Arguments Type Commentp_at_param touch_at_param_t* Pointer to autonomous QTouch sensor configurationstructure.• This API retrieves the current configuration of the autonomous QTouch sensor.touch_at_get_libinfotouch_ret_t touch_at_get_libinfo( touch_info_t *p_touch_info)Arguments Type Commentp_touch_info touch_info_t* User passes the memory address at which the library informationis to be updated.• The touch_info_t structure is filled by the library with information on the number ofautonomous QTouch channels (Fixed value of 1), number of autonomous QTouchsensors (Fixed value of 1), number of autonomous QTouch rotors/slider (Fixed value of0), CAT hardware version and library version.Common APIThis section lists the functions that are common to QMatrix, QTouch Group A/B and AutonomousQTouch acquisition methods.touch_event_dispatchervoid touch_event_dispatcher ( void )Arguments Type CommentVoid -• This API needs to be called by the user application to allow the library to process the rawacquisition data from the sensors.• Once touch_qm_sensors_start_acquisition is called, touch_event_dispatcher API needsto be called as frequently as possible by the Host application.• The signals_callback and measure_complete_callback functions are called from thetouch_event_dispatcher API context.touch_deinitvoid touch_deinit (void)Arguments Type Commentvoid -1668207K-AT42-09/11

• This API can be used to de-initalize the Touch Library and disable the CAT module.• Calling this API de-initializes the Touch Library for Sensors corresponding to all methodsof acquisition (QMatrix, QTouch Group A, QTouch Group B and Autonomous QTouch).Integrating QTouch libraries for AT32UC3L in your applicationThis section illustrates the key steps required in integrating the QTouch library in yourapplication.a. For your design, you would need the following information to select the correct libraryvariant• Device to be used for the design – Current library supports AT32UC3L064,AT32UC3L032, AT32UC3L016 device variants.• Compiler platform you intend to use to integrate the libraries.b. Copy the library variant that was selected in step one to your project’s working directoryor update your project to point to the library selected.c. Include touch_api_at32uc3l.h & touch_config_at32uc3l.h header files of the QTouchlibrary in your application. The header files can be found in the library installation folder.d. Initialize/create and use the Touch APIs in your application• Set the various configuration options using the touch_config_at32uc3l.h file.• Initialize and configure the sensors in the Host application.• The Host application also has to provide the required timing so as to performTouch measurement at regular intervals.e. General application notes• Ensure that there are no conflicts between the resources used by the Touchlibrary and the host application• Ensure that the stack size is adjusted to factor in the stack depth required for theoperation of the touch libraries.MISRA Compliance Report of QTouch Library for UC3LThis section lists the compliance and deviations for MISRA standards of coding practice for theUC3L QTouch libraries.What is coveredThe MISRA compliance covers the QTouch library for AT32UC3L devices. The Example projectsand associated code provided is not guaranteed to be MISRA compliant.Target EnvironmentDevelopment EnvironmentMISRA Checking softwareMISRA Rule set appliedIAR Embedded Workbench for Atmel AVR32The MISRA C Compliance has been performed for the libraryusing MISRA C 2004 Rules in IAR Workbench for Atmel AVR32MISRAC 2004 Rule Set, All including advisoryDeviations from MISRA C StandardsThe QTouch library was subjected to the above mentioned MISRA compliance rules. Thefollowing table lists the exceptions in the AT32UC3L QTouch library source code and alsoprovides explanation for these exceptions.Apart from these, there were many exceptions in the standard header files supplied by the toolchain and those are not captured here.167

• This API can be used to de-initalize the Touch <strong>Library</strong> and disable the CAT module.• Calling this API de-initializes the Touch <strong>Library</strong> for Sensors corresponding to all methodsof acquisition (QMatrix, <strong>QTouch</strong> Group A, <strong>QTouch</strong> Group B and Autonomous <strong>QTouch</strong>).Integrating <strong>QTouch</strong> libraries for AT32UC3L in your applicationThis section illustrates the key steps required in integrating the <strong>QTouch</strong> library in yourapplication.a. For your design, you would need the following information to select the correct libraryvariant• Device to be used for the design – Current library supports AT32UC3L064,AT32UC3L032, AT32UC3L016 device variants.• Compiler platform you intend to use to integrate the libraries.b. Copy the library variant that was selected in step one to your project’s working directoryor update your project to point to the library selected.c. Include touch_api_at32uc3l.h & touch_config_at32uc3l.h header files of the <strong>QTouch</strong>library in your application. The header files can be found in the library installation folder.d. Initialize/create and use the Touch APIs in your application• Set the various configuration options using the touch_config_at32uc3l.h file.• Initialize and configure the sensors in the Host application.• The Host application also has to provide the required timing so as to performTouch measurement at regular intervals.e. General application notes• Ensure that there are no conflicts between the resources used by the Touchlibrary and the host application• Ensure that the stack size is adjusted to factor in the stack depth required for theoperation of the touch libraries.MISRA Compliance Report of <strong>QTouch</strong> <strong>Library</strong> for UC3LThis section lists the compliance and deviations for MISRA standards of coding practice for theUC3L <strong>QTouch</strong> libraries.What is coveredThe MISRA compliance covers the <strong>QTouch</strong> library for AT32UC3L devices. The Example projectsand associated code provided is not guaranteed to be MISRA compliant.Target EnvironmentDevelopment EnvironmentMISRA Checking softwareMISRA Rule set appliedIAR Embedded Workbench for <strong>Atmel</strong> AVR32The MISRA C Compliance has been performed for the libraryusing MISRA C 2004 Rules in IAR Workbench for <strong>Atmel</strong> AVR32MISRAC 2004 Rule Set, All including advisoryDeviations from MISRA C StandardsThe <strong>QTouch</strong> library was subjected to the above mentioned MISRA compliance rules. Thefollowing table lists the exceptions in the AT32UC3L <strong>QTouch</strong> library source code and alsoprovides explanation for these exceptions.Apart from these, there were many exceptions in the standard header files supplied by the toolchain and those are not captured here.167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!