Update pwm.c

Added low level buffer operations.