advanced I/O code

I have been learning coding but at times run into areas where I want more info. As an example: pulseIn(). I have used the function but wanted to know more about it, such as implementation. So I went looking for the source code without success. Where can one find the source code for this and other advancedIO functions. Seeing the implementation helps me see how its done, which I learn from.

BTW, I did create my own pulseIO() function with timeout (using a different name) before I found it in the advancedI/O reference section.

Thanks

Do realize that the Arduino core is not the world's greatest shining example of wonderful code. It's just okay.

Search your Arduino folders for wiring_pulse.c for pulseIn() function.

pulseIn() isn't useful for multitasking programs, because it blocks until the end of the pulse is found, or it times out. You might want to consider that before you dig too deeply into it.

Thanks for the info. Very useful and I can learn from it.

The search function on Github site is good. If you have a good search tool on your computer, that is also good.

The third way to search is with Google and search within Github: site:github.com arduinocore-avr pulsein - Google Search.