This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Here is an h file with a definition....It is being used as a lookup in a library file for a UART...
why the error??
Are you including stdint.h before this .h file?
Is uint8_t highlighted red?
This works fine for me:
const uint8_t dummy[2][2][2] = {{{0,0},{0,0}},
{{0,0}, {0,0}}
};
Yes stdint.h is included....The strange thing is every time I click on one of the highlighted issues the code opens a new version of the h file rather than just jumping to the line of the open file??
Turns out it DOESN'T LIKE the //COMMENTS after each line....If I remove them on a multi liine piece of code it seems to be happy...Any thoughts ??
The "\ //" bit strikes me as odd and probably a problem. You first say continued on next line and then continue with a comment.
When I try that with gcc is complains about a stray "\". If you are going to use a continuation character, do not follow that with anything but a newline.
Then again, you don't need a line continuation character in an initializer like that.
Noted...Thanks for help....The comments made the code more readable as it is a library file....So I knew which SMCLK frequency I was using
I tried ....they didn't work either....I just removed them and all seems to be fine
**Attention** This is a public forum