fix asprintf implicit decleration
Move capemgr out of pwm, change initialization