It seems you have an
ancient version of Teensyduino.
i had copied the text from the copy of eeprom.h at the location that was suggested by Paul. this was in fact an ancient installation that is not (i think) being used. i have the latest teensyduino installed and the only location i can install to does have the newer eeprom.h.
when i compile a sketch in the arduino IDE, it lists the newer location as the source for eeprom.h so i guess i could delete the old stuff.
i read the datasheet for the chip but can not make sense out of the description of the eeprom wear leveling.
is it safe to leave the following code? i only need to write 10 bytes of data to eeprom but other programs might need more in the future.
does the wear leveling automatically adjust based on amount of data written? should i even worry about this? i am building a controller for a still and write the temperature setting and heater pwm to eeprom every time the user changes the values so it will be there on powerup.
how many write cycles can i assume with the default? if i want to increase this as much as possible, what E2END should i use for each of the teensy 3 variants
#ifndef _AVR_EEPROM_H_
#define _AVR_EEPROM_H_ 1
#include <stddef.h>
#include <stdint.h>
#include "avr_functions.h"
#if defined(__MK20DX128__) || defined(__MK20DX256__)
#define E2END 0x7FF
#elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
#define E2END 0xFFF
#elif defined(__MKL26Z64__)
#define E2END 0x7F
#else
#define E2END 0
#endif
#endif