You could pass constants over 8 bits in size, generating very confusing
values
Signed-off-by: Michel Pollet <buserror@gmail.com>
*/
#define AVR_MCU_EXTERNAL_PORT_PULL(_port, _mask, _val) \
AVR_MCU_LONG(AVR_MMCU_TAG_PORT_EXTERNAL_PULL, \
- (((unsigned long)(_port) << 16) | \
- ((unsigned long)(_mask) << 8) | \
- (_val)));
+ (((unsigned long)((_port)&0xff) << 16) | \
+ ((unsigned long)((_mask)&0xff) << 8) | \
+ ((_val)&0xff)));
/*!
* This tag allows you to specify the voltages used by your board