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.

Thanks!

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

arduino-xxxx\hardware\arduino\cores\arduino\wiring_analog.c

Yeah that's it programmer, thanks!