-->
Page 2 of 8

Re: Documentation and API

PostPosted: Mon Mar 30, 2015 9:08 pm
by longinus
First off, thanks for all this work guys... it's awesome!!!

Second, it seems the right way to include the header file is doing...

Code: Select allextern "C" {
  #include "user_interface.h"
}


Is that right?
It seems to work fine when I tried using the deep sleep code, but just making sure...

Re: Documentation and API

PostPosted: Tue Mar 31, 2015 1:01 am
by igrr
Yes that's the correct way.
I think I will patch those SDK header files to add c++ guards, as in
Code: Select all#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif

so that people don't stumble upon these issues.

Re: Documentation and API

PostPosted: Tue Mar 31, 2015 3:22 am
by reaper7
@igrr - you plan to add support for second serial?
something like for eg:
https://github.com/energia/Energia/blob ... reSerial.h

with extern HardwareSerial Serial1;

Re: Documentation and API

PostPosted: Tue Mar 31, 2015 3:01 pm
by igrr
yep, there's a patch proposed for that:
https://github.com/esp8266/Arduino/issues/16
it needs some clean up to reduce the amount of code duplication, but it should land in the next release.