rc-switch
rc-switch copied to clipboard
How the ISR function handle the filtering out first high pulse in SYNC bit
Hello, I have one concern when analyzing source code, In function handling the reception side.
Specifically, in source code RCSwitch.cpp - function receiveProtocol() line 639:
* ______________
* | |____________|XXXXXXXXXXXXX|
*
* |-filtered out-|--1st dur--|--Start data--|
*
* The 2nd saved duration starts the data
*/
The author mentioned that the first high pulse in SYNC phase is filtered out and not stored in timing[] array. I assumed that this point is done in the ISR function, which would be invoked anytime there's a change in signal level in a configured Input pin. (check RCSwitch.cpp - function handleInterrupt - 671). However, I didn't find any LOC that do the filtering logic.
Can someone clarify this point for me? Where the filtering stuff is done?
Thanks in advance!