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

Nordic NRF compatibility #72

Open
dstroy0 opened this issue Mar 22, 2023 · 8 comments
Open

Nordic NRF compatibility #72

dstroy0 opened this issue Mar 22, 2023 · 8 comments

Comments

@dstroy0
Copy link
Owner

dstroy0 commented Mar 22, 2023

It needs vsnprintf_P, snprintf_P, maybe pgm_read_dword. the hook is the NRF_H macro.

@dstroy0
Copy link
Owner Author

dstroy0 commented Mar 22, 2023

It looks like it will work, but their stream objects are significantly more complex to set up and differ platform-platform. So unless I want to write a stream shim they'll just have to use a buffer and figure it out on their own.

@2bndy5
Copy link
Contributor

2bndy5 commented Mar 23, 2023

What arduino core/board did you use?

@dstroy0
Copy link
Owner Author

dstroy0 commented Mar 24, 2023

platformio adafruit boards pkg / NRF52840 64MHz, 243KB RAM, 796KB Flash
https://github.com/dstroy0/InputHandler/actions/runs/4494426191/jobs/7906906907#step:7:145

@dstroy0
Copy link
Owner Author

dstroy0 commented Mar 24, 2023

possibly relevant: khoih-prog/TimerInterrupt_Generic#4

@dstroy0
Copy link
Owner Author

dstroy0 commented Mar 24, 2023

If it's a regression in the nrf core/adafruit shims I'll figure out how to use the compatible previous version.

@2bndy5
Copy link
Contributor

2bndy5 commented Mar 24, 2023

Actually, I think its something to do with the adaruit core's use of TinyUSB: see adafruit/Adafruit_nRF52_Arduino#653 (comment)

Basically you need this somewhere (probably in the lib's primary header):

#ifdef USE_TINYUSB
    #include <Adafruit_TinyUSB.h>
#endif

@2bndy5
Copy link
Contributor

2bndy5 commented Mar 24, 2023

Probably better to use something more board-specific though:

#if defined(USE_TINYUSB) && defined(ARDUINO_NRF52_ADAFRUIT)
    #include <Adafruit_TinyUSB.h>
#endif

@dstroy0
Copy link
Owner Author

dstroy0 commented Mar 24, 2023

Awesome, I'll get to testing that! Thanks!

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

2 participants