GIPdA / ZetaRF

Arduino Library for SiLabs Low Current Sub-GHz Wireless Transceiver: Si4455 (ZETA modules), Si446x (DRF4463F modules)
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

Add Raspberry Pi support #12

Closed hallgchris closed 4 years ago

hallgchris commented 4 years ago

Hey, sorry this took a little while! Thought I should have a go using the library before I made the PR to check it's actually usable.

I'm using the CMake build system, mainly because it's the only thing I really no how to use. Do you have any thoughts on this? Any suggestions on how I could do this better, considering this is primarily an Arduino IDE project?

If you have an RPi lying around, you should be able to compile it with cmake . then make.

Happy to make whatever changes/improvements you can think of, so let me know and I'll try my best :)

(Fixes #11)

GIPdA commented 4 years ago

No worries, thanks for the PR :) I'll check that ASAP. I made some changes on the API I have yet to commit, I'll see to merge first I guess, and update everything afterwards.

I don't really use CMake that much, but it usually works, so no issues there. Did you check that there are no conflicts with Arduino?

hallgchris commented 4 years ago

Everything seems to work fine code-wise. The only issue I've noticed is how the Arduino IDE handles the examples now that I've made Arduino and Raspberry Pi specific subfolders.

image

I think this would be resolved if I moved everything in examples/arduino back to its original location in examples, but then the folder structure would be a bit messier. How would you prefer I had the folders?

Other than this, the library still seems to work great in my testing on a Teensy 3.6.

GIPdA commented 4 years ago

I guess the best way would be to create a dedicated example folder for the RPi, like examples_raspberrypi, at root level. Arduino should only look in the src and examples folders for source files and examples, if I remember correctly. Give it a try?

I'll merge this WE and push all my updates too.

hallgchris commented 4 years ago

Of course, that's so much cleaner! I've moved the examples to the locations you suggested.

GIPdA commented 4 years ago

Thank you for your PR, I merged it. I also added my updates and had to fix your files a bit, so a test would be nice to make sure everything's still good ;) Note that I renamed ZetaRF to ZetaRf (lowercase f), because I love changing everything. maybe. :P

hallgchris commented 4 years ago

No worries! Very happy to contribute :)

There's a few issues I've found:

Seems to be all good other than those few things!

GIPdA commented 4 years ago

That should be all fixed now, thank you! :)

hallgchris commented 4 years ago

No problem! Working great now :)