Follow

"Can't convert address of const into non-const ptr." when using the eeprom_memcpy() function. (KB210)

Question Detail
I encounter an error when using the eeprom_memcpy() function. The example in the Rev 2 Neuron C Reference Guide results in an error of: "Can't convert address of const into non- const ptr."
 
Solution
The example on page 3-40 of the Rev 2 Neuron C Reference Guide is incorrect. See the code snippet below for an appropriate usage example.
 
eeprom far widget[100];
far ram_buf[100];
 
when ( . . . ) { . . .
// Turn-on relaxed casting to allow
// the RAM-to-EEPROM copy to occur.
#pragma relaxed_casting_on
eeprom_memcpy(widget, ram_buf, 100);
#pragma relaxed_casting_off
. . . }
Related Products
  • LonBuilder 3.01
  • Neuron C
  • NodeBuilder 1.5
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk