PIC32MZ: Fix some repeated typos and work around an issue with passing defined parameters to a macro that takes multiple parameters

This commit is contained in:
Gregory Nutt 2015-02-26 15:39:57 -06:00
parent a688cdc2ee
commit 7378a97c74
2 changed files with 544 additions and 536 deletions

View File

@ -71,10 +71,18 @@
* does not provide sufficient information. The output pin definitions include both the
* register value and the register address and the following helper macros can be used
* extract one or the other.
*
* NOTE: These odd macro forms are used to work around a pre-processor issue. The argument
* to PPS_OUTPUT_REGADDR is defined to have the form nn,xxxx but the preprocessor would
* claim that only one parameter is passed. The following version takes only one parameter
* and keeps the pre-processor happy.
*/
#define PPS_OUTPUT_REGADDR(a,b) ((uintptr_t)(b))
#define PPS_OUTPUT_REGVAL(a,b) ((uint32_t(a))
#define __PPS_OUTPUT_REGADDR(a,b) ((uintptr_t)(b))
#define PPS_OUTPUT_REGADDR(a) __PPS_OUTPUT_REGADDR(a)
#define __PPS_OUTPUT_REGVAL(a,b) ((uint32_t)(a))
#define PPS_OUTPUT_REGVAL(a) __PPS_OUTPUT_REGVAL(a)
/********************************************************************************************
* Public Types

File diff suppressed because it is too large Load Diff