|
|
|
|
|
by swatcoder
511 days ago
|
|
That's possible, but unlikely given conventions in embedded development and how something like this interface would generally need to work. More likely (but not necessarily), Nordic's early example was either bugged or conditionally valid (benefiting from other implicit details of their implementation) and then was revised either because the mistake was identified or something else about the example change. That's all pretty common in this domain. Inadvertently stumbling because you uncritically followed some vendor example is also pretty common and completely understandable. Better tools, like using a language with richer semantics, are indeed something that can help with that. |
|
BTW, you can see the assumptions of the non-embedded programmers talking about "taking ownership" being the default interpretation of a signature like that...if you don't have a heap, what does that even mean?
In any case, C is a mess, embedded is a mess, no argument there!