Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analogReadConversionComplete()' used but never defined [enabled by default] #337

Open
JacobChrist opened this issue Mar 23, 2017 · 2 comments

Comments

@JacobChrist
Copy link
Member

JacobChrist commented Mar 23, 2017

Just noticed this warning when compiling non-blocking analogRead funcitons. I'm not sure why I didn't notice it before nor am I sure what it means. But it bug me.

In file included from C:\subversion\rockleyphotonics.com\lcm\arduino-lcm\hardware\chipkit-core\pic32\cores\pic32/WProgram.h:12:0,

                 from C:\subversion\rockleyphotonics.com\lcm\arduino-lcm\hardware\chipkit-core\pic32\cores\pic32/Arduino.h:4,

                 from C:\Users\JACOBC~1\AppData\Local\Temp\arduino_build_430017\sketch\analogReadNonBlockingSimple.ino.cpp:1:

C:\subversion\rockleyphotonics.com\lcm\arduino-lcm\hardware\chipkit-core\pic32\cores\pic32/wiring.h:152:17: warning: inline function 'uint32_t analogReadConversionComplete()' used but never defined [enabled by default]

 inline uint32_t analogReadConversionComplete();

                 ^
@majenkotech
Copy link
Member

It's because (I believe) you have an inline in a header file, but the "inlined" function in a C file. If you want it inline then the code should be in the header file too (which also makes it static). Otherwise (which I'd suggest), remove the inline - you can't inline code that's in a separate TU, so it's pretty much pointless.

@JacobChrist
Copy link
Member Author

I was just trying to use inline in the hopes of not changing the timing of the original code (pre non-blocking code ) by turning in to functions. Probably not a big issue since the PIC32 is so fast compared to ADC sampling speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@JacobChrist @majenkotech and others