sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.91k stars 659 forks source link

Add locks #333

Open gurux13 opened 4 years ago

gurux13 commented 4 years ago

Currently the only way to wait for data is in a busy loop. This adds locking mechanisms to the Raspberry Pi, when compiled with WITH_LOCKS.

Locke commented 4 years ago

Note: if this should be merged my alternative PR #87 is probably obsolete / could be closed as won't fix with a reference to this one.

1technophile commented 4 years ago

This PR currently break the CI: https://travis-ci.org/github/sui77/rc-switch

In particular focus should be put also on the Arduino and ESP behaviours

gurux13 commented 4 years ago

Fixed. I don't use this library for Arduino builds, so it's a little complicated for me to test on Arduino. This PR does not support Arduino, so I've added a check that the locks are used only on a RPi. If you find that this works on other platforms, please feel free to add proper preprocessor checks.