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

won't compile for esp8266 board #75

Closed
tavdog opened this issue Jan 7, 2022 · 3 comments
Closed

won't compile for esp8266 board #75

tavdog opened this issue Jan 7, 2022 · 3 comments

Comments

@tavdog
Copy link

tavdog commented Jan 7, 2022

When trying to use this library with esp8266 I get some int conversion error. It compiles fine for esp32.

lib/note-arduino/src/Notecard.cpp: In member function 'void Notecard::begin(uint32_t, uint32_t, TwoWire&)':
lib/note-arduino/src/Notecard.cpp:194:36: error: invalid conversion from 'void (*)(long unsigned int)' to 'delayMsFn' {aka 'void (*)(unsigned int)'} [-fpermissive]
  194 |     NoteSetFnDefault(malloc, free, delay, millis);
      |                                    ^~~~~
      |                                    |
      |                                    void (*)(long unsigned int)
In file included from lib/note-arduino/src/Notecard.h:33,
                 from lib/note-arduino/src/Notecard.cpp:39:
lib/note-arduino/src/note-c/note.h:126:67: note:   initializing argument 3 of 'void NoteSetFnDefault(mallocFn, freeFn, delayMsFn, getMsFn)'
  126 | void NoteSetFnDefault(mallocFn mallocfn, freeFn freefn, delayMsFn delayfn, getMsFn millisfn);
      |                                                         ~~~~~~~~~~^~~~~~~
lib/note-arduino/src/Notecard.cpp: In member function 'void Notecard::begin(HardwareSerial&, int)':
lib/note-arduino/src/Notecard.cpp:216:36: error: invalid conversion from 'void (*)(long unsigned int)' to 'delayMsFn' {aka 'void (*)(unsigned int)'} [-fpermissive]
  216 |     NoteSetFnDefault(malloc, free, delay, millis);
      |                                    ^~~~~
      |                                    |
      |                                    void (*)(long unsigned int)
In file included from lib/note-arduino/src/Notecard.h:33,
                 from lib/note-arduino/src/Notecard.cpp:39:
lib/note-arduino/src/note-c/note.h:126:67: note:   initializing argument 3 of 'void NoteSetFnDefault(mallocFn, freeFn, delayMsFn, getMsFn)'
  126 | void NoteSetFnDefault(mallocFn mallocfn, freeFn freefn, delayMsFn delayfn, getMsFn millisfn);
      |                                                         ~~~~~~~~~~^~~~~~~
*** [.pio/build/huzzah_MAX/lib104/note-arduino/Notecard.cpp.o] Error 1
@tavdog
Copy link
Author

tavdog commented Jan 7, 2022

If i change line 88 in note.h to typedef void (*delayMsFn) (unsigned long ms); instead of uint32_t ms it will compile. not sure if it's gonna work though. With that change, however, now it won't compile for esp32 with the same error.

@bsatrom
Copy link
Member

bsatrom commented Feb 12, 2022

Sorry for missing this, @tavdog! We've incorporated a fix and should have a new release out for this soon.

@zfields
Copy link
Contributor

zfields commented Feb 12, 2022

The fix has been merged, and we are now awaiting the Arduino Library process to consume it.

@zfields zfields closed this as completed May 26, 2022
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