Good morning
Is there a way to memcpy from SFR's in the C51?
I have tried to memcpy((char*)&buffer, (char*)&CAN0IF2DA1L, 8); but it doesn't work
Other things i tried
memcpy((char*)&buffer, CAN0IF2DA1L, 8); //error C214: illegal pointer conversion
memcpy((char*)&buffer, (char*)&CAN0IF2DA1L, 8); //error C189: '&' on bit/sfr illegal
Any ideas?
Richard
Andy Neil said:given that SFR space isn't indirectly accessible, I guess the whole question is moot?
Agreed
Andy Neil said:and, as we're only talking 8 bytes anyhow, eight direct assignments is almost certainly going to be the quickest solution.
Length is dynamic but in my case maximum of 8 bytes
Andy Neil said:Unless the chip has some DMA tricks ...
No tricks here