as I was not really satisfied with the software PWM implementation from the SDK, I rolled my own.
A lengthy blogpost with details:
https://lurchi.wordpress.com/2016/06/29/esp8266-pwm-revisited-and-reimplemented/
The actual code:
https://github.com/StefanBruens/ESP8266_new_pwm