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
Comments