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

TinyPinChange_FallingEdge typo in TinyPinChange library #160

Open
slovekkania opened this issue Apr 13, 2023 · 1 comment
Open

TinyPinChange_FallingEdge typo in TinyPinChange library #160

slovekkania opened this issue Apr 13, 2023 · 1 comment

Comments

@slovekkania
Copy link

Hi
the macro: TinyPinChange_FallingEdge
returns true for both rising and falling edge instead of falling edge only

instead of this:
#define TinyPinChange_FallingEdge(VirtualPortIdx, Pin) ( TinyPinChange_GetPortEvent((VirtualPortIdx)) & TinyPinChange_PinToMsk((Pin)) & (TinyPinChange_GetCurPortSt((VirtualPortIdx) ^ 0xFF)) )

should be this:
#define TinyPinChange_FallingEdge(VirtualPortIdx, Pin) ( TinyPinChange_GetPortEvent((VirtualPortIdx)) & TinyPinChange_PinToMsk((Pin)) & (TinyPinChange_GetCurPortSt((VirtualPortIdx)) ^ 0xFF) )

wrong position of ^ 0xFF

please check and fix :)

@slovekkania
Copy link
Author

the library author fixed this bug.
most recent library is here:
https://github.com/RC-Navy/DigisparkArduinoIntegration/tree/master/libraries/DigisparkTinyPinChange

and should be replaced

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

1 participant