avr8 : changed -1 to 0xffff since UINT16 have been used (nw)