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

The code can be copied using the “copy code” and pasted in the main.c andtouch_qm_config file,a. In touch_qm_config.h,Copy the following header definitions as part of the preprocessor directives inthe project space or in the beginning of the file#define NUM_X_PORTS 2#define PORT_X_1#define PORT_X_2#define PORT_YA#define PORT_YB#define SMP_PORTBDDCD#define SMP_PIN 7b. In main.c ,Copy the code as belowx_line_info_t x_line_info[NUM_X_LINES]= {FILL_OUT_X_LINE_INFO(1,1);FILL_OUT_X_LINE_INFO(2,2);FILL_OUT_X_LINE_INFO(1,3);FILL_OUT_X_LINE_INFO(2,0);};y_line_info_t ya_line_info[NUM_Y_LINES]= {FILL_OUT_YA_LINE_INFO(1);FILL_OUT_YA_LINE_INFO(3);};y_line_info_t yb_line_info[NUM_Y_LINES]= {FILL_OUT_YB_LINE_INFO(1);FILL_OUT_YB_LINE_INFO(3);};MISRA Compliance ReportThis section lists the compliance and deviations for MISRA standards of coding practice for theQTouch and QMatrix acquisition method libraries.What is coveredThe QTouch and QMatrix acquisition method libraries adhere to the MISRA standards. Theadditional reference code provided in the form of sample applications is not guaranteed to beMISRA compliant.1108207K-AT42-09/11

Target EnvironmentDevelopment EnvironmentMISRA Checking softwareMISRA Rule set appliedIAR Embedded WorkbenchThe MISRA C Compliance has been performed for the libraryusing MISRA C 2004 Rules in IAR Workbench developmentenvironment.MISRAC 2004 Rule SetDeviations from MISRA C StandardsQTouch acquisition method librariesThe QTouch acquisition method libraries were subject to the above mentioned MISRAcompliance rules. The following exceptions have not been fixed as they are required for theimplementation of the library.ApplicableReleaseQTouch libraries version4.4Rule No Rule Description Exception noted / How it is addressed1.1 Rule states that all codeshall conform to ISO 9899standard C, with noextensions permitted.This Rule is not supported as the libraryimplementation requires IAR extensions like__interrupt. These intrinsic functions relate todevice hardware functionality, and cannot10.1 Rule states that implicitconversion from Underlyinglong to unsigned long10.6 This Rule says that a 'U'suffix shall be applied to allconstants of 'unsigned' type14.4 Rule states that go-tostatement should not beused.Rule states that In thedefinition of a function-like19.10 macro, each instance of aparameter shall be enclosedin parenthesis19.12 Rule states that there shallbe at most one occurrenceof the # or ## preprocessoroperator in a single macrodefinitionQMatrix acquisition method librariespractically be avoided.The library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.The library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.The library uses conditional jump instructions toreduce the code footprint at a few locations andthis is localized to small snippets of code. Hencethis rule is not supported.There is one instance where the library breaks thisrule where two macro definitions are combined toform a different symbol name. Usage ofparenthesis cannot be used in this scenario.There is one instance in the library where this ruleis violated where the library concatenates twomacro definitions to arrive at a different definition.The QMatrix acquisition method software was subject to the above mentioned MISRA compliancerules. The following exceptions have not been fixed as they are required for the implementation ofthe library.111

Target EnvironmentDevelopment EnvironmentMISRA Checking softwareMISRA Rule set appliedIAR Embedded WorkbenchThe MISRA C Compliance has been performed for the libraryusing MISRA C 2004 Rules in IAR Workbench developmentenvironment.MISRAC 2004 Rule SetDeviations from MISRA C Standards<strong>QTouch</strong> acquisition method librariesThe <strong>QTouch</strong> acquisition method libraries were subject to the above mentioned MISRAcompliance rules. The following exceptions have not been fixed as they are required for theimplementation of the library.ApplicableRelease<strong>QTouch</strong> libraries version4.4Rule No Rule Description Exception noted / How it is addressed1.1 Rule states that all codeshall conform to ISO 9899standard C, with noextensions permitted.This Rule is not supported as the libraryimplementation requires IAR extensions like__interrupt. These intrinsic functions relate todevice hardware functionality, and cannot10.1 Rule states that implicitconversion from Underlyinglong to unsigned long10.6 This Rule says that a 'U'suffix shall be applied to allconstants of 'unsigned' type14.4 Rule states that go-tostatement should not beused.Rule states that In thedefinition of a function-like19.10 macro, each instance of aparameter shall be enclosedin parenthesis19.12 Rule states that there shallbe at most one occurrenceof the # or ## preprocessoroperator in a single macrodefinitionQMatrix acquisition method librariespractically be avoided.The library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.The library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.The library uses conditional jump instructions toreduce the code footprint at a few locations andthis is localized to small snippets of code. Hencethis rule is not supported.There is one instance where the library breaks thisrule where two macro definitions are combined toform a different symbol name. Usage ofparenthesis cannot be used in this scenario.There is one instance in the library where this ruleis violated where the library concatenates twomacro definitions to arrive at a different definition.The QMatrix acquisition method software was subject to the above mentioned MISRA compliancerules. The following exceptions have not been fixed as they are required for the implementation ofthe library.111

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

Saved successfully!

Ooh no, something went wrong!