AnsweredAssumed Answered

_mem_copy is backwards

Question asked by Matthew Kendall on Oct 30, 2013
Latest reply on Aug 17, 2015 by keno

This is both a short rant a warning for others. In mqx.h (line 1247) we find:

#define _mem_copy(s,d,l) memcpy(d,s,l)

Note the subtle reversing of the order of the arguments. And the same thing applies to all the higher level abstractions built on top of this (e.g. USB_mem_copy). They are all backwards. For the love of God why would you do that? Are you trying to trip people up? I mean, why follow a convention that has only been fixed since the late 70's.

Seriously, is there a good reason for this?

Outcomes