Efc was not declared in this scope.

Can anybody guide me on how I may go about correcting this error. I am unable to load a sketch. Ran a couple of sketches on a Teensy 3.0 and they worked fine until I attempted to load the attached sketch. I commented lines that only apply to the Teensy 3.0

This line is tagged with the error.

const int kBitsResolution = 16; //currently we always send 16-bits per sample

stimsyncArd:20: error: 'Efc' was not declared in this scope
stimsyncArd:20: error: 'Efc' was not declared in this scopestimsyncArd:20: error: 'p_efc' was not declared in this scope
stimsyncArd:20: error: expected primary-expression before 'ul_fcr'
stimsyncArd:20: error: expression list treated as compound expression in initializer [-fpermissive]

Any help would be appreciated. Thank you for your time.

stimsyncArd.ino (40.1 KB)

Which board have you got selected in the IDE ?

I have Teensy 3.0 selected as the board in the IDE. Ran blinking LED sketches to test if they were loading properly and they worked just fine.ß

Where do you think that Efc is defined? I see NOTHING in the code that should define what an Efc is. Apparently, the compiler can't, either.

Thats what Im trying to figure out. Been looking at the code and cant seem to find where exactly the issue is. The line of code I mentioned is the only one that is getting an error but that looks fine to me.

that is getting an error but that looks fine to me.

Really? So, exactly what IS an Efc? Use as many words as you need to to tell us what an Efc is.

I was having the same issue with this code. The Efc stuff is a bunch of arcana from the Atmel API for talking to the device memory on the Arduino Due. It looks like the developer is trying to get the code to work with as many boards as possible which is admirable.

The good news is if you aren't running a Due then just delete out the chunk causing headaches. I did and after that it verified, compiled and uploaded just fine.

In the version I have, the block to delete starts at line 308:

#ifdef NO_EEPROM //the Due does not have EEPROM - write to FLASH instead!

It ends at 348 which looks like:

#endif //ifdef NO_EEPROM

Late but I figure I stop by and let you know that it all worked. I got it working with your recommendations. Thank you.