first time posting here
I'm currently porting some code for an embedded device. Basically getting everything to work with a new compiler (AVR-GCC) from an out-of-date existing proprietary compiler
I've come across this strange looking (to me anyway!) variable in a struct. I can't work out what it is with the parentheses. It is in a struct which is used for raw values:
float (*tc)( float value );
My IDE highlights 'value' as a compiler keyword, just like 'float' so I don't know if this is AVR-GCC specific?
This is then used in a function which has a float argument called 'reading' and it tries to return the following:
return (raw[rCN3].tc)( reading );
The line above actually causes the program to attempt to access out of bounds memory.
I haven't seen code like this before so was wondering if anyone could help me decipher it? It worked with the old compiler but is causing a problem with AVR-GCC
Thanks in advance. Alex