Where is the code for analogWrite function

I'm trying to figure out how to do PWM on an Atmega168, so I was wondering if I could see anywhere how the analogWrite function is implemented.

Sorry if this is the wrong board, I wasn't sure where it would belong.


If you’re looking for the actual source code for the function, it’s in the file:


Yeah that's it programmer, thanks!