QTouch acquisition method libraries for 2K devices

The QTouch acquisition method libraries were subject to the above mentioned MISRA compliance rules. The following exceptions have not been fixed as they are required for the implementation of the library.

Applicable Release

QTouch libraries

 

Rule No

Rule Description

Exception noted / How it is addressed

1.1

Rule states that all code shall conform to ISO 9899 standard C, with no extensions permitted.

This Rule is not supported as the library implementation requires IAR extensions like __interrupt. These intrinsic functions relate to device hardware functionality, and cannot practically be avoided.

10.1

Rule states that implicit conversion from Underlying long to unsigned long

The library uses macros to combine symbol definitions to form a unique expanded symbol name and in this, the usage of unsigned qualifiers for numeric constants (e.g. 98u) causes name mangling. This is the only occurrence of this error in the library.

10.6

This Rule says that a 'U' suffix shall be applied to all constants of 'unsigned' type

The library uses macros to combine symbol definitions to form a unique expanded symbol name and in this, the usage of unsigned qualifiers for numeric constants (e.g. 98u) causes name mangling. This is the only occurrence of this error in the library.

14.4

Rule states that go-to statement should not be used.

The library uses conditional jump instructions to reduce the code footprint at a few locations and this is localized to small snippets of code. Hence this rule is not supported.

19.10

Rule states that In the definition of a function-like macro, each instance of a parameter shall be enclosed in parenthesis

There is one instance where the library breaks this rule where two macro definitions are combined to form a different symbol name. Usage of parenthesis cannot be used in this scenario.

19.12

Rule states that there shall be at most one occurrence of the # or ## preprocessor operator in a single macro definition

There is one instance in the library where this rule is violated where the library concatenates two macro definitions to arrive at a different definition.